diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 01:35:06 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 02:11:48 +0200 |
commit | 1a64deeb894dc95e2645a75771732c6cc53a79ad (patch) | |
tree | 1b9df4838f894577a09b9b260151756272efeb53 /modules/zrepl.nix | |
parent | fa25ffd4583cc362075cd5e1b4130f33306103f0 (diff) | |
download | Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip |
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them
contained personnal information about users. All thos changes got
stashed into a single commit (history is kept in a different place) and
private information was moved in a separate private repository
Diffstat (limited to 'modules/zrepl.nix')
-rw-r--r-- | modules/zrepl.nix | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/modules/zrepl.nix b/modules/zrepl.nix deleted file mode 100644 index 5bcc17b..0000000 --- a/modules/zrepl.nix +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | { config, lib, pkgs, ... }: | ||
2 | let | ||
3 | cfg = config.services.zrepl; | ||
4 | in | ||
5 | { | ||
6 | options = { | ||
7 | services.zrepl = { | ||
8 | enable = lib.mkEnableOption "Enable the zrepl daemon"; | ||
9 | |||
10 | config = lib.mkOption { | ||
11 | type = lib.types.lines; | ||
12 | default = ""; | ||
13 | description = "Configuration"; | ||
14 | }; | ||
15 | }; | ||
16 | }; | ||
17 | |||
18 | config = lib.mkIf cfg.enable { | ||
19 | secrets.keys = { | ||
20 | "zrepl/zrepl.yml" = { | ||
21 | permissions = "0400"; | ||
22 | text = cfg.config; | ||
23 | user = config.systemd.services.zrepl.serviceConfig.User or "root"; | ||
24 | group = config.systemd.services.zrepl.serviceConfig.Group or "root"; | ||
25 | }; | ||
26 | }; | ||
27 | services.filesWatcher.zrepl = { | ||
28 | restart = true; | ||
29 | paths = [ config.secrets.fullPaths."zrepl/zrepl.yml" ]; | ||
30 | }; | ||
31 | systemd.services.zrepl = { | ||
32 | description = "zrepl daemon"; | ||
33 | wantedBy = [ "multi-user.target" ]; | ||
34 | path = [ pkgs.zfs pkgs.openssh ]; | ||
35 | serviceConfig = { | ||
36 | ExecStart = | ||
37 | let configFile = config.secrets.fullPaths."zrepl/zrepl.yml"; | ||
38 | in "${pkgs.zrepl}/bin/zrepl daemon --config ${configFile}"; | ||
39 | Type = "simple"; | ||
40 | RuntimeDirectory= "zrepl"; | ||
41 | RuntimeDirectoryMode= "0700"; | ||
42 | }; | ||
43 | }; | ||
44 | }; | ||
45 | } | ||