tangled
alpha
login
or
join now
isabelroses.com
/
dotfiles
12
fork
atom
my over complex system configurations
dotfiles.isabelroses.com/
nixos
nix
flake
dotfiles
linux
12
fork
atom
overview
issues
pulls
pipelines
nixos/services/postgresql: add borgbackup
isabelroses.com
2 weeks ago
009d422b
bef92b58
+13
-2
1 changed file
expand all
collapse all
unified
split
modules
nixos
services
postgresql.nix
+13
-2
modules/nixos/services/postgresql.nix
···
6
6
...
7
7
}:
8
8
let
9
9
-
inherit (lib.modules) mkIf;
10
10
-
inherit (self.lib.services) mkServiceOption;
9
9
+
inherit (lib) mkIf;
10
10
+
inherit (self.lib) mkSecret mkServiceOption;
11
11
12
12
cfg = config.garden.services;
13
13
in
···
19
19
mode = "0755";
20
20
user = "postgres";
21
21
group = "postgres";
22
22
+
};
23
23
+
24
24
+
garden.services.borgbackup.jobs.postgresql = {
25
25
+
paths = [ config.services.postgresql.dataDir ];
26
26
+
repo = "postgresql";
27
27
+
passkeyFile = config.sops.secrets.borg-postgresql-pass.path;
28
28
+
};
29
29
+
30
30
+
sops.secrets.borg-postgresql-pass = mkSecret {
31
31
+
file = "borg";
32
32
+
key = "postgresql-passphrase";
22
33
};
23
34
24
35
services.postgresql = {