2024-09-26 11:50:00 +02:00
|
|
|
{
|
|
|
|
modulesPath,
|
2024-09-27 15:41:13 +02:00
|
|
|
config,
|
2024-09-26 11:50:00 +02:00
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-09-23 16:57:09 +02:00
|
|
|
imports = [
|
|
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
|
|
|
./disko-config.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.loader.grub = {
|
|
|
|
efiSupport = true;
|
|
|
|
efiInstallAsRemovable = true;
|
|
|
|
};
|
2024-09-26 10:24:32 +02:00
|
|
|
|
|
|
|
# Firewall
|
|
|
|
networking.nftables.enable = true;
|
|
|
|
networking.firewall = {
|
|
|
|
enable = true;
|
|
|
|
allowedTCPPorts = [22 80 443];
|
|
|
|
};
|
2024-09-26 11:50:00 +02:00
|
|
|
|
|
|
|
# Proxy
|
2024-09-27 15:41:13 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
nss.tools
|
|
|
|
];
|
|
|
|
|
2024-09-26 11:50:00 +02:00
|
|
|
services.caddy = {
|
|
|
|
enable = true;
|
|
|
|
package = inputs.caddy.packages.${pkgs.system}.caddy;
|
2024-09-30 12:33:16 +02:00
|
|
|
|
|
|
|
globalConfig = ''
|
|
|
|
acme_dns ovh {
|
|
|
|
endpoint {$OVH_ENDPOINT}
|
|
|
|
application_key {$OVH_APPLICATION_KEY}
|
|
|
|
application_secret {$OVH_APPLICATION_SECRET}
|
|
|
|
consumer_key {$OVH_CONSUMER_KEY}
|
|
|
|
}
|
|
|
|
'';
|
2024-09-26 11:50:00 +02:00
|
|
|
};
|
2024-09-27 15:41:13 +02:00
|
|
|
systemd.services.caddy = {
|
|
|
|
serviceConfig = {
|
|
|
|
EnvironmentFile = config.sops.templates."caddy.env".path;
|
|
|
|
};
|
|
|
|
};
|
2024-09-23 16:57:09 +02:00
|
|
|
}
|