diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-09-20 15:26:47 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-09-20 15:26:47 +0300 |
commit | 837fc97b30a41d766dd53a2370f6cb1d26364f9a (patch) | |
tree | 63ae83af789930c9a2035b9f9e43fbee166ab27b /nixosConfigurations/manwe | |
parent | 2023-09-16 (diff) |
2023-09-20
Diffstat (limited to '')
-rw-r--r-- | nixosConfigurations/manwe/default.nix | 4 | ||||
-rw-r--r-- | nixosConfigurations/manwe/mailserver/default.nix (renamed from nixosConfigurations/manwe/mailserver.nix) | 24 | ||||
-rw-r--r-- | nixosConfigurations/manwe/webserver.nix | 9 |
3 files changed, 15 insertions, 22 deletions
diff --git a/nixosConfigurations/manwe/default.nix b/nixosConfigurations/manwe/default.nix index 267654d..c2ac8be 100644 --- a/nixosConfigurations/manwe/default.nix +++ b/nixosConfigurations/manwe/default.nix @@ -5,7 +5,7 @@ }: with lib; { imports = [ - ./mailserver.nix + ./mailserver ./webserver.nix ]; @@ -23,6 +23,7 @@ with lib; { monitoring.enable = true; postgresql.enable = true; + clickhouse.enable = true; git.server = { enable = true; @@ -43,6 +44,7 @@ with lib; { }; vaultwarden.enable = true; ntfy.enable = true; + plausible.enable = true; }; # A VPN to play old LAN games with the boys. diff --git a/nixosConfigurations/manwe/mailserver.nix b/nixosConfigurations/manwe/mailserver/default.nix index 389a9a0..4f58df7 100644 --- a/nixosConfigurations/manwe/mailserver.nix +++ b/nixosConfigurations/manwe/mailserver/default.nix @@ -7,6 +7,7 @@ with lib; { imports = [inputs.simple-nixos-mailserver.nixosModule]; + # Redis? ark.directories = with config.mailserver; [ "/var/lib/dovecot" "/var/lib/postfix" @@ -70,26 +71,9 @@ with lib; { password = requirePass; }; - loginAccounts = with my.domain; { - "azahi@${shire}" = { - hashedPassword = "@HASHED_PASSWORD@"; - aliases = [ - "@${azahi}" - "@${rohan}" - "@${gondor}" - "abuse@${shire}" - "admin@${shire}" - "ceo@${shire}" - "postmaster@${shire}" - "root@${shire}" - ]; - }; - "samwise@${shire}" = { - hashedPassword = "@HASHED_PASSWORD@"; - aliases = ["chad@${shire}"]; - quota = "1G"; - }; - }; + # Just a list of accounts with aliases and hasedPasswords. Not necessarily + # secret, but kept from prying eyes. + loginAccounts = import ./accounts.nix lib; }; # https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/241 diff --git a/nixosConfigurations/manwe/webserver.nix b/nixosConfigurations/manwe/webserver.nix index f07d545..9e19474 100644 --- a/nixosConfigurations/manwe/webserver.nix +++ b/nixosConfigurations/manwe/webserver.nix @@ -13,7 +13,14 @@ with lib; { "bitwarden.${shire}".locations."/".return = "301 https://vaultwarden.${shire}"; ${azahi} = { serverAliases = ["frodo.${gondor}" "frodo.${rohan}"]; - locations."/".root = inputs.azahi-cc; + locations."/" = { + root = inputs.azahi-cc; + extraConfig = '' + sub_filter '</head>' + '<script defer data-domain="${azahi}" src="https://plausible.shire.net/js/script.js"></script></head>'; + sub_filter_once on; + ''; + }; }; } // (let |