blob: c7c86d81654712db3c279b62b18335d8ba493aa2 (
plain)
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
|
{ options, config, lib, namespace, ... }:
with lib; with lib.${namespace}; let
cfg = config.${namespace}.system.impermanence;
in {
options.${namespace}.system.impermanence = with types; {
enable = mkEnableOption "root impermanence";
};
config = mkIf cfg.enable {
programs.fuse.userAllowOther = true;
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [
"/etc/nixos"
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
# "/var/lib/bluetooth"
];
files = [
"/etc/machine-id"
];
};
};
}
|