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;
|
||||
rotate = true;
|
||||
tags = [
|
||||
"rating:s"
|
||||
"score:>=100"
|
||||
"width:>=1500"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
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 = {
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue