about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-20 10:12:35 +0100
committerene <ene@sils.li>2023-02-20 11:42:45 +0100
commit2e1fab3e13c557928313f022a7f48ff0ce55e251 (patch)
treea2a32757009a0a77c39b47098af1886bb3b7d38f
parentFix(system): Remove unnecessary persistent file (diff)
downloadnixos-config-2e1fab3e13c557928313f022a7f48ff0ce55e251.tar.gz
nixos-config-2e1fab3e13c557928313f022a7f48ff0ce55e251.zip
Fix(system): Refactor impermanence
-rw-r--r--home-manager/default.nix1
-rw-r--r--home-manager/impermanence/default.nix32
-rw-r--r--hosts/spawn/configuration.nix4
-rw-r--r--system/default.nix9
-rw-r--r--system/fileSystemLayouts/default.nix13
-rw-r--r--system/impermanence/default.nix22
6 files changed, 26 insertions, 55 deletions
diff --git a/home-manager/default.nix b/home-manager/default.nix
index 4f10b40f..bdbf50a6 100644
--- a/home-manager/default.nix
+++ b/home-manager/default.nix
@@ -16,6 +16,7 @@
   dataHome = "${homeDirectory}/.local/share";
 in {
   imports = [
+    inputs.impermanence.nixosModules.home-manager.impermanence
     ./impermanence
     ./packages
     ./config
diff --git a/home-manager/impermanence/default.nix b/home-manager/impermanence/default.nix
index d4654c37..7a542ffa 100644
--- a/home-manager/impermanence/default.nix
+++ b/home-manager/impermanence/default.nix
@@ -5,22 +5,18 @@
   ...
 }: {
   # TODO use this instead of the root config
-  #  import = [
-  #    impermanence.nixosModules.home-manager.impermanence
-  #  ];
-  #
-  #  home.persistence."/srv${config.home.homeDirectory}" = {
-  #    directories = [
-  #      ".local/share"
-  #      ".cache"
-  #
-  #      "media"
-  #      "repos"
-  #      "school"
-  #    ];
-  #    files = [
-  #      ".screenrc"
-  #    ];
-  #    allowOther = true;
-  #  };
+
+  nixosConfig.home.persistence."/srv/home/soispha" = {
+    allowOther = true;
+    directories = [
+      ".local/share"
+      ".cache"
+
+      "media"
+      "repos"
+      "school"
+    ];
+    files = [
+    ];
+  };
 }
diff --git a/hosts/spawn/configuration.nix b/hosts/spawn/configuration.nix
index 88e38d35..e7739e3d 100644
--- a/hosts/spawn/configuration.nix
+++ b/hosts/spawn/configuration.nix
@@ -6,8 +6,8 @@
 
     ../../system
 
-
-#../../services
+    # TODO ?
+    ../../services
   ];
 
   system.stateVersion = "23.05";
diff --git a/system/default.nix b/system/default.nix
index f94ba34f..34bc8b4b 100644
--- a/system/default.nix
+++ b/system/default.nix
@@ -1,9 +1,4 @@
-{
-  config,
-  pkgs,
-  shell-library,
-  ...
-}: {
+{...}: {
   imports = [
     ./boot
     ./users # this needs to be before fileSystemLayouts
@@ -11,7 +6,7 @@
     ./font
     ./impermanence
     ./locale
-#./packages
+    #./packages
     ./sound
   ];
 }
diff --git a/system/fileSystemLayouts/default.nix b/system/fileSystemLayouts/default.nix
index e4062ffe..cdc59b4e 100644
--- a/system/fileSystemLayouts/default.nix
+++ b/system/fileSystemLayouts/default.nix
@@ -47,13 +47,12 @@ in {
         device = cfg.efiDisk;
         fsType = "vfat";
       };
-
-      # This results in infinite recursion, don't ask my why
-      #      "${config.users.users.soispha.home}/.config" = {
-      #        device = "none";
-      #        fsType = "tmpfs";
-      #        options = ["defaults" "size=1G" "mode=755"];
-      #      };
+      fileSystems."${config.users.users.soispha.home}" = {
+        # fileSystems."/home/sopipha" = {
+        device = "none";
+        fsType = "tmpfs"; # Can be stored on normal drive or on tmpfs as well
+        options = ["defaults" "size=4G" "mode=755"];
+      };
     };
     swapDevices = [];
   };
diff --git a/system/impermanence/default.nix b/system/impermanence/default.nix
index 1909623b..1d330fd9 100644
--- a/system/impermanence/default.nix
+++ b/system/impermanence/default.nix
@@ -1,8 +1,4 @@
-{
-  config,
-  impermanence,
-  ...
-}: {
+{impermanence, ...}: {
   imports = [
     impermanence.nixosModules.impermanence
   ];
@@ -19,23 +15,7 @@
       ];
       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;
-      };
     };
     "/srv/nixos-config" = {
       directories = [