summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix2
-rw-r--r--machines/_173-249-5-230/configuration.nix10
-rw-r--r--machines/lenovo/impermanence.nix26
-rw-r--r--users.nix32
4 files changed, 33 insertions, 37 deletions
diff --git a/flake.nix b/flake.nix
index ded0b74..692f9cc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -50,6 +50,7 @@
./machines/${machine.hostname}/configuration.nix
./users.nix
./secrets.nix
+ impermanence.nixosModules.impermanence
agenix.nixosModules.default
];
};
@@ -81,7 +82,6 @@
)
);
}
- impermanence.nixosModules.impermanence
noshell.nixosModules.default
]);
in {
diff --git a/machines/_173-249-5-230/configuration.nix b/machines/_173-249-5-230/configuration.nix
index d079fb6..e9fdf3d 100644
--- a/machines/_173-249-5-230/configuration.nix
+++ b/machines/_173-249-5-230/configuration.nix
@@ -21,16 +21,6 @@
"/etc/machine-id"
"/etc/ly/save.txt"
];
- users."mtgmonkey" = {
- directories = [
- ".local/share/zoxide"
- ".ssh"
- ];
- files = [
- ".bash_history"
- ".brush_history"
- ];
- };
};
i18n.defaultLocale = "de_DE.UTF-8";
networking = {
diff --git a/machines/lenovo/impermanence.nix b/machines/lenovo/impermanence.nix
index ced435e..2867ed5 100644
--- a/machines/lenovo/impermanence.nix
+++ b/machines/lenovo/impermanence.nix
@@ -15,31 +15,5 @@
"/etc/machine-id"
"/etc/ly/save.txt"
];
- users."andromeda" = {
- directories = [
- ".backups"
- ".local/share/Anki2"
- ".local/share/chat.fluffy.fluffychat"
- ".local/share/zoxide"
- ".ssh"
- "conf"
- "Downloads"
- "pp"
- ];
- files = [
- ".bash_history"
- ".brush_history"
- ];
- };
- users."mtgmonkey" = {
- directories = [
- ".local/share/zoxide"
- ".ssh"
- ];
- files = [
- ".bash_history"
- ".brush_history"
- ];
- };
};
}
diff --git a/users.nix b/users.nix
index 7902ca4..fa7366f 100644
--- a/users.nix
+++ b/users.nix
@@ -36,4 +36,36 @@ in {
];
};
};
+ environment.persistence."/nix/persist".users = lib.mkIf config.environment.persistence."/nix/persist".enable (
+ builtins.mapAttrs
+ (name: value: lib.mkIf (builtins.elem name machine.users) value)
+ {
+ "andromeda" = {
+ directories = [
+ ".backups"
+ ".local/share/Anki2"
+ ".local/share/chat.fluffy.fluffychat"
+ ".local/share.zoxide"
+ ".ssh"
+ "conf"
+ "Downloads"
+ "pp"
+ ];
+ files = [
+ ".bash_history"
+ ".brush_history"
+ ];
+ };
+ "mtgmonkey" = {
+ directories = [
+ ".local/share/zoxide"
+ ".ssh"
+ ];
+ files = [
+ ".bash_history"
+ ".brush_history"
+ ];
+ };
+ }
+ );
}