feat: clean up colmena a little, fix nginx default vhost

This commit is contained in:
Kat Inskip 2025-10-19 13:57:39 -07:00
parent cb7eb46ee7
commit 2189d0592f
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
4 changed files with 32 additions and 21 deletions

View file

@ -8,7 +8,6 @@
interval = 30 * 60; interval = 30 * 60;
rotate = true; rotate = true;
tags = [ tags = [
"rating:s"
"score:>=100" "score:>=100"
"width:>=1500" "width:>=1500"
]; ];

View file

@ -1,11 +1,10 @@
{ {
name,
config, config,
lib, lib,
inputs, inputs,
... ...
}: let }: let
inherit (lib.modules) mkIf mkOptionDefault mkDefault; inherit (lib.modules) mkOptionDefault mkDefault;
in { in {
options = let options = let
inherit (lib.types) nullOr; inherit (lib.types) nullOr;
@ -23,22 +22,5 @@ in {
"all" "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};
};
};
}; };
} }

View file

@ -0,0 +1,3 @@
_: {
networking.domain = "inskip.me";
}

View file

@ -1,4 +1,4 @@
_: { {config, ...}: {
services.nginx = { services.nginx = {
enable = true; enable = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
@ -6,5 +6,32 @@ _: {
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedProxySettings = true; recommendedProxySettings = true;
statusPage = 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;
};
}; };
} }