tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/duplicati: add package option
francescoDeSimone
2 years ago
42f0af4a
9310806e
+4
-3
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
backup
duplicati.nix
+4
-3
nixos/modules/services/backup/duplicati.nix
···
10
10
services.duplicati = {
11
11
enable = mkEnableOption (lib.mdDoc "Duplicati");
12
12
13
13
+
package = mkPackageOptionMD pkgs "duplicati" { };
14
14
+
13
15
port = mkOption {
14
16
default = 8200;
15
17
type = types.port;
···
53
55
};
54
56
55
57
config = mkIf cfg.enable {
56
56
-
environment.systemPackages = [ pkgs.duplicati ];
58
58
+
environment.systemPackages = [ cfg.package ];
57
59
58
60
systemd.services.duplicati = {
59
61
description = "Duplicati backup";
···
63
65
{
64
66
User = cfg.user;
65
67
Group = "duplicati";
66
66
-
ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=${cfg.dataDir}";
68
68
+
ExecStart = "${cfg.package}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=${cfg.dataDir}";
67
69
Restart = "on-failure";
68
70
}
69
71
(mkIf (cfg.dataDir == "/var/lib/duplicati") {
···
83
85
84
86
};
85
87
}
86
86
-