aboutsummaryrefslogtreecommitdiffstats
path: root/nixos/impermanence.nix
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2024-10-07 11:47:06 +0300
committergramanas <anastasis.gramm2@gmail.com>2024-10-07 11:47:06 +0300
commit4547e75868cba2a265b78661ddc386b5e81c1bb0 (patch)
tree71924feb573c8af5030080fc007eee7bfbaabb20 /nixos/impermanence.nix
downloadnix-4547e75868cba2a265b78661ddc386b5e81c1bb0.tar.gz
nix-4547e75868cba2a265b78661ddc386b5e81c1bb0.tar.bz2
nix-4547e75868cba2a265b78661ddc386b5e81c1bb0.zip
Diffstat (limited to 'nixos/impermanence.nix')
-rw-r--r--nixos/impermanence.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/nixos/impermanence.nix b/nixos/impermanence.nix
new file mode 100644
index 0000000..a2c32d9
--- /dev/null
+++ b/nixos/impermanence.nix
@@ -0,0 +1,48 @@
+{inputs, ...}: {
+ imports = [
+ inputs.impermanence.nixosModules.impermanence
+ ];
+
+ environment.persistence."/persist" = {
+ hideMounts = true;
+
+ directories = [
+ "/var/lib/bluetooth"
+ "/var/lib/fprint"
+ "/var/lib/nixos"
+ "/var/lib/systemd"
+ "/etc/NetworkManager/system-connections"
+ ];
+
+ files = [
+ # "/etc/machine-id"
+ ];
+
+ users.chen = {
+ directories = [
+ # XDG user directories
+ "Desktop"
+ "Documents"
+ "Downloads"
+ "Music"
+ "Pictures"
+ "Public"
+ "Templates"
+ "Videos"
+
+ # More directories
+ ".config/emacs"
+ ".local/share/Steam"
+ ".ssh"
+ ];
+
+ files = [
+ ".history"
+ ];
+ };
+ };
+
+ environment.etc.machine-id.text = "67803336e24344e9aa58ea47b51180d0";
+
+ programs.fuse.userAllowOther = true;
+}