diff options
author | azahi <azat@bahawi.net> | 2025-02-17 02:21:56 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2025-02-17 02:21:56 +0300 |
commit | 59180328cda59817d71cd58c8f48ead047375064 (patch) | |
tree | 2cdd7d1bfa309839ef624c19daf283f510aacf69 /configurations/manwe | |
parent | 2025-02-05 (diff) |
2025-02-17
Diffstat (limited to '')
-rw-r--r-- | configurations/manwe/default.nix | 9 | ||||
-rw-r--r-- | configurations/manwe/mailserver/default.nix | 21 | ||||
-rw-r--r-- | configurations/manwe/webserver.nix | 7 |
3 files changed, 17 insertions, 20 deletions
diff --git a/configurations/manwe/default.nix b/configurations/manwe/default.nix index 89b111a..326cfa6 100644 --- a/configurations/manwe/default.nix +++ b/configurations/manwe/default.nix @@ -3,9 +3,8 @@ lib, ... }: -with lib; { - imports = attrValues (modulesIn ./.); + imports = lib.modulesIn ./. |> lib.attrValues; # Something is broken there. Not sure why it affects me tho. disabledModules = [ "services/networking/wireguard-networkd.nix" ]; @@ -28,11 +27,11 @@ with lib; git.server = { enable = true; - domain = "git.${my.domain.azahi}"; + domain = "git.${lib.my.domain.azahi}"; }; matrix.dendrite = { enable = true; - domain = my.domain.azahi; + domain = lib.my.domain.azahi; }; murmur.enable = true; radicale.enable = true; @@ -40,7 +39,7 @@ with lib; shadowsocks.enable = true; soju = { enable = true; - domain = my.domain.azahi; + domain = lib.my.domain.azahi; }; vaultwarden.enable = true; ntfy.enable = true; diff --git a/configurations/manwe/mailserver/default.nix b/configurations/manwe/mailserver/default.nix index cc8b41d..5160604 100644 --- a/configurations/manwe/mailserver/default.nix +++ b/configurations/manwe/mailserver/default.nix @@ -4,9 +4,8 @@ lib, ... }: -with lib; { - imports = [ inputs.mailserver.nixosModule ] ++ attrValues (modulesIn ./.); + imports = [ inputs.mailserver.nixosModule ] ++ (lib.modulesIn ./. |> lib.attrValues); ark.directories = with config.mailserver; [ "/var/lib/dovecot" @@ -20,25 +19,25 @@ with lib; secrets = with config.mailserver; { dkim-key-azahi-cc = { file = "${inputs.self}/secrets/dkim-key-azahi-cc"; - path = "${dkimKeyDirectory}/${my.domain.azahi}.${dkimSelector}.key"; + path = "${dkimKeyDirectory}/${lib.my.domain.azahi}.${dkimSelector}.key"; owner = config.services.opendkim.user; inherit (config.services.opendkim) group; }; dkim-key-rohan-net = { file = "${inputs.self}/secrets/dkim-key-rohan-net"; - path = "${dkimKeyDirectory}/${my.domain.rohan}.${dkimSelector}.key"; + path = "${dkimKeyDirectory}/${lib.my.domain.rohan}.${dkimSelector}.key"; owner = config.services.opendkim.user; inherit (config.services.opendkim) group; }; dkim-key-gondor-net = { file = "${inputs.self}/secrets/dkim-key-gondor-net"; - path = "${dkimKeyDirectory}/${my.domain.gondor}.${dkimSelector}.key"; + path = "${dkimKeyDirectory}/${lib.my.domain.gondor}.${dkimSelector}.key"; owner = config.services.opendkim.user; inherit (config.services.opendkim) group; }; dkim-key-shire-net = { file = "${inputs.self}/secrets/dkim-key-shire-net"; - path = "${dkimKeyDirectory}/${my.domain.shire}.${dkimSelector}.key"; + path = "${dkimKeyDirectory}/${lib.my.domain.shire}.${dkimSelector}.key"; owner = config.services.opendkim.user; inherit (config.services.opendkim) group; }; @@ -51,7 +50,7 @@ with lib; mailserver = let - cert = config.certs.${my.domain.shire}; + cert = config.certs.${lib.my.domain.shire}; in { enable = true; @@ -65,7 +64,7 @@ with lib; enableSubmission = false; fqdn = config.networking.domain; - domains = with my.domain; [ + domains = with lib.my.domain; [ azahi gondor rohan @@ -103,11 +102,11 @@ with lib; dovecot2.sieve.extensions = [ "fileinto" ]; # https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/241 - redis.servers.rspamd.enable = mkForce false; + redis.servers.rspamd.enable = lib.mkForce false; }; systemd.services.rspamd = { - requires = mkForce [ "redis-default.service" ]; - after = mkForce [ "redis-default.service" ]; + requires = lib.mkForce [ "redis-default.service" ]; + after = lib.mkForce [ "redis-default.service" ]; }; } diff --git a/configurations/manwe/webserver.nix b/configurations/manwe/webserver.nix index 051ddba..6f6061e 100644 --- a/configurations/manwe/webserver.nix +++ b/configurations/manwe/webserver.nix @@ -5,12 +5,11 @@ libPlausible, ... }: -with lib; { nixfiles.modules.nginx = { enable = true; virtualHosts = - with my.domain; + with lib.my.domain; { ${shire}.locations."/".return = "301 https://www.youtube.com/watch?v=dQw4w9WgXcQ"; "git.${shire}".locations."/".return = "301 https://git.${azahi}"; @@ -31,11 +30,11 @@ with lib; frodo = "301 https://frodo."; in { - ${gondor}.locations."/".return = concatStrings [ + ${gondor}.locations."/".return = lib.concatStrings [ frodo gondor ]; - ${rohan}.locations."/".return = concatStrings [ + ${rohan}.locations."/".return = lib.concatStrings [ frodo rohan ]; |