-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimpermanence.nix
38 lines (33 loc) · 883 Bytes
/
impermanence.nix
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
30
31
32
33
34
35
36
37
38
{ impermanence, username, ... } : {
imports = [ impermanence.nixosModules.impermanence ];
environment.persistence."/persist" = {
hideMounts = true;
# required system directories
directories = [
"/var/lib/bluetooth" # bluetooth pairings
"/var/lib/fprint/${username}" # fingerprints
"/var/lib/iwd" # WiFi connections
"/var/lib/nixos"
"/var/lib/systemd"
"/var/lib/tailscale" # tailscale
];
# required system files
files = [
"/etc/machine-id"
];
users.${username} = {
# required user directories
directories = [
".cache"
".cargo"
".config/1Password"
".local/share"
".mozilla"
".ssh"
];
};
};
systemd.tmpfiles.rules = [
"d /persist/z 0700 ${username} ${username} -" # create a persisted "home" directory for `zogstrip`
];
}