From 2189d0592f8c1d83055cf54f8fa84564d4e6d72e Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Sun, 19 Oct 2025 13:57:39 -0700 Subject: [PATCH] feat: clean up colmena a little, fix nginx default vhost --- home/environments/niri/konawall.nix | 1 - modules/system/colmena.nix | 20 +------------------- nixos/profiles/server/fqdn.nix | 3 +++ nixos/servers/web/nginx.nix | 29 ++++++++++++++++++++++++++++- 4 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 nixos/profiles/server/fqdn.nix diff --git a/home/environments/niri/konawall.nix b/home/environments/niri/konawall.nix index 1d89fb29..b38a61ad 100644 --- a/home/environments/niri/konawall.nix +++ b/home/environments/niri/konawall.nix @@ -8,7 +8,6 @@ interval = 30 * 60; rotate = true; tags = [ - "rating:s" "score:>=100" "width:>=1500" ]; diff --git a/modules/system/colmena.nix b/modules/system/colmena.nix index 1fe6139a..8c2148b0 100644 --- a/modules/system/colmena.nix +++ b/modules/system/colmena.nix @@ -1,11 +1,10 @@ { - name, config, lib, inputs, ... }: let - inherit (lib.modules) mkIf mkOptionDefault mkDefault; + inherit (lib.modules) mkOptionDefault mkDefault; in { options = let inherit (lib.types) nullOr; @@ -23,22 +22,5 @@ in { "all" ]; }; - deploy = let - nixos = config.built; - in { - sshUser = mkOptionDefault "deploy"; - user = mkOptionDefault "root"; - sshOpts = mkIf (config.type == "NixOS") ( - mkOptionDefault ["-p" "${builtins.toString (builtins.head nixos.config.services.openssh.ports)}"] - ); - autoRollback = mkOptionDefault true; - magicRollback = mkOptionDefault true; - fastConnection = mkOptionDefault false; - hostname = mkOptionDefault "${name}.devices.inskip.me"; - profiles.system = { - user = "root"; - path = inputs.deploy-rs.lib.${config.system}.activate.nixos inputs.self.nixosConfigurations.${name}; - }; - }; }; } diff --git a/nixos/profiles/server/fqdn.nix b/nixos/profiles/server/fqdn.nix new file mode 100644 index 00000000..13c4d819 --- /dev/null +++ b/nixos/profiles/server/fqdn.nix @@ -0,0 +1,3 @@ +_: { + networking.domain = "inskip.me"; +} diff --git a/nixos/servers/web/nginx.nix b/nixos/servers/web/nginx.nix index 289f6be3..9f997045 100644 --- a/nixos/servers/web/nginx.nix +++ b/nixos/servers/web/nginx.nix @@ -1,4 +1,4 @@ -_: { +{config, ...}: { services.nginx = { enable = true; recommendedTlsSettings = true; @@ -6,5 +6,32 @@ _: { recommendedGzipSettings = true; recommendedProxySettings = true; statusPage = true; + virtualHosts = let + vHost = { + extraConfig = '' + add_header Content-Type text/plain; + return 200 "meep?"; + ''; + /* + locations = { + "/" = { + extraConfig = '' + add_header Content-Type text/plain; + return 200 "meep?"; + ''; + }; + }; + */ + }; + in { + "${config.networking.fqdn}" = + vHost + // { + enableACME = true; + forceSSL = true; + default = true; + }; + "localhost" = vHost; + }; }; }