about summary refs log tree commit diff
path: root/users/tazjin/nixos/modules/persistence.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-05-09T13·40+0200
committertazjin <tazjin@tvl.su>2022-05-10T13·41+0000
commit2b75ee689d1b66d200cd24c8749e82c46ccc694a (patch)
tree92769a582f1fdaa8d649e2c261020969d4805896 /users/tazjin/nixos/modules/persistence.nix
parent09f27d278d3777e6f9719805fd85a6cea6e37341 (diff)
refactor(users/tazjin): Extract non-home persistence config r/4043
This will be reused between machines.

Change-Id: Ice7835ce7e63b00284e046606309e882412cda26
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5547
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'users/tazjin/nixos/modules/persistence.nix')
-rw-r--r--users/tazjin/nixos/modules/persistence.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/users/tazjin/nixos/modules/persistence.nix b/users/tazjin/nixos/modules/persistence.nix
new file mode 100644
index 0000000000..c07ec9227c
--- /dev/null
+++ b/users/tazjin/nixos/modules/persistence.nix
@@ -0,0 +1,24 @@
+# Configuration for persistent (non-home) data.
+{ depot, pkgs, lib, ... }:
+
+{
+  imports = [
+    "${depot.third_party.impermanence}/nixos.nix"
+  ];
+
+  environment.persistence."/persist" = {
+    directories = [
+      "/etc/NetworkManager/system-connections"
+      "/etc/mullvad-vpn"
+      "/var/cache/mullvad-vpn"
+      "/var/lib/bluetooth"
+      "/var/lib/systemd/coredump"
+      "/var/lib/tailscale"
+      "/var/log"
+    ];
+
+    files = [
+      "/etc/machine-id"
+    ];
+  };
+}