about summary refs log tree commit diff
path: root/users/tazjin
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-06-28T08·22+0300
committertazjin <tazjin@tvl.su>2023-06-30T11·02+0000
commite28c2885c6f9dd989647db67685f2e0c82d08ebd (patch)
treedc5b7327e7f6e23b72348ec0ff4b59a0f4307696 /users/tazjin
parent12b979e41b6b639f058ba3634639a69840be4597 (diff)
refactor(tazjin/home): move persistence config into separate module r/6362
Change-Id: I1098e75f8b03dbb1c893fb7c43f0fe9926bb4861
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8876
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin')
-rw-r--r--users/tazjin/home/persistence.nix42
-rw-r--r--users/tazjin/home/shared.nix36
-rw-r--r--users/tazjin/home/tverskoy.nix1
-rw-r--r--users/tazjin/home/zamalek.nix1
4 files changed, 44 insertions, 36 deletions
diff --git a/users/tazjin/home/persistence.nix b/users/tazjin/home/persistence.nix
new file mode 100644
index 000000000000..9ea5ca8eb98d
--- /dev/null
+++ b/users/tazjin/home/persistence.nix
@@ -0,0 +1,42 @@
+# Persistence configuration for machines with throw-away setups.
+
+{ depot, pkgs, ... }: # readTree
+{ config, lib, ... }: # home-manager
+
+{
+  imports = [ (depot.third_party.sources.impermanence + "/home-manager.nix") ];
+
+  home.persistence."/persist/tazjin/home" = {
+    allowOther = true;
+
+    directories = [
+      ".cargo"
+      ".config/audacity"
+      ".config/chromium"
+      ".config/google-chrome"
+      ".config/quassel-irc.org"
+      ".config/syncthing"
+      ".config/unity3d"
+      ".electrum"
+      ".gnupg"
+      ".local/share/audacity"
+      ".local/share/direnv"
+      ".local/share/fish"
+      ".local/share/keyrings"
+      ".local/share/zoxide"
+      ".mozilla/firefox"
+      ".password-store"
+      ".rustup"
+      ".ssh"
+      ".steam"
+      ".telega"
+      ".thunderbird"
+      "go"
+      "mail"
+    ];
+
+    files = [
+      ".notmuch-config"
+    ];
+  };
+}
diff --git a/users/tazjin/home/shared.nix b/users/tazjin/home/shared.nix
index 5788f2aa8701..2baf4dade36e 100644
--- a/users/tazjin/home/shared.nix
+++ b/users/tazjin/home/shared.nix
@@ -4,42 +4,6 @@
 { config, lib, ... }: # home-manager
 
 {
-  imports = [ (depot.third_party.sources.impermanence + "/home-manager.nix") ];
-
-  home.persistence."/persist/tazjin/home" = {
-    allowOther = true;
-
-    directories = [
-      ".cargo"
-      ".config/audacity"
-      ".config/chromium"
-      ".config/google-chrome"
-      ".config/quassel-irc.org"
-      ".config/syncthing"
-      ".config/unity3d"
-      ".electrum"
-      ".gnupg"
-      ".local/share/audacity"
-      ".local/share/direnv"
-      ".local/share/fish"
-      ".local/share/keyrings"
-      ".local/share/zoxide"
-      ".mozilla/firefox"
-      ".password-store"
-      ".rustup"
-      ".ssh"
-      ".steam"
-      ".telega"
-      ".thunderbird"
-      "go"
-      "mail"
-    ];
-
-    files = [
-      ".notmuch-config"
-    ];
-  };
-
   home.activation.screenshots = lib.hm.dag.entryAnywhere ''
     $DRY_RUN_CMD mkdir -p $HOME/screenshots
   '';
diff --git a/users/tazjin/home/tverskoy.nix b/users/tazjin/home/tverskoy.nix
index d72734920ea6..6f1116340c09 100644
--- a/users/tazjin/home/tverskoy.nix
+++ b/users/tazjin/home/tverskoy.nix
@@ -6,6 +6,7 @@
 {
   imports = [
     depot.users.tazjin.home.shared
+    depot.users.tazjin.home.persistence
   ];
 
   home.persistence."/persist/tazjin/home" = {
diff --git a/users/tazjin/home/zamalek.nix b/users/tazjin/home/zamalek.nix
index 6bac67eb1c4d..d24de945bb28 100644
--- a/users/tazjin/home/zamalek.nix
+++ b/users/tazjin/home/zamalek.nix
@@ -6,5 +6,6 @@
 {
   imports = [
     depot.users.tazjin.home.shared
+    depot.users.tazjin.home.persistence
   ];
 }