zaphyra's git: nixfiles

zaphyra's nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
{
  config,
  lib,
  ...
}:

{

  options.zpha.configure.xmppServer.enable = lib.mkEnableOption "";

  config = lib.mkIf config.zpha.configure.xmppServer.enable {
    sops.secrets = {
      "restic/prosody/repositoryPassword" = { };
      "restic/prosody/sshPrivateKey" = { };
    };

    common.services = {
      resticBackup.prosody = {
        inherit (config.services.prosody) user;
        enable = true;
        targets = [
          "restic-target.fc9f.de"
          "isodon.fc9f.de"
        ];
        sshKeyFile = config.sops.secrets."restic/prosody/sshPrivateKey".path;
        passwordFile = config.sops.secrets."restic/prosody/repositoryPassword".path;
        paths = [ config.services.prosody.dataDir ];
      };

      prosody = {
        enable = true;
        domain = "zaphyra.eu";
        adminUsers = [ "katja@zaphyra.eu" ];
      };
    };
  };

}