mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat: clean up colmena a little, fix nginx default vhost
This commit is contained in:
parent
cb7eb46ee7
commit
2189d0592f
4 changed files with 32 additions and 21 deletions
|
|
@ -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"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -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};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
nixos/profiles/server/fqdn.nix
Normal file
3
nixos/profiles/server/fqdn.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
_: {
|
||||||
|
networking.domain = "inskip.me";
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue