From e28c2885c6f9dd989647db67685f2e0c82d08ebd Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 28 Jun 2023 11:22:35 +0300 Subject: refactor(tazjin/home): move persistence config into separate module Change-Id: I1098e75f8b03dbb1c893fb7c43f0fe9926bb4861 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8876 Reviewed-by: tazjin Tested-by: BuildkiteCI --- users/tazjin/home/persistence.nix | 42 +++++++++++++++++++++++++++++++++++++++ users/tazjin/home/shared.nix | 36 --------------------------------- users/tazjin/home/tverskoy.nix | 1 + users/tazjin/home/zamalek.nix | 1 + 4 files changed, 44 insertions(+), 36 deletions(-) create mode 100644 users/tazjin/home/persistence.nix (limited to 'users/tazjin/home') 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 ]; } -- cgit 1.4.1