flocon/modules/nix/services/website.nix
Anthony Rodriguez 2b77ac239e
treewide: config/nixos/services -> modules/nix/services
Moved every service in their own module, and conditionally enable them
based on profiles.
2025-01-14 15:10:49 +01:00

25 lines
484 B
Nix

{
lib,
inputs,
pkgs,
config,
...
}: {
config = lib.mkIf config.local.profiles.server.enable {
services.caddy.enable = true;
services.caddy.virtualHosts = {
"www.nezia.dev" = {
extraConfig = ''
redir https://nezia.dev{uri}
'';
};
"nezia.dev" = {
extraConfig = ''
root * ${inputs."nezia_dev".packages.${pkgs.system}.default}
file_server
encode gzip
'';
};
};
};
}