From 074ea3bd3b8a1bda201fc9794bbc3b9e6f58d5b9 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 26 Oct 2024 16:43:08 +0200 Subject: [PATCH] fixes for pc2, misc changes --- flake.nix | 14 +++++----- home/{ronja-home.nix => ronja.nix} | 0 home/vinzenz/default.nix | 4 +-- hosts/hetzner-vpn1/environment.nix | 44 +++++++++++++++--------------- hosts/vinzenz-pc2/environment.nix | 3 +- users/vinzenz.nix | 7 +---- 6 files changed, 33 insertions(+), 39 deletions(-) rename home/{ronja-home.nix => ronja.nix} (100%) diff --git a/flake.nix b/flake.nix index ffc2c07..023e2e9 100644 --- a/flake.nix +++ b/flake.nix @@ -16,13 +16,13 @@ home-manager, lix-module, ... - }: let - common-modules = [ - lix-module.nixosModules.default - ./common - ]; - in { - nixosConfigurations = { + }: { + nixosConfigurations = let + common-modules = [ + lix-module.nixosModules.default + ./common + ]; + in { vinzenz-lpt2 = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = diff --git a/home/ronja-home.nix b/home/ronja.nix similarity index 100% rename from home/ronja-home.nix rename to home/ronja.nix diff --git a/home/vinzenz/default.nix b/home/vinzenz/default.nix index a10b7ca..27e4669 100644 --- a/home/vinzenz/default.nix +++ b/home/vinzenz/default.nix @@ -4,9 +4,7 @@ inputs @ { pkgs, lib, ... -}: let - isGnomeEnabled = osConfig.my.desktop.enableGnome; -in { +}: { programs = { home-manager.enable = true; fzf.enable = true; diff --git a/hosts/hetzner-vpn1/environment.nix b/hosts/hetzner-vpn1/environment.nix index 280d8d7..9bb013a 100644 --- a/hosts/hetzner-vpn1/environment.nix +++ b/hosts/hetzner-vpn1/environment.nix @@ -2,27 +2,7 @@ pkgs, lib, ... -}: let - servicesDomain = "services.zerforschen.plus"; - mkServiceConfig = host: port: { - addSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://${host}:${toString port}/"; - extraConfig = '' - # bind to tailscale ip - proxy_bind 100.88.118.60; - # pam auth - limit_except OPTIONS { - auth_pam "Password Required"; - auth_pam_service_name "nginx"; - } - ''; - }; - }; - lpt2 = "vinzenz-lpt2.donkey-pentatonic.ts.net"; - pc2 = "vinzenz-pc2.donkey-pentatonic.ts.net"; -in { +}: { imports = [ ../../users/vinzenz.nix ../../users/ronja.nix @@ -66,7 +46,27 @@ in { recommendedGzipSettings = true; recommendedOptimisation = true; - virtualHosts = { + virtualHosts = let + servicesDomain = "services.zerforschen.plus"; + mkServiceConfig = host: port: { + addSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${host}:${toString port}/"; + extraConfig = '' + # bind to tailscale ip + proxy_bind 100.88.118.60; + # pam auth + limit_except OPTIONS { + auth_pam "Password Required"; + auth_pam_service_name "nginx"; + } + ''; + }; + }; + lpt2 = "vinzenz-lpt2.donkey-pentatonic.ts.net"; + pc2 = "vinzenz-pc2.donkey-pentatonic.ts.net"; + in { "vscode.${servicesDomain}" = lib.mkMerge [ (mkServiceConfig pc2 8542) {locations."/" .proxyWebsockets = true;} diff --git a/hosts/vinzenz-pc2/environment.nix b/hosts/vinzenz-pc2/environment.nix index bde8e94..e9392a5 100644 --- a/hosts/vinzenz-pc2/environment.nix +++ b/hosts/vinzenz-pc2/environment.nix @@ -3,6 +3,7 @@ ../../home ../../home/gnome.nix ../../users/vinzenz.nix + ../../users/ronja.nix ../../modules/desktop-environment.nix ../../modules/gnome.nix ../../modules/gaming.nix @@ -12,7 +13,7 @@ config = { home-manager.users = { vinzenz = import ../../home/vinzenz; - ronja = import ../../home/ronja; + ronja = import ../../home/ronja.nix; }; users.users.vinzenz.openssh.authorizedKeys.keys = [ diff --git a/users/vinzenz.nix b/users/vinzenz.nix index e7a38f4..d4bbde4 100644 --- a/users/vinzenz.nix +++ b/users/vinzenz.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: { +{pkgs, ...}: { config = { users.users.vinzenz = { isNormalUser = true;