about summary refs log tree commit diff stats
path: root/home-manager
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-16 17:36:26 +0100
committerene <ene@sils.li>2023-02-16 18:13:03 +0100
commit62609ecba4373d6d89a39d7b5e7ca220ad869975 (patch)
tree52ed2e8608d4eda8759707743989b6af40b08ee3 /home-manager
parentFeat(nix): Add settings (diff)
downloadnixos-config-62609ecba4373d6d89a39d7b5e7ca220ad869975.tar.gz
nixos-config-62609ecba4373d6d89a39d7b5e7ca220ad869975.zip
Feat: Add impersistent for persistent files and dirs
Diffstat (limited to '')
-rw-r--r--home-manager/default.nix4
-rw-r--r--home-manager/impermanence/default.nix25
2 files changed, 29 insertions, 0 deletions
diff --git a/home-manager/default.nix b/home-manager/default.nix
index 4969d565..c11b8d85 100644
--- a/home-manager/default.nix
+++ b/home-manager/default.nix
@@ -5,6 +5,7 @@
   home-manager,
   inputs,
   user_js,
+  impermanence,
   ...
 }: let
   # TODO actually use this in the user config
@@ -15,6 +16,9 @@
   dataHome = "${homeDirectory}/.local/share";
 in {
   imports = [
+# ./impermanence #  TODO doesn't work
+
+
     ./alacritty
     ./cups
     ./firefox
diff --git a/home-manager/impermanence/default.nix b/home-manager/impermanence/default.nix
new file mode 100644
index 00000000..bcb1c62f
--- /dev/null
+++ b/home-manager/impermanence/default.nix
@@ -0,0 +1,25 @@
+# vim: ts=2
+{
+  config,
+  impermanence,
+  ...
+}: {
+  import = [
+    impermanence.nixosModules.home-manager.impermanence
+  ];
+
+  home.persistence."/srv${config.home.homeDirectory}" = {
+    directories = [
+      ".local/share"
+      ".cache"
+
+      "media"
+      "repos"
+      "school"
+    ];
+    files = [
+      ".screenrc"
+    ];
+    allowOther = true;
+  };
+}