From cf0d1d2503c6ef06c417c3d26f61591ff49592d1 Mon Sep 17 00:00:00 2001 From: k Date: Thu, 2 Jan 2025 02:08:47 +0000 Subject: [PATCH 1/2] added minecraft ports --- hosts/server/service.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hosts/server/service.nix b/hosts/server/service.nix index df80dae..d663b4e 100644 --- a/hosts/server/service.nix +++ b/hosts/server/service.nix @@ -5,8 +5,8 @@ }: { networking.firewall = { enable = true; - allowedTCPPorts = [80 443 22 26615]; - allowedUDPPorts = [26615]; + allowedTCPPorts = [80 443 22 26615 25565 24454]; + allowedUDPPorts = [26615 25565 24454]; }; security.acme = { @@ -169,6 +169,15 @@ }; }; + "map.dhilton.xyz" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8100"; + proxyWebsockets = true; + }; + }; + "nix.dhilton.xyz" = { locations."/".proxyPass = "http://127.0.0.1:5000"; }; From 29f4ab693d39420948a5d45523b9cec2c69a0bc9 Mon Sep 17 00:00:00 2001 From: k Date: Thu, 2 Jan 2025 02:09:07 +0000 Subject: [PATCH 2/2] added docker user --- hosts/server/configuration.nix | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 2a532ee..7bf6192 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -18,19 +18,33 @@ trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="]; }; }; + nixpkgs.config.allowUnfree = true; programs = { nix-ld.enable = true; nix-ld.libraries = with pkgs; [glibc glib]; zsh.enable = true; }; - - users.users.k = { - isNormalUser = true; - description = "k"; - extraGroups = ["networkmanager" "wheel"]; - packages = with pkgs; [zsh]; - shell = pkgs.zsh; + users = { + motd = "Welcome to the Server"; + defaultUserShell = pkgs.zsh; + users = { + k = { + isNormalUser = true; + description = "k"; + extraGroups = ["networkmanager" "wheel"]; + openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPKbKVe6gneJ9ghFih3bOeL++iDNPJNIMoZSdNMOsD0I k@laptop"]; + packages = with pkgs; [zsh]; + shell = pkgs.zsh; + }; + docker = { + isNormalUser = true; + description = "user for runing docker"; + extraGroups = ["docker"]; + openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPKbKVe6gneJ9ghFih3bOeL++iDNPJNIMoZSdNMOsD0I k@laptop"]; + packages = with pkgs; [docker-compose]; + }; + }; }; home-manager = {users = {"k" = import ./home.nix;};}; @@ -48,7 +62,6 @@ vaapiVdpau libvdpau-va-gl vpl-gpu-rt - neovim ]; };