diff --git a/hosts/default.nix b/hosts/default.nix index 670037b..69d2b16 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -7,6 +7,9 @@ let config.allowUnfree = true; }; lib = nixpkgs.lib; + configImports = [ + ./configuration.nix + ]; hmImports = [ (import ./home.nix) inputs.nixvim.homeManagerModules.nixvim @@ -20,9 +23,8 @@ in desktop = lib.nixosSystem { inherit system; specialArgs = { inherit user; }; - modules = [ + modules = configImports ++ [ ./desktop - ./configuration.nix ./desktop.nix { boot.loader.grub.gfxmodeEfi = "1920x1080"; @@ -46,9 +48,8 @@ in x220 = lib.nixosSystem { inherit system; specialArgs = { inherit user; }; - modules = [ + modules = configImports ++ [ ./thinkpads - ./configuration.nix ./desktop.nix { # 1024x768 is the closest supported resolution to X220's native 1366x768 @@ -74,9 +75,8 @@ in t430 = lib.nixosSystem { inherit system; specialArgs = { inherit user; }; - modules = [ + modules = configImports ++ [ ./thinkpads - ./configuration.nix ./desktop.nix { boot.loader.grub.gfxmodeEfi = "1600x900"; @@ -99,9 +99,8 @@ in virtualbox = lib.nixosSystem { inherit system; specialArgs = { inherit user; }; - modules = [ + modules = configImports ++ [ ./virtualbox - ./configuration.nix ./desktop.nix { networking.hostName = "virtualbox"; @@ -122,10 +121,12 @@ in elnudrop = lib.nixosSystem { inherit system; - specialArgs = { inherit user; }; - modules = [ + specialArgs = { + inherit user; + enableSSL = true; + }; + modules = configImports ++ [ ./elnudrop - ./configuration.nix { networking.hostName = "elnudrop"; } diff --git a/hosts/elnudrop/hosts/jichan.org/default.nix b/hosts/elnudrop/hosts/jichan.org/default.nix index 372a65a..a5f5c0c 100644 --- a/hosts/elnudrop/hosts/jichan.org/default.nix +++ b/hosts/elnudrop/hosts/jichan.org/default.nix @@ -1,12 +1,14 @@ +{ enableSSL, ... }: + let host = "jichan.org"; in { services.nginx.virtualHosts."www.${host}" = { - forceSSL = true; - enableACME = true; + forceSSL = enableSSL; + enableACME = enableSSL; globalRedirect = host; }; services.nginx.virtualHosts."${host}" = { - forceSSL = true; - enableACME = true; + forceSSL = enableSSL; + enableACME = enableSSL; extraConfig = '' error_page 502 /502.html; ''; diff --git a/hosts/elnudrop/hosts/tegakituesday.com/default.nix b/hosts/elnudrop/hosts/tegakituesday.com/default.nix index 64d256c..726af23 100644 --- a/hosts/elnudrop/hosts/tegakituesday.com/default.nix +++ b/hosts/elnudrop/hosts/tegakituesday.com/default.nix @@ -1,13 +1,15 @@ +{ enableSSL, ... }: + with import ../../../../modules/tailscale/default.nix; let host = "tegakituesday.com"; in { services.nginx.virtualHosts."www.${host}" = { - forceSSL = true; - enableACME = true; + forceSSL = enableSSL; + enableACME = enableSSL; globalRedirect = host; }; services.nginx.virtualHosts."${host}" = { - forceSSL = true; - enableACME = true; + forceSSL = enableSSL; + enableACME = enableSSL; extraConfig = '' error_page 502 /502.html; ''; diff --git a/hosts/elnudrop/modules/headscale.nix b/hosts/elnudrop/modules/headscale.nix index 6463a0f..878b638 100644 --- a/hosts/elnudrop/modules/headscale.nix +++ b/hosts/elnudrop/modules/headscale.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, enableSSL, ... }: let baseDomain = "elnu.com"; @@ -18,8 +18,8 @@ in { }; environment.systemPackages = [ config.services.headscale.package ]; services.nginx.virtualHosts.${domain} = { - forceSSL = true; - enableACME = true; + forceSSL = enableSSL; + enableACME = enableSSL; locations."/" = { proxyPass = "http://localhost:${ toString config.services.headscale.port }"; proxyWebsockets = true;