This fixes inherits and library functions usage, to inherit them explicitely at top level of the file.
27 lines
517 B
Nix
27 lines
517 B
Nix
{
|
|
lib,
|
|
inputs,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
in {
|
|
config = 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
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|