aboutsummaryrefslogtreecommitdiffstats
path: root/system/impermanence
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 /system/impermanence
parentFeat(nix): Add settings (diff)
downloadnixos-config-62609ecba4373d6d89a39d7b5e7ca220ad869975.zip
Feat: Add impersistent for persistent files and dirs
Diffstat (limited to 'system/impermanence')
-rw-r--r--system/impermanence/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/system/impermanence/default.nix b/system/impermanence/default.nix
new file mode 100644
index 00000000..16ac3c47
--- /dev/null
+++ b/system/impermanence/default.nix
@@ -0,0 +1,45 @@
+{
+ config,
+ impermanence,
+ ...
+}: {
+ imports = [
+ impermanence.nixosModules.impermanence
+ ];
+
+ environment.persistence."/srv" = {
+ hideMounts = true;
+ directories = [
+ "/var/log"
+ # TODO this needs to be checked
+ #"/var/lib/bluetooth"
+ #"/var/lib/nixos"
+ #"/var/lib/systemd/coredump"
+ {
+ directory = "/var/lib/colord";
+ user = "colord";
+ group = "colord";
+ mode = "u=rwx,g=rx,o=";
+ }
+ ];
+ files = [
+ "/etc/machine-id"
+ {
+ file = "/etc/nix/id_rsa";
+ parentDirectory = {mode = "u=rwx,g=,o=";};
+ }
+ ];
+ users.soispha = {
+ home = "/srv/home/soispha"; # TODO link this to ${config.users.users.soispha.homeDirectory}
+ directories = [
+ ".local/share"
+ ".cache"
+
+ "media"
+ "repos"
+ "school"
+ ];
+ # TODO allowOther = true;
+ };
+ };
+}