Skip to content

Commit b98d13a

Browse files
committed
feat(nixos/_common/persistence): mount bind
1 parent 1b07467 commit b98d13a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Diff for: nixos/_common/persistence.nix

+9-9
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ in
1616
hideMounts = true;
1717
directories = [
1818
{ directory = "/tmp"; mode = "1777"; }
19+
{ directory = "/var/lib/bluetooth"; mode = "0700"; }
20+
{ directory = "/var/lib/iwd"; mode = "0700"; }
1921
"/var/cache"
2022
"/var/lib/nixos"
2123
"/var/lib/systemd"
2224
"/var/log"
23-
];
25+
] ++ lib.optional config.services.unbound.enable {
26+
directory = config.services.unbound.stateDir;
27+
mode = "0755";
28+
inherit (config.services.unbound) user group;
29+
};
2430
files = [ ];
2531
users.${config._module.args.username} = {
2632
directories = [
@@ -33,15 +39,9 @@ in
3339
];
3440
};
3541
};
36-
systemd.tmpfiles.settings."00-persistence" = persistPaths ({
37-
"/var/lib/bluetooth" = { mode = "0700"; user = "root"; group = "root"; };
42+
systemd.tmpfiles.settings."00-persistence" = persistPaths {
3843
"/var/lib/cups" = { mode = "0755"; user = "root"; group = "root"; };
39-
"/var/lib/iwd" = { mode = "0700"; user = "root"; group = "root"; };
4044
"/var/lib/mullvad-vpn" = { mode = "0755"; user = "root"; group = "root"; };
4145
"/var/spool" = { mode = "0755"; user = "root"; group = "root"; };
42-
} // lib.optionalAttrs config.services.unbound.enable {
43-
"${config.services.unbound.stateDir}" = {
44-
mode = "0755"; inherit (config.services.unbound) user group;
45-
};
46-
});
46+
};
4747
}

0 commit comments

Comments
 (0)