consolidate config file

This commit is contained in:
2025-05-05 12:41:46 -05:00
parent f4a28a137a
commit 5871c4c883
+35 -39
View File
@@ -46,12 +46,6 @@ in
}; };
}; };
environment.variables = {
CP = config.sops.secrets."clusterPassword".path;
CAE = config.sops.secrets."cloudflare-api-email".path;
CAK = config.sops.secrets."cloudflare-api-key".path;
};
systemd.user.services.mbsync.unitConfig.After = [ "sops-nix.service" ]; systemd.user.services.mbsync.unitConfig.After = [ "sops-nix.service" ];
fileSystems."/persist".neededForBoot = true; fileSystems."/persist".neededForBoot = true;
@@ -67,25 +61,27 @@ in
}; };
}; };
}; };
services.nginx.enable = true;
services.nginx.virtualHosts."roypository.com" = { services.nginx = {
forceSSL = true; enable = true;
enableACME = true;
acmeRoot = null; virtualHosts."roypository.com" = {
}; forceSSL = true;
enableACME = true;
acmeRoot = null;
};
virtualHosts."test.roypository.com" = {
services.nginx.virtualHosts."test.roypository.com" = { forceSSL = true;
forceSSL = true; enableACME = true;
enableACME = true; acmeRoot = null;
acmeRoot = null; root = "${testSiteIndex}";
root = "${testSiteIndex}"; locations."/" = {
locations."/" = { extraConfig =
extraConfig = '' ''
index index.html; index index.html;
''; '';
};
}; };
}; };
@@ -104,24 +100,24 @@ in
boot.initrd.postMountCommands = lib.mkAfter '' boot.initrd.postMountCommands = lib.mkAfter ''
zfs rollback -r zroot/root@blank zfs rollback -r zroot/root@blank
''; '';
networking = {
hostName = meta.hostname;
hostId = meta.hostId;
defaultGateway = "192.168.1.1";
nameservers = [ "1.1.1.1" "1.0.0.1" ];
networking.hostName = meta.hostname; firewall = {
networking.hostId = meta.hostId; enable = true;
allowedTCPPorts = [ 22 80 443];
};
networking.interfaces.eth0.ipv4.addresses = [ interfaces.eth0.ipv4.addresses = [
{ {
address = config.ipAddrs.${meta.hostname}; adress = config.ipAddrs.${meta.hostname};
prefixLength = 24; prefixLength = 24;
} }
]; ];
networking.defaultGateway = "192.168.1.1";
networking.nameservers = [ "1.1.1.1" "1.0.0.1" ];
# Open ports in the firewall.
networking.firewall = {
enable = true;
allowedTCPPorts = [ 22 80 443 ];
}; };
# Set your time zone. # Set your time zone.