From 5d055c6a88ac087661cb805fb487a1c9219b3063 Mon Sep 17 00:00:00 2001
From: Eve Halfmann <evesnrobins@gmail.com>
Date: Sun, 1 Jun 2025 16:20:33 +0000
Subject: [PATCH 01/51] updated git username

---
 configurations/home-manager/eve/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configurations/home-manager/eve/default.nix b/configurations/home-manager/eve/default.nix
index 4e1d6fd..d3dda26 100644
--- a/configurations/home-manager/eve/default.nix
+++ b/configurations/home-manager/eve/default.nix
@@ -76,7 +76,7 @@ in {
 
     git = {
       enable = true;
-      userName = "Eve Halfmann";
+      userName = "Eve";
       userEmail = "evesnrobins@gmail.com";
       extraConfig.init.defaultBranch = "main";
     };

From 327a5ce55fa9af2442845cad14662db95ee7aa6f Mon Sep 17 00:00:00 2001
From: Eve <evesnrobins@gmail.com>
Date: Sun, 1 Jun 2025 16:31:08 +0000
Subject: [PATCH 02/51] added vscodium

---
 configurations/home-manager/eve/default.nix | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/configurations/home-manager/eve/default.nix b/configurations/home-manager/eve/default.nix
index d3dda26..7dedb68 100644
--- a/configurations/home-manager/eve/default.nix
+++ b/configurations/home-manager/eve/default.nix
@@ -80,6 +80,11 @@ in {
       userEmail = "evesnrobins@gmail.com";
       extraConfig.init.defaultBranch = "main";
     };
+    
+    vscode = {
+      enable = true;
+      package = pkgs.vscodium;
+    };
 
     openssh = {
       hostKeys = [

From c54210411d5f6c5097adb0c96f1f31d9db00649f Mon Sep 17 00:00:00 2001
From: Eve <evesnrobins@gmail.com>
Date: Sun, 1 Jun 2025 11:59:56 -0500
Subject: [PATCH 03/51] added steam + dependencies

---
 configurations/nixos/emergent/configuration.nix | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/configurations/nixos/emergent/configuration.nix b/configurations/nixos/emergent/configuration.nix
index a880ef5..4325eb3 100644
--- a/configurations/nixos/emergent/configuration.nix
+++ b/configurations/nixos/emergent/configuration.nix
@@ -80,6 +80,8 @@
 
   # programs.firefox.enable = true;
 
+  nixpkgs.config.allowUnfree = true;
+
   # List packages installed in system profile.
   # You can use https://search.nixos.org/ to find more packages (and options).
   # environment.systemPackages = with pkgs; [
@@ -87,6 +89,13 @@
   #   wget
   # ];
 
+  programs.steam = {
+    enable = true;
+    remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
+    dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
+    localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
+  };
+
   # Some programs need SUID wrappers, can be configured further or are
   # started in user sessions.
   # programs.mtr.enable = true;

From 7acf6a1c13935a5a5b4fb8b4a078697bf322dca3 Mon Sep 17 00:00:00 2001
From: Eve <evesnrobins@gmail.com>
Date: Sun, 1 Jun 2025 12:22:42 -0500
Subject: [PATCH 04/51] added nvidia-drivers as a seperate file and imported to
 config file

---
 .../nixos/emergent/configuration.nix          |  1 +
 .../nixos/emergent/nvidia-drivers.nix         | 42 +++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 configurations/nixos/emergent/nvidia-drivers.nix

diff --git a/configurations/nixos/emergent/configuration.nix b/configurations/nixos/emergent/configuration.nix
index 4325eb3..389dfe5 100644
--- a/configurations/nixos/emergent/configuration.nix
+++ b/configurations/nixos/emergent/configuration.nix
@@ -8,6 +8,7 @@
   ...
 }: {
   imports = [
+    ./nvidia-drivers.nix
   ];
 
   # Use the systemd-boot EFI boot loader.
diff --git a/configurations/nixos/emergent/nvidia-drivers.nix b/configurations/nixos/emergent/nvidia-drivers.nix
new file mode 100644
index 0000000..4df1b67
--- /dev/null
+++ b/configurations/nixos/emergent/nvidia-drivers.nix
@@ -0,0 +1,42 @@
+{ config, lib, pkgs, ... }:
+{
+
+  # Enable OpenGL
+  hardware.graphics = {
+    enable = true;
+  };
+
+  # Load nvidia driver for Xorg and Wayland
+  services.xserver.videoDrivers = ["nvidia"];
+
+  hardware.nvidia = {
+
+    # Modesetting is required.
+    modesetting.enable = true;
+
+    # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
+    # Enable this if you have graphical corruption issues or application crashes after waking
+    # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead 
+    # of just the bare essentials.
+    powerManagement.enable = false;
+
+    # Fine-grained power management. Turns off GPU when not in use.
+    # Experimental and only works on modern Nvidia GPUs (Turing or newer).
+    powerManagement.finegrained = false;
+
+    # Use the NVidia open source kernel module (not to be confused with the
+    # independent third-party "nouveau" open source driver).
+    # Support is limited to the Turing and later architectures. Full list of 
+    # supported GPUs is at: 
+    # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus 
+    # Only available from driver 515.43.04+
+    open = false;
+
+    # Enable the Nvidia settings menu,
+	# accessible via `nvidia-settings`.
+    nvidiaSettings = true;
+
+    # Optionally, you may need to select the appropriate driver version for your specific GPU.
+    package = config.boot.kernelPackages.nvidiaPackages.stable;
+  };
+ }
\ No newline at end of file

From 2820252c54f9b5bac43d09e280c48baaaf45657d Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 13:00:34 -0500
Subject: [PATCH 05/51] made leyla configs optional

---
 configurations/home-manager/eve/default.nix   |   2 +-
 configurations/home-manager/leyla/default.nix |  45 +-
 configurations/home-manager/leyla/firefox.nix | 623 +++++++++---------
 .../home-manager/leyla/packages.nix           |  72 +-
 .../home-manager/leyla/vscode/default.nix     | 185 +++---
 .../nixos/emergent/nvidia-drivers.nix         |  20 +-
 6 files changed, 477 insertions(+), 470 deletions(-)

diff --git a/configurations/home-manager/eve/default.nix b/configurations/home-manager/eve/default.nix
index 7dedb68..b2ae492 100644
--- a/configurations/home-manager/eve/default.nix
+++ b/configurations/home-manager/eve/default.nix
@@ -80,7 +80,7 @@ in {
       userEmail = "evesnrobins@gmail.com";
       extraConfig.init.defaultBranch = "main";
     };
-    
+
     vscode = {
       enable = true;
       package = pkgs.vscodium;
diff --git a/configurations/home-manager/leyla/default.nix b/configurations/home-manager/leyla/default.nix
index 0c90ab1..90251a3 100644
--- a/configurations/home-manager/leyla/default.nix
+++ b/configurations/home-manager/leyla/default.nix
@@ -1,8 +1,4 @@
-{
-  osConfig,
-  config,
-  ...
-}: {
+{osConfig, ...}: {
   imports = [
     ./i18n.nix
     ./packages.nix
@@ -108,44 +104,5 @@
         };
       };
     };
-
-    programs = {
-      # Let Home Manager install and manage itself.
-      home-manager.enable = true;
-
-      # set up git defaults
-      git = {
-        enable = true;
-        userName = "Leyla Becker";
-        userEmail = "git@jan-leila.com";
-        extraConfig.init.defaultBranch = "main";
-      };
-
-      # add direnv to auto load flakes for development
-      direnv = {
-        enable = true;
-        enableBashIntegration = true;
-        nix-direnv.enable = true;
-        config = {
-          global.hide_env_diff = true;
-          whitelist.exact = ["/home/leyla/documents/code/nix-config"];
-        };
-      };
-      bash.enable = true;
-
-      openssh = {
-        authorizedKeys = [
-          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon"
-          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIILimFIW2exEH/Xo7LtXkqgE04qusvnPNpPWSCeNrFkP leyla@defiant"
-          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKBiZkg1c2aaNHiieBX4cEziqvJVj9pcDfzUrKU/mO0I leyla@twilight"
-        ];
-        hostKeys = [
-          {
-            type = "ed25519";
-            path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
-          }
-        ];
-      };
-    };
   };
 }
diff --git a/configurations/home-manager/leyla/firefox.nix b/configurations/home-manager/leyla/firefox.nix
index 4f8c624..0adea28 100644
--- a/configurations/home-manager/leyla/firefox.nix
+++ b/configurations/home-manager/leyla/firefox.nix
@@ -2,340 +2,345 @@
   lib,
   pkgs,
   inputs,
+  osConfig,
   ...
-}: {
-  programs.firefox = {
-    enable = true;
-    profiles.leyla = {
-      settings = {
-        "browser.search.defaultenginename" = "Searx";
-        "browser.search.order.1" = "Searx";
-      };
+}: let
+  is-desktop-user = osConfig.host.users.leyla.isDesktopUser;
+in {
+  config = lib.mkIf is-desktop-user {
+    programs.firefox = {
+      enable = true;
+      profiles.leyla = {
+        settings = {
+          "browser.search.defaultenginename" = "Searx";
+          "browser.search.order.1" = "Searx";
+        };
 
-      search = {
-        force = true;
-        default = "Searx";
-        engines = {
-          "Nix Packages" = {
-            urls = [
-              {
-                template = "https://search.nixos.org/packages";
-                params = [
-                  {
-                    name = "type";
-                    value = "packages";
-                  }
-                  {
-                    name = "query";
-                    value = "{searchTerms}";
-                  }
-                ];
-              }
-            ];
-            icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
-            definedAliases = ["@np"];
-          };
-          "NixOS Wiki" = {
-            urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}];
-            icon = "https://nixos.wiki/favicon.png";
-            updateInterval = 24 * 60 * 60 * 1000; # every day
-            definedAliases = ["@nw"];
-          };
-          "Searx" = {
-            urls = [{template = "https://search.jan-leila.com/?q={searchTerms}";}];
-            icon = "https://nixos.wiki/favicon.png";
-            updateInterval = 24 * 60 * 60 * 1000; # every day
-            definedAliases = ["@searx"];
+        search = {
+          force = true;
+          default = "Searx";
+          engines = {
+            "Nix Packages" = {
+              urls = [
+                {
+                  template = "https://search.nixos.org/packages";
+                  params = [
+                    {
+                      name = "type";
+                      value = "packages";
+                    }
+                    {
+                      name = "query";
+                      value = "{searchTerms}";
+                    }
+                  ];
+                }
+              ];
+              icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+              definedAliases = ["@np"];
+            };
+            "NixOS Wiki" = {
+              urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}];
+              icon = "https://nixos.wiki/favicon.png";
+              updateInterval = 24 * 60 * 60 * 1000; # every day
+              definedAliases = ["@nw"];
+            };
+            "Searx" = {
+              urls = [{template = "https://search.jan-leila.com/?q={searchTerms}";}];
+              icon = "https://nixos.wiki/favicon.png";
+              updateInterval = 24 * 60 * 60 * 1000; # every day
+              definedAliases = ["@searx"];
+            };
           };
         };
-      };
 
-      extensions.packages = with inputs.firefox-addons.packages.${pkgs.system}; [
-        bitwarden
-        terms-of-service-didnt-read
-        multi-account-containers
-        shinigami-eyes
+        extensions.packages = with inputs.firefox-addons.packages.${pkgs.system}; [
+          bitwarden
+          terms-of-service-didnt-read
+          multi-account-containers
+          shinigami-eyes
 
-        ublock-origin
-        sponsorblock
-        dearrow
-        df-youtube
-        return-youtube-dislikes
+          ublock-origin
+          sponsorblock
+          dearrow
+          df-youtube
+          return-youtube-dislikes
 
-        privacy-badger
-        decentraleyes
-        clearurls
-        localcdn
+          privacy-badger
+          decentraleyes
+          clearurls
+          localcdn
 
-        snowflake
+          snowflake
 
-        deutsch-de-language-pack
-        dictionary-german
+          deutsch-de-language-pack
+          dictionary-german
 
-        # (
-        #   buildFirefoxXpiAddon rec {
-        #     pname = "italiano-it-language-pack";
-        #     version = "132.0.20241110.231641";
-        #     addonId = "langpack-it@firefox.mozilla.org";
-        #     url = "https://addons.mozilla.org/firefox/downloads/file/4392453/italiano_it_language_pack-${version}.xpi";
-        #     sha256 = "";
-        #     meta = with lib;
-        #     {
-        #       description = "Firefox Language Pack for Italiano (it) – Italian";
-        #       license = licenses.mpl20;
-        #       mozPermissions = [];
-        #       platforms = platforms.all;
-        #     };
-        #   }
-        # )
-        # (
-        #   buildFirefoxXpiAddon rec {
-        #     pname = "dizionario-italiano";
-        #     version = "5.1";
-        #     addonId = "it-IT@dictionaries.addons.mozilla.org";
-        #     url = "https://addons.mozilla.org/firefox/downloads/file/1163874/dizionario_italiano-${version}.xpi";
-        #     sha256 = "";
-        #     meta = with lib;
-        #     {
-        #       description = "Add support for Italian to spellchecking";
-        #       license = licenses.gpl3;
-        #       mozPermissions = [];
-        #       platforms = platforms.all;
-        #     };
-        #   }
-        # )
-      ];
+          # (
+          #   buildFirefoxXpiAddon rec {
+          #     pname = "italiano-it-language-pack";
+          #     version = "132.0.20241110.231641";
+          #     addonId = "langpack-it@firefox.mozilla.org";
+          #     url = "https://addons.mozilla.org/firefox/downloads/file/4392453/italiano_it_language_pack-${version}.xpi";
+          #     sha256 = "";
+          #     meta = with lib;
+          #     {
+          #       description = "Firefox Language Pack for Italiano (it) – Italian";
+          #       license = licenses.mpl20;
+          #       mozPermissions = [];
+          #       platforms = platforms.all;
+          #     };
+          #   }
+          # )
+          # (
+          #   buildFirefoxXpiAddon rec {
+          #     pname = "dizionario-italiano";
+          #     version = "5.1";
+          #     addonId = "it-IT@dictionaries.addons.mozilla.org";
+          #     url = "https://addons.mozilla.org/firefox/downloads/file/1163874/dizionario_italiano-${version}.xpi";
+          #     sha256 = "";
+          #     meta = with lib;
+          #     {
+          #       description = "Add support for Italian to spellchecking";
+          #       license = licenses.gpl3;
+          #       mozPermissions = [];
+          #       platforms = platforms.all;
+          #     };
+          #   }
+          # )
+        ];
 
-      settings = {
-        # Disable irritating first-run stuff
-        "browser.disableResetPrompt" = true;
-        "browser.download.panel.shown" = true;
-        "browser.feeds.showFirstRunUI" = false;
-        "browser.messaging-system.whatsNewPanel.enabled" = false;
-        "browser.rights.3.shown" = true;
-        "browser.shell.checkDefaultBrowser" = false;
-        "browser.shell.defaultBrowserCheckCount" = 1;
-        "browser.startup.homepage_override.mstone" = "ignore";
-        "browser.uitour.enabled" = false;
-        "startup.homepage_override_url" = "";
-        "trailhead.firstrun.didSeeAboutWelcome" = true;
-        "browser.bookmarks.restore_default_bookmarks" = false;
-        "browser.bookmarks.addedImportButton" = true;
-        "browser.newtabpage.activity-stream.feeds.section.topstories" = false;
+        settings = {
+          # Disable irritating first-run stuff
+          "browser.disableResetPrompt" = true;
+          "browser.download.panel.shown" = true;
+          "browser.feeds.showFirstRunUI" = false;
+          "browser.messaging-system.whatsNewPanel.enabled" = false;
+          "browser.rights.3.shown" = true;
+          "browser.shell.checkDefaultBrowser" = false;
+          "browser.shell.defaultBrowserCheckCount" = 1;
+          "browser.startup.homepage_override.mstone" = "ignore";
+          "browser.uitour.enabled" = false;
+          "startup.homepage_override_url" = "";
+          "trailhead.firstrun.didSeeAboutWelcome" = true;
+          "browser.bookmarks.restore_default_bookmarks" = false;
+          "browser.bookmarks.addedImportButton" = true;
+          "browser.newtabpage.activity-stream.feeds.section.topstories" = false;
 
-        # Usage Experience
-        "browser.startup.homepage" = "about:home";
-        "browser.download.useDownloadDir" = false;
-        "browser.uiCustomization.state" = builtins.toJSON {
-          "currentVersion" = 20;
-          "newElementCount" = 6;
-          "dirtyAreaCache" = [
-            "nav-bar"
-            "PersonalToolbar"
-            "toolbar-menubar"
-            "TabsToolbar"
-            "unified-extensions-area"
-            "vertical-tabs"
-          ];
-          "placements" = {
-            "widget-overflow-fixed-list" = [];
-            "unified-extensions-area" = [
+          # Usage Experience
+          "browser.startup.homepage" = "about:home";
+          "browser.download.useDownloadDir" = false;
+          "browser.uiCustomization.state" = builtins.toJSON {
+            "currentVersion" = 20;
+            "newElementCount" = 6;
+            "dirtyAreaCache" = [
+              "nav-bar"
+              "PersonalToolbar"
+              "toolbar-menubar"
+              "TabsToolbar"
+              "unified-extensions-area"
+              "vertical-tabs"
+            ];
+            "placements" = {
+              "widget-overflow-fixed-list" = [];
+              "unified-extensions-area" = [
+                "privacy_privacy_com-browser-action"
+                # bitwarden
+                "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
+                "ublock0_raymondhill_net-browser-action"
+                "sponsorblocker_ajay_app-browser-action"
+                "dearrow_ajay_app-browser-action"
+                "jid1-mnnxcxisbpnsxq_jetpack-browser-action"
+                "_testpilot-containers-browser-action"
+                "addon_simplelogin-browser-action"
+                "_74145f27-f039-47ce-a470-a662b129930a_-browser-action"
+                "jid1-bofifl9vbdl2zq_jetpack-browser-action"
+                "dfyoutube_example_com-browser-action"
+                "_b86e4813-687a-43e6-ab65-0bde4ab75758_-browser-action"
+                "_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action"
+                "_b11bea1f-a888-4332-8d8a-cec2be7d24b9_-browse-action"
+                "jid0-3guet1r69sqnsrca5p8kx9ezc3u_jetpack-browser-action"
+              ];
+              "nav-bar" = [
+                "back-button"
+                "forward-button"
+                "stop-reload-button"
+                "urlbar-container"
+                "downloads-button"
+                "unified-extensions-button"
+                "reset-pbm-toolbar-button"
+              ];
+              "toolbar-menubar" = [
+                "menubar-items"
+              ];
+              "TabsToolbar" = [
+                "firefox-view-button"
+                "tabbrowser-tabs"
+                "new-tab-button"
+                "alltabs-button"
+              ];
+              "vertical-tabs" = [];
+              "PersonalToolbar" = [
+                "import-button"
+                "personal-bookmarks"
+              ];
+            };
+            "seen" = [
+              "save-to-pocket-button"
+              "developer-button"
               "privacy_privacy_com-browser-action"
-              # bitwarden
-              "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
-              "ublock0_raymondhill_net-browser-action"
               "sponsorblocker_ajay_app-browser-action"
-              "dearrow_ajay_app-browser-action"
-              "jid1-mnnxcxisbpnsxq_jetpack-browser-action"
-              "_testpilot-containers-browser-action"
+              "ublock0_raymondhill_net-browser-action"
               "addon_simplelogin-browser-action"
+              "dearrow_ajay_app-browser-action"
+              "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
               "_74145f27-f039-47ce-a470-a662b129930a_-browser-action"
               "jid1-bofifl9vbdl2zq_jetpack-browser-action"
               "dfyoutube_example_com-browser-action"
+              "_testpilot-containers-browser-action"
               "_b86e4813-687a-43e6-ab65-0bde4ab75758_-browser-action"
+              "jid1-mnnxcxisbpnsxq_jetpack-browser-action"
               "_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action"
-              "_b11bea1f-a888-4332-8d8a-cec2be7d24b9_-browse-action"
+              "_b11bea1f-a888-4332-8d8a-cec2be7d24b9_-browser-action"
               "jid0-3guet1r69sqnsrca5p8kx9ezc3u_jetpack-browser-action"
             ];
-            "nav-bar" = [
-              "back-button"
-              "forward-button"
-              "stop-reload-button"
-              "urlbar-container"
-              "downloads-button"
-              "unified-extensions-button"
-              "reset-pbm-toolbar-button"
-            ];
-            "toolbar-menubar" = [
-              "menubar-items"
-            ];
-            "TabsToolbar" = [
-              "firefox-view-button"
-              "tabbrowser-tabs"
-              "new-tab-button"
-              "alltabs-button"
-            ];
-            "vertical-tabs" = [];
-            "PersonalToolbar" = [
-              "import-button"
-              "personal-bookmarks"
-            ];
           };
-          "seen" = [
-            "save-to-pocket-button"
-            "developer-button"
-            "privacy_privacy_com-browser-action"
-            "sponsorblocker_ajay_app-browser-action"
-            "ublock0_raymondhill_net-browser-action"
-            "addon_simplelogin-browser-action"
-            "dearrow_ajay_app-browser-action"
-            "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
-            "_74145f27-f039-47ce-a470-a662b129930a_-browser-action"
-            "jid1-bofifl9vbdl2zq_jetpack-browser-action"
-            "dfyoutube_example_com-browser-action"
-            "_testpilot-containers-browser-action"
-            "_b86e4813-687a-43e6-ab65-0bde4ab75758_-browser-action"
-            "jid1-mnnxcxisbpnsxq_jetpack-browser-action"
-            "_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action"
-            "_b11bea1f-a888-4332-8d8a-cec2be7d24b9_-browser-action"
-            "jid0-3guet1r69sqnsrca5p8kx9ezc3u_jetpack-browser-action"
+          "browser.newtabpage.activity-stream.feeds.topsites" = false;
+          "browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
+          "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false;
+          "browser.newtabpage.blocked" = lib.genAttrs [
+            # Facebook
+            "4gPpjkxgZzXPVtuEoAL9Ig=="
+            # Reddit
+            "gLv0ja2RYVgxKdp0I5qwvA=="
+            # Amazon
+            "K00ILysCaEq8+bEqV/3nuw=="
+            # Twitter
+            "T9nJot5PurhJSy8n038xGA=="
+          ] (_: 1);
+          "identity.fxaccounts.enabled" = false;
+
+          # Security
+          "privacy.trackingprotection.enabled" = true;
+          "dom.security.https_only_mode" = true;
+
+          "extensions.formautofill.addresses.enabled" = false;
+          "extensions.formautofill.creditCards.enabled" = false;
+          "signon.rememberSignons" = false;
+          "privacy.sanitize.sanitizeOnShutdown" = true;
+          "privacy.clearOnShutdown_v2.cache" = true;
+          "privacy.clearOnShutdown_v2.cookiesAndStorage" = true;
+          "privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = true;
+          "urlclassifier.trackingSkipURLs" = "";
+          "urlclassifier.features.socialtracking.skipURLs" = "";
+          "dom.security.https_only_mode_pbm" = true;
+          "dom.security.https_only_mode_error_page_user_suggestions" = true;
+
+          # Disable telemetry
+          "app.shield.optoutstudies.enabled" = false;
+          "browser.discovery.enabled" = false;
+          "browser.newtabpage.activity-stream.feeds.telemetry" = false;
+          "browser.newtabpage.activity-stream.telemetry" = false;
+          "browser.ping-centre.telemetry" = false;
+          "datareporting.healthreport.service.enabled" = false;
+          "datareporting.healthreport.uploadEnabled" = false;
+          "datareporting.policy.dataSubmissionEnabled" = false;
+          "datareporting.sessions.current.clean" = true;
+          "devtools.onboarding.telemetry.logged" = false;
+          "toolkit.telemetry.archive.enabled" = false;
+          "toolkit.telemetry.bhrPing.enabled" = false;
+          "toolkit.telemetry.enabled" = false;
+          "toolkit.telemetry.firstShutdownPing.enabled" = false;
+          "toolkit.telemetry.hybridContent.enabled" = false;
+          "toolkit.telemetry.newProfilePing.enabled" = false;
+          "toolkit.telemetry.prompted" = 2;
+          "toolkit.telemetry.rejected" = true;
+          "toolkit.telemetry.reportingpolicy.firstRun" = false;
+          "toolkit.telemetry.server" = "";
+          "toolkit.telemetry.shutdownPingSender.enabled" = false;
+          "toolkit.telemetry.unified" = false;
+          "toolkit.telemetry.unifiedIsOptIn" = false;
+          "toolkit.telemetry.updatePing.enabled" = false;
+        };
+
+        bookmarks = {
+          force = true;
+          settings = [
+            {
+              name = "Media";
+              url = "https://media.jan-leila.com/";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Photos";
+              url = "https://photos.jan-leila.com";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Git";
+              url = "https://git.jan-leila.com/";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Home Automation";
+              url = "https://home.jan-leila.com/";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Mail";
+              url = "https://mail.protonmail.com";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Open Street Map";
+              url = "https://www.openstreetmap.org/";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Password Manager";
+              url = "https://vault.bitwarden.com/";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Mastodon";
+              url = "https://mspsocial.net";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Linked In";
+              url = "https://www.linkedin.com/";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "Job Search";
+              url = "https://www.jobsinnetwork.com/?state=cleaned_history&language%5B%5D=en&query=react&locations.countryCode%5B%5D=IT&locations.countryCode%5B%5D=DE&locations.countryCode%5B%5D=NL&experience%5B%5D=medior&experience%5B%5D=junior&page=1";
+              keyword = "";
+              tags = [""];
+            }
+            {
+              name = "React Docs";
+              url = "https://react.dev/";
+              keyword = "";
+              tags = [""];
+            }
+            # Template
+            # {
+            #   name = "";
+            #   url = "";
+            #   keyword = "";
+            #   tags = [""];
+            # }
           ];
         };
-        "browser.newtabpage.activity-stream.feeds.topsites" = false;
-        "browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
-        "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false;
-        "browser.newtabpage.blocked" = lib.genAttrs [
-          # Facebook
-          "4gPpjkxgZzXPVtuEoAL9Ig=="
-          # Reddit
-          "gLv0ja2RYVgxKdp0I5qwvA=="
-          # Amazon
-          "K00ILysCaEq8+bEqV/3nuw=="
-          # Twitter
-          "T9nJot5PurhJSy8n038xGA=="
-        ] (_: 1);
-        "identity.fxaccounts.enabled" = false;
-
-        # Security
-        "privacy.trackingprotection.enabled" = true;
-        "dom.security.https_only_mode" = true;
-
-        "extensions.formautofill.addresses.enabled" = false;
-        "extensions.formautofill.creditCards.enabled" = false;
-        "signon.rememberSignons" = false;
-        "privacy.sanitize.sanitizeOnShutdown" = true;
-        "privacy.clearOnShutdown_v2.cache" = true;
-        "privacy.clearOnShutdown_v2.cookiesAndStorage" = true;
-        "privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = true;
-        "urlclassifier.trackingSkipURLs" = "";
-        "urlclassifier.features.socialtracking.skipURLs" = "";
-        "dom.security.https_only_mode_pbm" = true;
-        "dom.security.https_only_mode_error_page_user_suggestions" = true;
-
-        # Disable telemetry
-        "app.shield.optoutstudies.enabled" = false;
-        "browser.discovery.enabled" = false;
-        "browser.newtabpage.activity-stream.feeds.telemetry" = false;
-        "browser.newtabpage.activity-stream.telemetry" = false;
-        "browser.ping-centre.telemetry" = false;
-        "datareporting.healthreport.service.enabled" = false;
-        "datareporting.healthreport.uploadEnabled" = false;
-        "datareporting.policy.dataSubmissionEnabled" = false;
-        "datareporting.sessions.current.clean" = true;
-        "devtools.onboarding.telemetry.logged" = false;
-        "toolkit.telemetry.archive.enabled" = false;
-        "toolkit.telemetry.bhrPing.enabled" = false;
-        "toolkit.telemetry.enabled" = false;
-        "toolkit.telemetry.firstShutdownPing.enabled" = false;
-        "toolkit.telemetry.hybridContent.enabled" = false;
-        "toolkit.telemetry.newProfilePing.enabled" = false;
-        "toolkit.telemetry.prompted" = 2;
-        "toolkit.telemetry.rejected" = true;
-        "toolkit.telemetry.reportingpolicy.firstRun" = false;
-        "toolkit.telemetry.server" = "";
-        "toolkit.telemetry.shutdownPingSender.enabled" = false;
-        "toolkit.telemetry.unified" = false;
-        "toolkit.telemetry.unifiedIsOptIn" = false;
-        "toolkit.telemetry.updatePing.enabled" = false;
-      };
-
-      bookmarks = {
-        force = true;
-        settings = [
-          {
-            name = "Media";
-            url = "https://media.jan-leila.com/";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Photos";
-            url = "https://photos.jan-leila.com";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Git";
-            url = "https://git.jan-leila.com/";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Home Automation";
-            url = "https://home.jan-leila.com/";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Mail";
-            url = "https://mail.protonmail.com";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Open Street Map";
-            url = "https://www.openstreetmap.org/";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Password Manager";
-            url = "https://vault.bitwarden.com/";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Mastodon";
-            url = "https://mspsocial.net";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Linked In";
-            url = "https://www.linkedin.com/";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "Job Search";
-            url = "https://www.jobsinnetwork.com/?state=cleaned_history&language%5B%5D=en&query=react&locations.countryCode%5B%5D=IT&locations.countryCode%5B%5D=DE&locations.countryCode%5B%5D=NL&experience%5B%5D=medior&experience%5B%5D=junior&page=1";
-            keyword = "";
-            tags = [""];
-          }
-          {
-            name = "React Docs";
-            url = "https://react.dev/";
-            keyword = "";
-            tags = [""];
-          }
-          # Template
-          # {
-          #   name = "";
-          #   url = "";
-          #   keyword = "";
-          #   tags = [""];
-          # }
-        ];
       };
     };
   };
diff --git a/configurations/home-manager/leyla/packages.nix b/configurations/home-manager/leyla/packages.nix
index 13263ea..e9ab230 100644
--- a/configurations/home-manager/leyla/packages.nix
+++ b/configurations/home-manager/leyla/packages.nix
@@ -1,5 +1,6 @@
 {
   lib,
+  config,
   osConfig,
   pkgs,
   ...
@@ -12,22 +13,22 @@ in {
     ./firefox.nix
   ];
 
-  nixpkgs.config = {
-    allowUnfree = true;
-  };
+  config = lib.mkMerge [
+    (lib.mkIf userConfig.isTerminalUser {
+      home.packages = with pkgs; [
+        # command line tools
+        sox
+        yt-dlp
+        ffmpeg
+        imagemagick
+      ];
+    })
+    (lib.mkIf userConfig.isDesktopUser {
+      nixpkgs.config = {
+        allowUnfree = true;
+      };
 
-  home = {
-    packages =
-      lib.lists.optionals userConfig.isTerminalUser (
-        with pkgs; [
-          # command line tools
-          sox
-          yt-dlp
-          ffmpeg
-          imagemagick
-        ]
-      )
-      ++ (
+      home.packages = (
         lib.lists.optionals userConfig.isDesktopUser (
           (with pkgs; [
             # helvetica font
@@ -91,5 +92,44 @@ in {
           )
         )
       );
-  };
+      programs = lib.mkIf userConfig.isDesktopUser {
+        # Let Home Manager install and manage itself.
+        home-manager.enable = true;
+
+        # set up git defaults
+        git = {
+          enable = true;
+          userName = "Leyla Becker";
+          userEmail = "git@jan-leila.com";
+          extraConfig.init.defaultBranch = "main";
+        };
+
+        # add direnv to auto load flakes for development
+        direnv = {
+          enable = true;
+          enableBashIntegration = true;
+          nix-direnv.enable = true;
+          config = {
+            global.hide_env_diff = true;
+            whitelist.exact = ["/home/leyla/documents/code/nix-config"];
+          };
+        };
+        bash.enable = true;
+
+        openssh = {
+          authorizedKeys = [
+            "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon"
+            "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIILimFIW2exEH/Xo7LtXkqgE04qusvnPNpPWSCeNrFkP leyla@defiant"
+            "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKBiZkg1c2aaNHiieBX4cEziqvJVj9pcDfzUrKU/mO0I leyla@twilight"
+          ];
+          hostKeys = [
+            {
+              type = "ed25519";
+              path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
+            }
+          ];
+        };
+      };
+    })
+  ];
 }
diff --git a/configurations/home-manager/leyla/vscode/default.nix b/configurations/home-manager/leyla/vscode/default.nix
index 2f3c455..c2ee066 100644
--- a/configurations/home-manager/leyla/vscode/default.nix
+++ b/configurations/home-manager/leyla/vscode/default.nix
@@ -8,110 +8,113 @@
 }: let
   nix-development-enabled = osConfig.host.nix-development.enable;
   ai-tooling-enabled = config.user.continue.enable && osConfig.host.ai.enable;
+  is-desktop-user = osConfig.host.users.leyla.isDesktopUser;
 in {
-  nixpkgs = {
-    overlays = [
-      inputs.nix-vscode-extensions.overlays.default
-    ];
-  };
-
-  programs = {
-    bash.shellAliases = {
-      code = "codium";
+  config = lib.mkIf is-desktop-user {
+    nixpkgs = {
+      overlays = [
+        inputs.nix-vscode-extensions.overlays.default
+      ];
     };
 
-    vscode = let
-      extensions = inputs.nix-vscode-extensions.extensions.${pkgs.system};
-      open-vsx = extensions.open-vsx;
-      vscode-marketplace = extensions.vscode-marketplace;
-    in {
-      enable = true;
+    programs = {
+      bash.shellAliases = {
+        code = "codium";
+      };
 
-      package = pkgs.vscodium;
+      vscode = let
+        extensions = inputs.nix-vscode-extensions.extensions.${pkgs.system};
+        open-vsx = extensions.open-vsx;
+        vscode-marketplace = extensions.vscode-marketplace;
+      in {
+        enable = true;
 
-      mutableExtensionsDir = false;
+        package = pkgs.vscodium;
 
-      profiles.default = {
-        enableUpdateCheck = false;
-        enableExtensionUpdateCheck = false;
+        mutableExtensionsDir = false;
 
-        userSettings = lib.mkMerge [
-          {
-            "workbench.colorTheme" = "Atom One Dark";
-            "cSpell.userWords" = import ./user-words.nix;
-            "javascript.updateImportsOnFileMove.enabled" = "always";
-            "editor.tabSize" = 2;
-            "editor.insertSpaces" = false;
-          }
-          (lib.mkIf nix-development-enabled {
-            "nix.enableLanguageServer" = true;
-            "nix.serverPath" = "nil";
-            "[nix]" = {
-              "editor.defaultFormatter" = "kamadorueda.alejandra";
-              "editor.formatOnPaste" = true;
-              "editor.formatOnSave" = true;
-              "editor.formatOnType" = true;
-            };
-            "alejandra.program" = "alejandra";
-            "nixpkgs" = {
-              "expr" = "import <nixpkgs> {}";
-            };
-          })
-          (lib.mkIf ai-tooling-enabled {
-            "continue.telemetryEnabled" = false;
-          })
-        ];
+        profiles.default = {
+          enableUpdateCheck = false;
+          enableExtensionUpdateCheck = false;
 
-        extensions = (
-          with open-vsx;
-            [
-              # vs code feel extensions
-              ms-vscode.atom-keybindings
-              akamud.vscode-theme-onedark
-              streetsidesoftware.code-spell-checker
-              streetsidesoftware.code-spell-checker-german
-              streetsidesoftware.code-spell-checker-italian
-              jeanp413.open-remote-ssh
+          userSettings = lib.mkMerge [
+            {
+              "workbench.colorTheme" = "Atom One Dark";
+              "cSpell.userWords" = import ./user-words.nix;
+              "javascript.updateImportsOnFileMove.enabled" = "always";
+              "editor.tabSize" = 2;
+              "editor.insertSpaces" = false;
+            }
+            (lib.mkIf nix-development-enabled {
+              "nix.enableLanguageServer" = true;
+              "nix.serverPath" = "nil";
+              "[nix]" = {
+                "editor.defaultFormatter" = "kamadorueda.alejandra";
+                "editor.formatOnPaste" = true;
+                "editor.formatOnSave" = true;
+                "editor.formatOnType" = true;
+              };
+              "alejandra.program" = "alejandra";
+              "nixpkgs" = {
+                "expr" = "import <nixpkgs> {}";
+              };
+            })
+            (lib.mkIf ai-tooling-enabled {
+              "continue.telemetryEnabled" = false;
+            })
+          ];
 
-              # html extensions
-              formulahendry.auto-rename-tag
-              ms-vscode.live-server
+          extensions = (
+            with open-vsx;
+              [
+                # vs code feel extensions
+                ms-vscode.atom-keybindings
+                akamud.vscode-theme-onedark
+                streetsidesoftware.code-spell-checker
+                streetsidesoftware.code-spell-checker-german
+                streetsidesoftware.code-spell-checker-italian
+                jeanp413.open-remote-ssh
 
-              # js extensions
-              dsznajder.es7-react-js-snippets
-              dbaeumer.vscode-eslint
-              standard.vscode-standard
-              firsttris.vscode-jest-runner
-              stylelint.vscode-stylelint
-              tauri-apps.tauri-vscode
+                # html extensions
+                formulahendry.auto-rename-tag
+                ms-vscode.live-server
 
-              # go extensions
-              golang.go
+                # js extensions
+                dsznajder.es7-react-js-snippets
+                dbaeumer.vscode-eslint
+                standard.vscode-standard
+                firsttris.vscode-jest-runner
+                stylelint.vscode-stylelint
+                tauri-apps.tauri-vscode
 
-              # astro blog extensions
-              astro-build.astro-vscode
-              unifiedjs.vscode-mdx
+                # go extensions
+                golang.go
 
-              # misc extensions
-              tamasfe.even-better-toml
-            ]
-            ++ (lib.lists.optionals nix-development-enabled [
-              # nix extensions
-              pinage404.nix-extension-pack
-              jnoortheen.nix-ide
-              kamadorueda.alejandra
-            ])
-            ++ (
-              with vscode-marketplace;
-                [
-                  # js extensions
-                  karyfoundation.nearley
-                ]
-                ++ (lib.lists.optionals ai-tooling-enabled [
-                  continue.continue
-                ])
-            )
-        );
+                # astro blog extensions
+                astro-build.astro-vscode
+                unifiedjs.vscode-mdx
+
+                # misc extensions
+                tamasfe.even-better-toml
+              ]
+              ++ (lib.lists.optionals nix-development-enabled [
+                # nix extensions
+                pinage404.nix-extension-pack
+                jnoortheen.nix-ide
+                kamadorueda.alejandra
+              ])
+              ++ (
+                with vscode-marketplace;
+                  [
+                    # js extensions
+                    karyfoundation.nearley
+                  ]
+                  ++ (lib.lists.optionals ai-tooling-enabled [
+                    continue.continue
+                  ])
+              )
+          );
+        };
       };
     };
   };
diff --git a/configurations/nixos/emergent/nvidia-drivers.nix b/configurations/nixos/emergent/nvidia-drivers.nix
index 4df1b67..b264ca5 100644
--- a/configurations/nixos/emergent/nvidia-drivers.nix
+++ b/configurations/nixos/emergent/nvidia-drivers.nix
@@ -1,6 +1,9 @@
-{ config, lib, pkgs, ... }:
 {
-
+  config,
+  lib,
+  pkgs,
+  ...
+}: {
   # Enable OpenGL
   hardware.graphics = {
     enable = true;
@@ -10,13 +13,12 @@
   services.xserver.videoDrivers = ["nvidia"];
 
   hardware.nvidia = {
-
     # Modesetting is required.
     modesetting.enable = true;
 
     # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
     # Enable this if you have graphical corruption issues or application crashes after waking
-    # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead 
+    # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
     # of just the bare essentials.
     powerManagement.enable = false;
 
@@ -26,17 +28,17 @@
 
     # Use the NVidia open source kernel module (not to be confused with the
     # independent third-party "nouveau" open source driver).
-    # Support is limited to the Turing and later architectures. Full list of 
-    # supported GPUs is at: 
-    # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus 
+    # Support is limited to the Turing and later architectures. Full list of
+    # supported GPUs is at:
+    # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
     # Only available from driver 515.43.04+
     open = false;
 
     # Enable the Nvidia settings menu,
-	# accessible via `nvidia-settings`.
+    # accessible via `nvidia-settings`.
     nvidiaSettings = true;
 
     # Optionally, you may need to select the appropriate driver version for your specific GPU.
     package = config.boot.kernelPackages.nvidiaPackages.stable;
   };
- }
\ No newline at end of file
+}

From 21eff1d08302abacb7010b5dd065d49e69f57e69 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 13:07:56 -0500
Subject: [PATCH 06/51] moved Eve configurations into their own package

---
 configurations/home-manager/eve/default.nix   | 45 +---------------
 configurations/home-manager/eve/packages.nix  | 52 +++++++++++++++++++
 .../nixos/emergent/configuration.nix          | 13 ++---
 3 files changed, 60 insertions(+), 50 deletions(-)
 create mode 100644 configurations/home-manager/eve/packages.nix

diff --git a/configurations/home-manager/eve/default.nix b/configurations/home-manager/eve/default.nix
index b2ae492..0ab0c59 100644
--- a/configurations/home-manager/eve/default.nix
+++ b/configurations/home-manager/eve/default.nix
@@ -1,10 +1,4 @@
-{
-  pkgs,
-  lib,
-  config,
-  osConfig,
-  ...
-}: let
+{osConfig, ...}: let
   userConfig = osConfig.host.users.eve;
 in {
   nixpkgs.config = {
@@ -57,42 +51,5 @@ in {
     sessionVariables = {
       # EDITOR = "emacs";
     };
-
-    packages = lib.lists.optionals userConfig.isDesktopUser (
-      with pkgs; [
-        firefox
-        bitwarden
-        discord
-        makemkv
-        signal-desktop-bin
-        ungoogled-chromium
-      ]
-    );
-  };
-
-  programs = {
-    # Let Home Manager install and manage itself.
-    home-manager.enable = true;
-
-    git = {
-      enable = true;
-      userName = "Eve";
-      userEmail = "evesnrobins@gmail.com";
-      extraConfig.init.defaultBranch = "main";
-    };
-
-    vscode = {
-      enable = true;
-      package = pkgs.vscodium;
-    };
-
-    openssh = {
-      hostKeys = [
-        {
-          type = "ed25519";
-          path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
-        }
-      ];
-    };
   };
 }
diff --git a/configurations/home-manager/eve/packages.nix b/configurations/home-manager/eve/packages.nix
new file mode 100644
index 0000000..6cc4630
--- /dev/null
+++ b/configurations/home-manager/eve/packages.nix
@@ -0,0 +1,52 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: let
+  userConfig = osConfig.host.users.eve;
+in {
+  config = {
+    # Packages that can be installed without any extra configuration
+    # See https://search.nixos.org/packages for all options
+    home.packages = lib.lists.optionals userConfig.isDesktopUser (
+      with pkgs; [
+        firefox
+        bitwarden
+        discord
+        makemkv
+        signal-desktop-bin
+        ungoogled-chromium
+      ]
+    );
+
+    # Packages that need to be installed with some extra configuration
+    # See https://home-manager-options.extranix.com/ for all options
+    programs = {
+      # Let Home Manager install and manage itself.
+      home-manager.enable = true;
+
+      git = {
+        enable = true;
+        userName = "Eve";
+        userEmail = "evesnrobins@gmail.com";
+        extraConfig.init.defaultBranch = "main";
+      };
+
+      vscode = {
+        enable = true;
+        package = pkgs.vscodium;
+      };
+
+      openssh = {
+        hostKeys = [
+          {
+            type = "ed25519";
+            path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
+          }
+        ];
+      };
+    };
+  };
+}
diff --git a/configurations/nixos/emergent/configuration.nix b/configurations/nixos/emergent/configuration.nix
index 389dfe5..2d7df4c 100644
--- a/configurations/nixos/emergent/configuration.nix
+++ b/configurations/nixos/emergent/configuration.nix
@@ -83,13 +83,14 @@
 
   nixpkgs.config.allowUnfree = true;
 
-  # List packages installed in system profile.
-  # You can use https://search.nixos.org/ to find more packages (and options).
-  # environment.systemPackages = with pkgs; [
-  #   vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
-  #   wget
-  # ];
+  # Packages that can be installed without any extra configuration
+  # See https://search.nixos.org/packages for all options
+  environment.systemPackages = with pkgs; [
+    wget
+  ];
 
+  # Packages that need to be installed with some extra configuration
+  # See https://search.nixos.org/options for all options
   programs.steam = {
     enable = true;
     remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play

From 93793f2f1c71786215025d06f1c8072bbe4ea026 Mon Sep 17 00:00:00 2001
From: Eve <evesnrobins@gmail.com>
Date: Sun, 1 Jun 2025 13:36:44 -0500
Subject: [PATCH 07/51] set nvidia drivers to open

---
 configurations/nixos/emergent/nvidia-drivers.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configurations/nixos/emergent/nvidia-drivers.nix b/configurations/nixos/emergent/nvidia-drivers.nix
index b264ca5..fd569b3 100644
--- a/configurations/nixos/emergent/nvidia-drivers.nix
+++ b/configurations/nixos/emergent/nvidia-drivers.nix
@@ -32,7 +32,7 @@
     # supported GPUs is at:
     # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
     # Only available from driver 515.43.04+
-    open = false;
+    open = true;
 
     # Enable the Nvidia settings menu,
     # accessible via `nvidia-settings`.

From 54d03b280c5de2cd11c26fbed6f3a3e5f4497c4d Mon Sep 17 00:00:00 2001
From: Eve <evesnrobins@gmail.com>
Date: Sun, 1 Jun 2025 13:36:50 -0500
Subject: [PATCH 08/51] increase size of boot partiton for emergent

---
 configurations/nixos/emergent/disco-configuration.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configurations/nixos/emergent/disco-configuration.nix b/configurations/nixos/emergent/disco-configuration.nix
index ec002b2..ac2067f 100644
--- a/configurations/nixos/emergent/disco-configuration.nix
+++ b/configurations/nixos/emergent/disco-configuration.nix
@@ -8,7 +8,7 @@
           type = "gpt";
           partitions = {
             ESP = {
-              size = "64M";
+              size = "512M";
               type = "EF00";
               content = {
                 type = "filesystem";

From 36382ebfe0001273823e2fe417e3242495b75da6 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 14:19:31 -0500
Subject: [PATCH 09/51] switched to using nixos-anywhere flake in dev shell

---
 flake.lock       | 153 +++++++++++++++++++++++++++++++++++++++++++++++
 flake.nix        |  12 +++-
 util/default.nix |   2 +-
 3 files changed, 163 insertions(+), 4 deletions(-)

diff --git a/flake.lock b/flake.lock
index fa3ad83..fe1ba7d 100644
--- a/flake.lock
+++ b/flake.lock
@@ -20,6 +20,28 @@
         "type": "github"
       }
     },
+    "disko_2": {
+      "inputs": {
+        "nixpkgs": [
+          "nixos-anywhere",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1748225455,
+        "narHash": "sha256-AzlJCKaM4wbEyEpV3I/PUq5mHnib2ryEy32c+qfj6xk=",
+        "owner": "nix-community",
+        "repo": "disko",
+        "rev": "a894f2811e1ee8d10c50560551e50d6ab3c392ba",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "ref": "master",
+        "repo": "disko",
+        "type": "github"
+      }
+    },
     "firefox-addons": {
       "inputs": {
         "nixpkgs": [
@@ -57,6 +79,27 @@
         "type": "github"
       }
     },
+    "flake-parts": {
+      "inputs": {
+        "nixpkgs-lib": [
+          "nixos-anywhere",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1743550720,
+        "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "rev": "c621e8422220273271f52058f618c94e405bb0f5",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "type": "github"
+      }
+    },
     "flake-utils": {
       "inputs": {
         "systems": "systems"
@@ -151,6 +194,27 @@
         "url": "https://git.jan-leila.com/jan-leila/nix-syncthing"
       }
     },
+    "nix-vm-test": {
+      "inputs": {
+        "nixpkgs": [
+          "nixos-anywhere",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1748765518,
+        "narHash": "sha256-vftOR+7zwnMWl5UpG32GL1VBeNGTDZZT0hv+2uNuBGw=",
+        "owner": "Mic92",
+        "repo": "nix-vm-test",
+        "rev": "d6642fbaf42fc98883d84bab66cd0ec720d9dd0c",
+        "type": "github"
+      },
+      "original": {
+        "owner": "Mic92",
+        "repo": "nix-vm-test",
+        "type": "github"
+      }
+    },
     "nix-vscode-extensions": {
       "inputs": {
         "flake-utils": "flake-utils",
@@ -172,6 +236,32 @@
         "type": "github"
       }
     },
+    "nixos-anywhere": {
+      "inputs": {
+        "disko": "disko_2",
+        "flake-parts": "flake-parts",
+        "nix-vm-test": "nix-vm-test",
+        "nixos-images": "nixos-images",
+        "nixos-stable": "nixos-stable",
+        "nixpkgs": [
+          "nixpkgs"
+        ],
+        "treefmt-nix": "treefmt-nix"
+      },
+      "locked": {
+        "lastModified": 1748794949,
+        "narHash": "sha256-kfqIyYpXMRgmaLOTx+AFd1Kzo+I3mOg9vexUx2qWENA=",
+        "owner": "nix-community",
+        "repo": "nixos-anywhere",
+        "rev": "b7686308b281917d63137373a2eb5c566a973d03",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "nixos-anywhere",
+        "type": "github"
+      }
+    },
     "nixos-hardware": {
       "locked": {
         "lastModified": 1747900541,
@@ -188,6 +278,47 @@
         "type": "github"
       }
     },
+    "nixos-images": {
+      "inputs": {
+        "nixos-stable": [
+          "nixos-anywhere",
+          "nixos-stable"
+        ],
+        "nixos-unstable": [
+          "nixos-anywhere",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1748481078,
+        "narHash": "sha256-jwKRF2EDzlv0VBF8pImPFT7DAJma7stDun25utHtwBw=",
+        "owner": "nix-community",
+        "repo": "nixos-images",
+        "rev": "191a461dc38313ff41bd3df4b82e49f74a56560d",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "nixos-images",
+        "type": "github"
+      }
+    },
+    "nixos-stable": {
+      "locked": {
+        "lastModified": 1748437600,
+        "narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-25.05",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1748370509,
@@ -214,6 +345,7 @@
         "nix-darwin": "nix-darwin",
         "nix-syncthing": "nix-syncthing",
         "nix-vscode-extensions": "nix-vscode-extensions",
+        "nixos-anywhere": "nixos-anywhere",
         "nixos-hardware": "nixos-hardware",
         "nixpkgs": "nixpkgs",
         "secrets": "secrets",
@@ -270,6 +402,27 @@
         "repo": "default",
         "type": "github"
       }
+    },
+    "treefmt-nix": {
+      "inputs": {
+        "nixpkgs": [
+          "nixos-anywhere",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1748243702,
+        "narHash": "sha256-9YzfeN8CB6SzNPyPm2XjRRqSixDopTapaRsnTpXUEY8=",
+        "owner": "numtide",
+        "repo": "treefmt-nix",
+        "rev": "1f3f7b784643d488ba4bf315638b2b0a4c5fb007",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "treefmt-nix",
+        "type": "github"
+      }
     }
   },
   "root": "root",
diff --git a/flake.nix b/flake.nix
index 496456a..c0a72cf 100644
--- a/flake.nix
+++ b/flake.nix
@@ -28,6 +28,11 @@
       inputs.nixpkgs.follows = "nixpkgs";
     };
 
+    nixos-anywhere = {
+      url = "github:nix-community/nixos-anywhere";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+
     # disk configurations
     disko = {
       url = "github:nix-community/disko";
@@ -79,6 +84,7 @@
     sops-nix,
     nix-syncthing,
     home-manager,
+    nixos-anywhere,
     impermanence,
     ...
   } @ inputs: let
@@ -131,11 +137,11 @@
       systemsHomes
       // homeSystems;
   in {
-    formatter = forEachPkgs (pkgs: pkgs.alejandra);
+    formatter = forEachPkgs (system: pkgs: pkgs.alejandra);
 
     # templates = import ./templates;
 
-    devShells = forEachPkgs (pkgs: {
+    devShells = forEachPkgs (system: pkgs: {
       default = pkgs.mkShell {
         packages = with pkgs; [
           # for version controlling this repo
@@ -147,7 +153,7 @@
           # for viewing configuration options defined in this repo
           nix-inspect
           # for installing flakes from this repo onto other systems
-          nixos-anywhere
+          nixos-anywhere.packages.${system}.nixos-anywhere
           # for updating disko configurations
           disko
         ];
diff --git a/util/default.nix b/util/default.nix
index 4b713da..5b61779 100644
--- a/util/default.nix
+++ b/util/default.nix
@@ -53,7 +53,7 @@
       ../modules/system-modules
     ];
 in {
-  forEachPkgs = lambda: forEachSystem (system: lambda (pkgsFor system));
+  forEachPkgs = lambda: forEachSystem (system: lambda system (pkgsFor system));
 
   mkUnless = condition: yes: (lib.mkIf (!condition) yes);
   mkIfElse = condition: yes: no:

From b1e7be48b37adc932bac365d0ae10bdb6b0d9f9d Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 14:27:50 -0500
Subject: [PATCH 10/51] moved packages to common-modules

---
 modules/common-modules/pkgs/default.nix       | 19 ++++++++++++++++---
 .../pkgs}/prostudiomasters.nix                |  0
 .../pkgs}/webtoon-dl.nix                      |  0
 modules/nixos-modules/default.nix             |  1 -
 modules/nixos-modules/packages/default.nix    | 17 -----------------
 5 files changed, 16 insertions(+), 21 deletions(-)
 rename modules/{nixos-modules/packages => common-modules/pkgs}/prostudiomasters.nix (100%)
 rename modules/{nixos-modules/packages => common-modules/pkgs}/webtoon-dl.nix (100%)
 delete mode 100644 modules/nixos-modules/packages/default.nix

diff --git a/modules/common-modules/pkgs/default.nix b/modules/common-modules/pkgs/default.nix
index 3e4456b..208ee24 100644
--- a/modules/common-modules/pkgs/default.nix
+++ b/modules/common-modules/pkgs/default.nix
@@ -1,4 +1,17 @@
-# this folder is for custom derivations
-{...}: {
-  # package = pkgs.callPackage ./package.nix {};
+{pkgs, ...}: {
+  nixpkgs.overlays = [
+    (final: prev: {
+      webtoon-dl =
+        pkgs.callPackage
+        ./webtoon-dl.nix
+        {};
+    })
+    # TODO: this package always needs to be called with the --in-process-gpu flag for some reason, can we automate that?
+    (final: prev: {
+      prostudiomasters =
+        pkgs.callPackage
+        ./prostudiomasters.nix
+        {};
+    })
+  ];
 }
diff --git a/modules/nixos-modules/packages/prostudiomasters.nix b/modules/common-modules/pkgs/prostudiomasters.nix
similarity index 100%
rename from modules/nixos-modules/packages/prostudiomasters.nix
rename to modules/common-modules/pkgs/prostudiomasters.nix
diff --git a/modules/nixos-modules/packages/webtoon-dl.nix b/modules/common-modules/pkgs/webtoon-dl.nix
similarity index 100%
rename from modules/nixos-modules/packages/webtoon-dl.nix
rename to modules/common-modules/pkgs/webtoon-dl.nix
diff --git a/modules/nixos-modules/default.nix b/modules/nixos-modules/default.nix
index d668a74..8cdeae9 100644
--- a/modules/nixos-modules/default.nix
+++ b/modules/nixos-modules/default.nix
@@ -15,7 +15,6 @@
     ./ai.nix
     ./tailscale.nix
     ./server
-    ./packages
   ];
 
   nixpkgs.config.permittedInsecurePackages = [
diff --git a/modules/nixos-modules/packages/default.nix b/modules/nixos-modules/packages/default.nix
deleted file mode 100644
index 208ee24..0000000
--- a/modules/nixos-modules/packages/default.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{pkgs, ...}: {
-  nixpkgs.overlays = [
-    (final: prev: {
-      webtoon-dl =
-        pkgs.callPackage
-        ./webtoon-dl.nix
-        {};
-    })
-    # TODO: this package always needs to be called with the --in-process-gpu flag for some reason, can we automate that?
-    (final: prev: {
-      prostudiomasters =
-        pkgs.callPackage
-        ./prostudiomasters.nix
-        {};
-    })
-  ];
-}

From 7979b4ed17663d504f95036af80de4a07ab2f697 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 14:29:39 -0500
Subject: [PATCH 11/51] installed prostudiomasters for leyla only

---
 configurations/home-manager/leyla/packages.nix | 1 +
 configurations/nixos/horizon/configuration.nix | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/configurations/home-manager/leyla/packages.nix b/configurations/home-manager/leyla/packages.nix
index e9ab230..020060d 100644
--- a/configurations/home-manager/leyla/packages.nix
+++ b/configurations/home-manager/leyla/packages.nix
@@ -72,6 +72,7 @@ in {
               # proprietary platforms
               discord
               obsidian
+              prostudiomasters
               (lib.mkIf hardware.graphicsAcceleration.enable davinci-resolve)
 
               # development tools
diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix
index 7e2ab8a..770eeef 100644
--- a/configurations/nixos/horizon/configuration.nix
+++ b/configurations/nixos/horizon/configuration.nix
@@ -50,7 +50,6 @@
 
   environment.systemPackages = with pkgs; [
     webtoon-dl
-    prostudiomasters
   ];
 
   programs = {

From a68f81cf3bc41a131ceb7ec644629037e1102ccd Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 14:41:55 -0500
Subject: [PATCH 12/51] moved disko needed configuration to disko.nix

---
 modules/nixos-modules/disko.nix        | 41 ++++++++++++++++++++++++--
 modules/nixos-modules/impermanence.nix | 27 -----------------
 2 files changed, 39 insertions(+), 29 deletions(-)

diff --git a/modules/nixos-modules/disko.nix b/modules/nixos-modules/disko.nix
index 13ddb8f..af83023 100644
--- a/modules/nixos-modules/disko.nix
+++ b/modules/nixos-modules/disko.nix
@@ -20,6 +20,8 @@
       disk: lib.attrsets.nameValuePair (hashDisk disk) disk
     )
     config.host.storage.pool.cache;
+
+  datasets = config.host.storage.pool.datasets // config.host.storage.pool.extraDatasets;
 in {
   options.host.storage = {
     enable = lib.mkEnableOption "are we going create zfs disks with disko on this device";
@@ -63,6 +65,39 @@ in {
         description = "list of drives that are going to be used as cache";
         default = [];
       };
+      # Default datasets that are needed to make a functioning system
+      datasets = lib.mkOption {
+        type = lib.types.attrsOf (inputs.disko.lib.subType {
+          types = {inherit (inputs.disko.lib.types) zfs_fs zfs_volume;};
+        });
+        default = {
+          "local" = {
+            type = "zfs_fs";
+            options.canmount = "off";
+          };
+          # nix directory needs to be available pre persist and doesn't need to be snapshotted or backed up
+          "local/system/nix" = {
+            type = "zfs_fs";
+            mountpoint = "/nix";
+            options = {
+              atime = "off";
+              relatime = "off";
+              canmount = "on";
+            };
+          };
+          # dataset for root that gets rolled back on every boot
+          "local/system/root" = {
+            type = "zfs_fs";
+            mountpoint = "/";
+            options = {
+              canmount = "on";
+            };
+            postCreateHook = ''
+              zfs snapshot rpool/local/system/root@blank
+            '';
+          };
+        };
+      };
       extraDatasets = lib.mkOption {
         type = lib.types.attrsOf (inputs.disko.lib.subType {
           types = {inherit (inputs.disko.lib.types) zfs_fs zfs_volume;};
@@ -222,13 +257,15 @@ in {
             );
 
           datasets = lib.mkMerge [
-            (lib.attrsets.mapAttrs (name: value: {
+            (
+              lib.attrsets.mapAttrs (name: value: {
                 type = value.type;
                 options = value.options;
                 mountpoint = value.mountpoint;
                 postCreateHook = value.postCreateHook;
               })
-              config.host.storage.pool.extraDatasets)
+              datasets
+            )
           ];
         };
       };
diff --git a/modules/nixos-modules/impermanence.nix b/modules/nixos-modules/impermanence.nix
index e969e20..2f38cd3 100644
--- a/modules/nixos-modules/impermanence.nix
+++ b/modules/nixos-modules/impermanence.nix
@@ -38,33 +38,6 @@
         };
 
         host.storage.pool.extraDatasets = {
-          # local datasets are for data that should be considered ephemeral
-          "local" = {
-            type = "zfs_fs";
-            options.canmount = "off";
-          };
-          # nix directory needs to be available pre persist and doesn't need to be snapshotted or backed up
-          "local/system/nix" = {
-            type = "zfs_fs";
-            mountpoint = "/nix";
-            options = {
-              atime = "off";
-              relatime = "off";
-              canmount = "on";
-            };
-          };
-          # dataset for root that gets rolled back on every boot
-          "local/system/root" = {
-            type = "zfs_fs";
-            mountpoint = "/";
-            options = {
-              canmount = "on";
-            };
-            postCreateHook = ''
-              zfs snapshot rpool/local/system/root@blank
-            '';
-          };
-
           # persist datasets are datasets that contain information that we would like to keep around
           "persist" = {
             type = "zfs_fs";

From 99ea35547290d71e04fb600f9cb8cec2979bfbef Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 14:59:24 -0500
Subject: [PATCH 13/51] made boot disko partition configurable

---
 .../nixos/defiant/configuration.nix           |  2 +
 modules/nixos-modules/disko.nix               | 99 ++++++++-----------
 2 files changed, 45 insertions(+), 56 deletions(-)

diff --git a/configurations/nixos/defiant/configuration.nix b/configurations/nixos/defiant/configuration.nix
index fef7a56..a48bddb 100644
--- a/configurations/nixos/defiant/configuration.nix
+++ b/configurations/nixos/defiant/configuration.nix
@@ -40,6 +40,8 @@
         tokenFile = config.sops.secrets."services/zfs_smtp_token".path;
       };
       pool = {
+        # We are having to boot off of the nvm cache drive because I cant figure out how to boot via the HBA
+        bootDrives = ["nvme-Samsung_SSD_990_PRO_4TB_S7KGNU0X907881F"];
         vdevs = [
           [
             "ata-ST18000NE000-3G6101_ZVTCXVEB"
diff --git a/modules/nixos-modules/disko.nix b/modules/nixos-modules/disko.nix
index af83023..2cfeacc 100644
--- a/modules/nixos-modules/disko.nix
+++ b/modules/nixos-modules/disko.nix
@@ -50,16 +50,25 @@ in {
       };
     };
     pool = {
-      vdevs = lib.mkOption {
-        type = lib.types.listOf (lib.types.listOf lib.types.str);
-        description = "list of disks that are going to be in";
-        default = [config.host.storage.pool.drives];
+      # list of drives in pool that will have a boot partition put onto them
+      bootDrives = lib.mkOption {
+        type = lib.types.listOf lib.types.str;
+        description = "list of disks that are going to have a boot partition installed on them";
+        default = lib.lists.flatten config.host.storage.pool.vdevs;
       };
+      # shorthand for vdevs if you only have 1 vdev
       drives = lib.mkOption {
         type = lib.types.listOf lib.types.str;
         description = "list of drives that are going to be in the vdev";
         default = [];
       };
+      # list of all drives in each vdev
+      vdevs = lib.mkOption {
+        type = lib.types.listOf (lib.types.listOf lib.types.str);
+        description = "list of disks that are going to be in";
+        default = [config.host.storage.pool.drives];
+      };
+      # list of cache drives for pool
       cache = lib.mkOption {
         type = lib.types.listOf lib.types.str;
         description = "list of drives that are going to be used as cache";
@@ -156,59 +165,37 @@ in {
     disko.devices = {
       disk = (
         builtins.listToAttrs (
+          builtins.map
+          (drive:
+            lib.attrsets.nameValuePair (drive.name) {
+              type = "disk";
+              device = "/dev/disk/by-id/${drive.value}";
+              content = {
+                type = "gpt";
+                partitions = {
+                  ESP = lib.mkIf (builtins.elem drive.value config.host.storage.pool.bootDrives) {
+                    # The 2GB here for the boot partition might be a bit overkill we probably only need like 1/4th of that but storage is cheap
+                    size = "2G";
+                    type = "EF00";
+                    content = {
+                      type = "filesystem";
+                      format = "vfat";
+                      mountpoint = "/boot";
+                      mountOptions = ["umask=0077"];
+                    };
+                  };
+                  zfs = {
+                    size = "100%";
+                    content = {
+                      type = "zfs";
+                      pool = "rpool";
+                    };
+                  };
+                };
+              };
+            })
           (
-            builtins.map
-            (drive:
-              lib.attrsets.nameValuePair (drive.name) {
-                type = "disk";
-                device = "/dev/disk/by-id/${drive.value}";
-                content = {
-                  type = "gpt";
-                  partitions = {
-                    zfs = {
-                      size = "100%";
-                      content = {
-                        type = "zfs";
-                        pool = "rpool";
-                      };
-                    };
-                  };
-                };
-              })
-            (lib.lists.flatten vdevs)
-          )
-          ++ (
-            builtins.map
-            (drive:
-              lib.attrsets.nameValuePair (drive.name) {
-                type = "disk";
-                device = "/dev/disk/by-id/${drive.value}";
-                content = {
-                  type = "gpt";
-                  partitions = {
-                    # We are having to boot off of the nvm cache drive because I cant figure out how to boot via the HBA
-                    ESP = {
-                      # 2G here because its not much relative to how much storage we have for caching
-                      size = "2G";
-                      type = "EF00";
-                      content = {
-                        type = "filesystem";
-                        format = "vfat";
-                        mountpoint = "/boot";
-                        mountOptions = ["umask=0077"];
-                      };
-                    };
-                    zfs = {
-                      size = "100%";
-                      content = {
-                        type = "zfs";
-                        pool = "rpool";
-                      };
-                    };
-                  };
-                };
-              })
-            cache
+            (lib.lists.flatten vdevs) ++ cache
           )
         )
       );

From 795b9b010f2890b2414ea549e3f5a133186234a6 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 15:04:37 -0500
Subject: [PATCH 14/51] made zfs mode settable

---
 modules/nixos-modules/disko.nix | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/nixos-modules/disko.nix b/modules/nixos-modules/disko.nix
index 2cfeacc..3d15498 100644
--- a/modules/nixos-modules/disko.nix
+++ b/modules/nixos-modules/disko.nix
@@ -50,6 +50,11 @@ in {
       };
     };
     pool = {
+      mode = lib.mkOption {
+        type = lib.types.str;
+        default = "raidz2";
+        description = "what level of redundancy should this pool have";
+      };
       # list of drives in pool that will have a boot partition put onto them
       bootDrives = lib.mkOption {
         type = lib.types.listOf lib.types.str;
@@ -207,7 +212,7 @@ in {
               type = "topology";
               vdev = (
                 builtins.map (disks: {
-                  mode = "raidz2";
+                  mode = config.host.storage.pool.mode;
                   members =
                     builtins.map (disk: disk.name) disks;
                 })

From 6ce718ab095036ae60e2979e825a1ffee9777f51 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 15:07:13 -0500
Subject: [PATCH 15/51] moved emergent to common disko configuration

---
 .../nixos/emergent/configuration.nix          |  8 +++
 configurations/nixos/emergent/default.nix     |  1 -
 .../nixos/emergent/disco-configuration.nix    | 57 -------------------
 3 files changed, 8 insertions(+), 58 deletions(-)
 delete mode 100644 configurations/nixos/emergent/disco-configuration.nix

diff --git a/configurations/nixos/emergent/configuration.nix b/configurations/nixos/emergent/configuration.nix
index 2d7df4c..8176f97 100644
--- a/configurations/nixos/emergent/configuration.nix
+++ b/configurations/nixos/emergent/configuration.nix
@@ -50,6 +50,14 @@
         isPrincipleUser = true;
       };
     };
+
+    storage = {
+      enable = true;
+      pool = {
+        mode = "";
+        drives = ["wwn-0x5000039fd0cf05eb"];
+      };
+    };
   };
 
   # Configure keymap in X11
diff --git a/configurations/nixos/emergent/default.nix b/configurations/nixos/emergent/default.nix
index 3455825..452334a 100644
--- a/configurations/nixos/emergent/default.nix
+++ b/configurations/nixos/emergent/default.nix
@@ -3,6 +3,5 @@
   imports = [
     ./configuration.nix
     ./hardware-configuration.nix
-    ./disco-configuration.nix
   ];
 }
diff --git a/configurations/nixos/emergent/disco-configuration.nix b/configurations/nixos/emergent/disco-configuration.nix
deleted file mode 100644
index ac2067f..0000000
--- a/configurations/nixos/emergent/disco-configuration.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{...}: {
-  disko.devices = {
-    disk = {
-      disk1 = {
-        type = "disk";
-        device = "/dev/disk/by-id/wwn-0x5000039fd0cf05eb";
-        content = {
-          type = "gpt";
-          partitions = {
-            ESP = {
-              size = "512M";
-              type = "EF00";
-              content = {
-                type = "filesystem";
-                format = "vfat";
-                mountpoint = "/boot";
-                mountOptions = ["umask=0077"];
-              };
-            };
-            zfs = {
-              size = "100%";
-              content = {
-                type = "zfs";
-                pool = "zroot";
-              };
-            };
-          };
-        };
-      };
-    };
-    zpool = {
-      zroot = {
-        type = "zpool";
-        mode = "";
-        options.cachefile = "none";
-        rootFsOptions = {
-          compression = "zstd";
-          "com.sun:auto-snapshot" = "true";
-        };
-        mountpoint = "/";
-        postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
-
-        datasets = {
-          "system/nix" = {
-            type = "zfs_fs";
-            mountpoint = "/nix";
-            options = {
-              atime = "off";
-              relatime = "off";
-              canmount = "on";
-            };
-          };
-        };
-      };
-    };
-  };
-}

From ba2a31a80ebea98dff88657c968f6cb239343086 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 15:16:27 -0500
Subject: [PATCH 16/51] removed unused variable

---
 configurations/nixos/emergent/configuration.nix | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configurations/nixos/emergent/configuration.nix b/configurations/nixos/emergent/configuration.nix
index 8176f97..eaac657 100644
--- a/configurations/nixos/emergent/configuration.nix
+++ b/configurations/nixos/emergent/configuration.nix
@@ -2,7 +2,6 @@
 # your system. Help is available in the configuration.nix(5) man page, on
 # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
 {
-  config,
   lib,
   pkgs,
   ...

From 2475170d0aecd74581b9d9f37dd6ce907d3ca48e Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 15:28:06 -0500
Subject: [PATCH 17/51] moved user set configurations out of
 hardware-configuration.nix

---
 .../nixos/horizon/configuration.nix           |  28 ++++-
 .../nixos/horizon/hardware-configuration.nix  | 115 ++----------------
 2 files changed, 39 insertions(+), 104 deletions(-)

diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix
index 770eeef..4a73d8c 100644
--- a/configurations/nixos/horizon/configuration.nix
+++ b/configurations/nixos/horizon/configuration.nix
@@ -1,7 +1,8 @@
 {
+  lib,
+  pkgs,
   config,
   inputs,
-  pkgs,
   ...
 }: {
   imports = [
@@ -10,6 +11,19 @@
 
   nixpkgs.config.allowUnfree = true;
 
+  boot = {
+    initrd = {
+      availableKernelModules = ["usb_storage" "sd_mod"];
+    };
+    kernelModules = ["sg"];
+
+    # Bootloader.
+    loader = {
+      systemd-boot.enable = true;
+      efi.canTouchEfiVariables = true;
+    };
+  };
+
   host = {
     users = {
       leyla = {
@@ -49,8 +63,10 @@
   };
 
   environment.systemPackages = with pkgs; [
+    cachefilesd
     webtoon-dl
   ];
+  services.cachefilesd.enable = true;
 
   programs = {
     adb.enable = true;
@@ -61,6 +77,16 @@
     };
   };
 
+  networking = {
+    networkmanager.enable = true;
+    hostName = "horizon"; # Define your hostname.
+  };
+  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+
+  hardware = {
+    graphics.enable = true;
+  };
+
   sops.secrets = {
     "vpn-keys/tailscale-authkey/horizon" = {
       sopsFile = "${inputs.secrets}/vpn-keys.yaml";
diff --git a/configurations/nixos/horizon/hardware-configuration.nix b/configurations/nixos/horizon/hardware-configuration.nix
index e88d8dc..cec4914 100644
--- a/configurations/nixos/horizon/hardware-configuration.nix
+++ b/configurations/nixos/horizon/hardware-configuration.nix
@@ -4,7 +4,6 @@
 {
   config,
   lib,
-  pkgs,
   modulesPath,
   ...
 }: {
@@ -12,22 +11,10 @@
     (modulesPath + "/installer/scan/not-detected.nix")
   ];
 
-  boot = {
-    initrd = {
-      availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
-      kernelModules = [];
-    };
-    kernelModules = ["kvm-intel" "sg"];
-    extraModulePackages = [];
-
-    # Bootloader.
-    loader = {
-      systemd-boot.enable = true;
-      efi.canTouchEfiVariables = true;
-    };
-
-    supportedFilesystems = ["nfs"];
-  };
+  boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme"];
+  boot.initrd.kernelModules = [];
+  boot.kernelModules = ["kvm-intel"];
+  boot.extraModulePackages = [];
 
   fileSystems = {
     "/" = {
@@ -39,98 +26,20 @@
       device = "/dev/disk/by-uuid/E138-65B5";
       fsType = "vfat";
     };
-
-    "/mnt/leyla_documents" = {
-      device = "defiant:/export/leyla_documents";
-      fsType = "nfs";
-      options = [
-        "vers=4"
-        "x-systemd.automount"
-        "noauto"
-        "user"
-        "noatime"
-        "nofail"
-        "x-systemd.idle-timeout=600"
-        "fsc"
-        "timeo=600"
-        "retrans=2"
-      ];
-    };
-
-    "/mnt/eve_documents" = {
-      device = "defiant:/export/eve_documents";
-      fsType = "nfs";
-      options = [
-        "vers=4"
-        "x-systemd.automount"
-        "noauto"
-        "user"
-        "nofail"
-        "x-systemd.idle-timeout=600"
-        "fsc"
-        "timeo=600"
-        "retrans=2"
-      ];
-    };
-
-    "/mnt/users_documents" = {
-      device = "defiant:/export/users_documents";
-      fsType = "nfs";
-      options = [
-        "vers=4"
-        "x-systemd.automount"
-        "noauto"
-        "user"
-        "nofail"
-        "x-systemd.idle-timeout=600"
-        "fsc"
-        "timeo=600"
-        "retrans=2"
-      ];
-    };
-
-    "/mnt/media" = {
-      device = "defiant:/export/media";
-      fsType = "nfs";
-      options = [
-        "vers=4"
-        "x-systemd.automount"
-        "noauto"
-        "user"
-        "noatime"
-        "nofail"
-        "x-systemd.idle-timeout=600"
-        "noatime"
-        "nodiratime"
-        "relatime"
-        "fsc"
-        "timeo=600"
-        "retrans=2"
-      ];
-    };
   };
 
-  environment.systemPackages = with pkgs; [
-    cachefilesd
-  ];
-
-  services.cachefilesd.enable = true;
-
   swapDevices = [
     {device = "/dev/disk/by-uuid/be98e952-a072-4c3a-8c12-69500b5a2fff";}
   ];
 
-  networking = {
-    networkmanager.enable = true;
-    useDHCP = lib.mkDefault true;
-    hostName = "horizon"; # Define your hostname.
-  };
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
+  # networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true;
 
   nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
-
-  hardware = {
-    graphics.enable = true;
-    cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-  };
+  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
 }

From 35d6c1a63476a007ee81ce30bb517e8ceda5930a Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 16:04:13 -0500
Subject: [PATCH 18/51] enabled fwupd on horizon

---
 configurations/nixos/horizon/configuration.nix | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix
index 4a73d8c..5817e2b 100644
--- a/configurations/nixos/horizon/configuration.nix
+++ b/configurations/nixos/horizon/configuration.nix
@@ -98,6 +98,10 @@
     fprintd = {
       enable = true;
     };
+    # firmware update tool
+    fwupd = {
+      enable = true;
+    };
     tailscale = {
       enable = true;
       authKeyFile = config.sops.secrets."vpn-keys/tailscale-authkey/horizon".path;

From 2e41153c43a8c3c1729b8deccc841d3bad38fcd9 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 16:37:12 -0500
Subject: [PATCH 19/51] reverted nixos-anywhere devshell

---
 flake.lock                               | 153 -----------------------
 flake.nix                                |   8 +-
 modules/home-manager-modules/openssh.nix |  16 +--
 3 files changed, 9 insertions(+), 168 deletions(-)

diff --git a/flake.lock b/flake.lock
index fe1ba7d..fa3ad83 100644
--- a/flake.lock
+++ b/flake.lock
@@ -20,28 +20,6 @@
         "type": "github"
       }
     },
-    "disko_2": {
-      "inputs": {
-        "nixpkgs": [
-          "nixos-anywhere",
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1748225455,
-        "narHash": "sha256-AzlJCKaM4wbEyEpV3I/PUq5mHnib2ryEy32c+qfj6xk=",
-        "owner": "nix-community",
-        "repo": "disko",
-        "rev": "a894f2811e1ee8d10c50560551e50d6ab3c392ba",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-community",
-        "ref": "master",
-        "repo": "disko",
-        "type": "github"
-      }
-    },
     "firefox-addons": {
       "inputs": {
         "nixpkgs": [
@@ -79,27 +57,6 @@
         "type": "github"
       }
     },
-    "flake-parts": {
-      "inputs": {
-        "nixpkgs-lib": [
-          "nixos-anywhere",
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1743550720,
-        "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
-        "owner": "hercules-ci",
-        "repo": "flake-parts",
-        "rev": "c621e8422220273271f52058f618c94e405bb0f5",
-        "type": "github"
-      },
-      "original": {
-        "owner": "hercules-ci",
-        "repo": "flake-parts",
-        "type": "github"
-      }
-    },
     "flake-utils": {
       "inputs": {
         "systems": "systems"
@@ -194,27 +151,6 @@
         "url": "https://git.jan-leila.com/jan-leila/nix-syncthing"
       }
     },
-    "nix-vm-test": {
-      "inputs": {
-        "nixpkgs": [
-          "nixos-anywhere",
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1748765518,
-        "narHash": "sha256-vftOR+7zwnMWl5UpG32GL1VBeNGTDZZT0hv+2uNuBGw=",
-        "owner": "Mic92",
-        "repo": "nix-vm-test",
-        "rev": "d6642fbaf42fc98883d84bab66cd0ec720d9dd0c",
-        "type": "github"
-      },
-      "original": {
-        "owner": "Mic92",
-        "repo": "nix-vm-test",
-        "type": "github"
-      }
-    },
     "nix-vscode-extensions": {
       "inputs": {
         "flake-utils": "flake-utils",
@@ -236,32 +172,6 @@
         "type": "github"
       }
     },
-    "nixos-anywhere": {
-      "inputs": {
-        "disko": "disko_2",
-        "flake-parts": "flake-parts",
-        "nix-vm-test": "nix-vm-test",
-        "nixos-images": "nixos-images",
-        "nixos-stable": "nixos-stable",
-        "nixpkgs": [
-          "nixpkgs"
-        ],
-        "treefmt-nix": "treefmt-nix"
-      },
-      "locked": {
-        "lastModified": 1748794949,
-        "narHash": "sha256-kfqIyYpXMRgmaLOTx+AFd1Kzo+I3mOg9vexUx2qWENA=",
-        "owner": "nix-community",
-        "repo": "nixos-anywhere",
-        "rev": "b7686308b281917d63137373a2eb5c566a973d03",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-community",
-        "repo": "nixos-anywhere",
-        "type": "github"
-      }
-    },
     "nixos-hardware": {
       "locked": {
         "lastModified": 1747900541,
@@ -278,47 +188,6 @@
         "type": "github"
       }
     },
-    "nixos-images": {
-      "inputs": {
-        "nixos-stable": [
-          "nixos-anywhere",
-          "nixos-stable"
-        ],
-        "nixos-unstable": [
-          "nixos-anywhere",
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1748481078,
-        "narHash": "sha256-jwKRF2EDzlv0VBF8pImPFT7DAJma7stDun25utHtwBw=",
-        "owner": "nix-community",
-        "repo": "nixos-images",
-        "rev": "191a461dc38313ff41bd3df4b82e49f74a56560d",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-community",
-        "repo": "nixos-images",
-        "type": "github"
-      }
-    },
-    "nixos-stable": {
-      "locked": {
-        "lastModified": 1748437600,
-        "narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-25.05",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1748370509,
@@ -345,7 +214,6 @@
         "nix-darwin": "nix-darwin",
         "nix-syncthing": "nix-syncthing",
         "nix-vscode-extensions": "nix-vscode-extensions",
-        "nixos-anywhere": "nixos-anywhere",
         "nixos-hardware": "nixos-hardware",
         "nixpkgs": "nixpkgs",
         "secrets": "secrets",
@@ -402,27 +270,6 @@
         "repo": "default",
         "type": "github"
       }
-    },
-    "treefmt-nix": {
-      "inputs": {
-        "nixpkgs": [
-          "nixos-anywhere",
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1748243702,
-        "narHash": "sha256-9YzfeN8CB6SzNPyPm2XjRRqSixDopTapaRsnTpXUEY8=",
-        "owner": "numtide",
-        "repo": "treefmt-nix",
-        "rev": "1f3f7b784643d488ba4bf315638b2b0a4c5fb007",
-        "type": "github"
-      },
-      "original": {
-        "owner": "numtide",
-        "repo": "treefmt-nix",
-        "type": "github"
-      }
     }
   },
   "root": "root",
diff --git a/flake.nix b/flake.nix
index c0a72cf..ac651f7 100644
--- a/flake.nix
+++ b/flake.nix
@@ -28,11 +28,6 @@
       inputs.nixpkgs.follows = "nixpkgs";
     };
 
-    nixos-anywhere = {
-      url = "github:nix-community/nixos-anywhere";
-      inputs.nixpkgs.follows = "nixpkgs";
-    };
-
     # disk configurations
     disko = {
       url = "github:nix-community/disko";
@@ -84,7 +79,6 @@
     sops-nix,
     nix-syncthing,
     home-manager,
-    nixos-anywhere,
     impermanence,
     ...
   } @ inputs: let
@@ -153,7 +147,7 @@
           # for viewing configuration options defined in this repo
           nix-inspect
           # for installing flakes from this repo onto other systems
-          nixos-anywhere.packages.${system}.nixos-anywhere
+          nixos-anywhere
           # for updating disko configurations
           disko
         ];
diff --git a/modules/home-manager-modules/openssh.nix b/modules/home-manager-modules/openssh.nix
index 7b646b8..d7a0873 100644
--- a/modules/home-manager-modules/openssh.nix
+++ b/modules/home-manager-modules/openssh.nix
@@ -41,14 +41,14 @@
     (
       lib.mkIf ((builtins.length config.programs.openssh.hostKeys) != 0) {
         services.ssh-agent.enable = true;
-        programs.ssh = {
-          enable = true;
-          compression = true;
-          addKeysToAgent = "confirm";
-          extraConfig = lib.strings.concatLines (
-            builtins.map (hostKey: "IdentityFile ~/.ssh/${hostKey.path}") config.programs.openssh.hostKeys
-          );
-        };
+        # programs.ssh = {
+        #   enable = true;
+        #   compression = true;
+        #   addKeysToAgent = "confirm";
+        #   extraConfig = lib.strings.concatLines (
+        #     builtins.map (hostKey: "IdentityFile ~/.ssh/${hostKey.path}") config.programs.openssh.hostKeys
+        #   );
+        # };
 
         systemd.user.services = builtins.listToAttrs (
           builtins.map (hostKey:

From 5e0bf9f068b879f8b00bcec30cf4cdda47d0862e Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 17:37:56 -0500
Subject: [PATCH 20/51] re enabled ssh agent IdentityFile

---
 modules/home-manager-modules/openssh.nix | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/home-manager-modules/openssh.nix b/modules/home-manager-modules/openssh.nix
index d7a0873..7b646b8 100644
--- a/modules/home-manager-modules/openssh.nix
+++ b/modules/home-manager-modules/openssh.nix
@@ -41,14 +41,14 @@
     (
       lib.mkIf ((builtins.length config.programs.openssh.hostKeys) != 0) {
         services.ssh-agent.enable = true;
-        # programs.ssh = {
-        #   enable = true;
-        #   compression = true;
-        #   addKeysToAgent = "confirm";
-        #   extraConfig = lib.strings.concatLines (
-        #     builtins.map (hostKey: "IdentityFile ~/.ssh/${hostKey.path}") config.programs.openssh.hostKeys
-        #   );
-        # };
+        programs.ssh = {
+          enable = true;
+          compression = true;
+          addKeysToAgent = "confirm";
+          extraConfig = lib.strings.concatLines (
+            builtins.map (hostKey: "IdentityFile ~/.ssh/${hostKey.path}") config.programs.openssh.hostKeys
+          );
+        };
 
         systemd.user.services = builtins.listToAttrs (
           builtins.map (hostKey:

From ac7c2e6de6eb957c8408c66f50d51397624be090 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 18:11:27 -0500
Subject: [PATCH 21/51] switched to lix

---
 flake.lock                       | 86 +++++++++++++++++++++++++++++++-
 flake.nix                        |  8 +--
 modules/nixos-modules/system.nix |  1 -
 util/default.nix                 |  4 +-
 4 files changed, 91 insertions(+), 8 deletions(-)

diff --git a/flake.lock b/flake.lock
index fa3ad83..3dbabc8 100644
--- a/flake.lock
+++ b/flake.lock
@@ -75,6 +75,39 @@
         "type": "github"
       }
     },
+    "flake-utils_2": {
+      "inputs": {
+        "systems": "systems_2"
+      },
+      "locked": {
+        "lastModified": 1731533236,
+        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "flakey-profile": {
+      "locked": {
+        "lastModified": 1712898590,
+        "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
+        "owner": "lf-",
+        "repo": "flakey-profile",
+        "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
+        "type": "github"
+      },
+      "original": {
+        "owner": "lf-",
+        "repo": "flakey-profile",
+        "type": "github"
+      }
+    },
     "home-manager": {
       "inputs": {
         "nixpkgs": [
@@ -110,6 +143,41 @@
         "type": "github"
       }
     },
+    "lix": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1746827285,
+        "narHash": "sha256-hsFe4Tsqqg4l+FfQWphDtjC79WzNCZbEFhHI8j2KJzw=",
+        "rev": "47aad376c87e2e65967f17099277428e4b3f8e5a",
+        "type": "tarball",
+        "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/47aad376c87e2e65967f17099277428e4b3f8e5a.tar.gz"
+      },
+      "original": {
+        "type": "tarball",
+        "url": "https://git.lix.systems/lix-project/lix/archive/2.93.0.tar.gz"
+      }
+    },
+    "lix-module": {
+      "inputs": {
+        "flake-utils": "flake-utils",
+        "flakey-profile": "flakey-profile",
+        "lix": "lix",
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1746838955,
+        "narHash": "sha256-11R4K3iAx4tLXjUs+hQ5K90JwDABD/XHhsM9nkeS5N8=",
+        "rev": "cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc",
+        "type": "tarball",
+        "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc.tar.gz"
+      },
+      "original": {
+        "type": "tarball",
+        "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz"
+      }
+    },
     "nix-darwin": {
       "inputs": {
         "nixpkgs": [
@@ -153,7 +221,7 @@
     },
     "nix-vscode-extensions": {
       "inputs": {
-        "flake-utils": "flake-utils",
+        "flake-utils": "flake-utils_2",
         "nixpkgs": [
           "nixpkgs"
         ]
@@ -211,6 +279,7 @@
         "flake-compat": "flake-compat",
         "home-manager": "home-manager",
         "impermanence": "impermanence",
+        "lix-module": "lix-module",
         "nix-darwin": "nix-darwin",
         "nix-syncthing": "nix-syncthing",
         "nix-vscode-extensions": "nix-vscode-extensions",
@@ -270,6 +339,21 @@
         "repo": "default",
         "type": "github"
       }
+    },
+    "systems_2": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
     }
   },
   "root": "root",
diff --git a/flake.nix b/flake.nix
index ac651f7..7896d60 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,10 +5,10 @@
     # base packages
     nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
 
-    # lix-module = {
-    #   url = "https://git.lix.systems/lix-project/nixos-module/archive/stable.tar.gz";
-    #   inputs.nixpkgs.follows = "nixpkgs";
-    # };
+    lix-module = {
+      url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
 
     # secret encryption
     sops-nix = {
diff --git a/modules/nixos-modules/system.nix b/modules/nixos-modules/system.nix
index 51a92ed..b839067 100644
--- a/modules/nixos-modules/system.nix
+++ b/modules/nixos-modules/system.nix
@@ -1,6 +1,5 @@
 {...}: {
   nix = {
-    settings.download-buffer-size = 524288000;
     gc = {
       automatic = true;
       dates = "weekly";
diff --git a/util/default.nix b/util/default.nix
index 5b61779..fb2f83d 100644
--- a/util/default.nix
+++ b/util/default.nix
@@ -10,7 +10,7 @@
   nix-syncthing = inputs.nix-syncthing;
   disko = inputs.disko;
   impermanence = inputs.impermanence;
-  # lix-module = inputs.lix-module;
+  lix-module = inputs.lix-module;
 
   systems = [
     "aarch64-darwin"
@@ -83,7 +83,7 @@ in {
           impermanence.nixosModules.impermanence
           home-manager.nixosModules.home-manager
           disko.nixosModules.disko
-          # lix-module.nixosModules.default
+          lix-module.nixosModules.default
           ../modules/nixos-modules
           ../configurations/nixos/${host}
         ];

From 9664eeb38dd162ea6d76102bfe7215a8c09bec44 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 18:19:03 -0500
Subject: [PATCH 22/51] updated flakes

---
 .../nixos/emergent/configuration.nix          |  4 +--
 flake.lock                                    | 34 +++++++++----------
 modules/nixos-modules/desktop.nix             | 10 +++---
 3 files changed, 23 insertions(+), 25 deletions(-)

diff --git a/configurations/nixos/emergent/configuration.nix b/configurations/nixos/emergent/configuration.nix
index eaac657..aacc820 100644
--- a/configurations/nixos/emergent/configuration.nix
+++ b/configurations/nixos/emergent/configuration.nix
@@ -38,8 +38,8 @@
   services.xserver.enable = true;
 
   # Enable the GNOME Desktop Environment.
-  services.xserver.displayManager.gdm.enable = true;
-  services.xserver.desktopManager.gnome.enable = true;
+  services.displayManager.gdm.enable = true;
+  services.desktopManager.gnome.enable = true;
 
   host = {
     users = {
diff --git a/flake.lock b/flake.lock
index 3dbabc8..bbaffa4 100644
--- a/flake.lock
+++ b/flake.lock
@@ -28,11 +28,11 @@
       },
       "locked": {
         "dir": "pkgs/firefox-addons",
-        "lastModified": 1748405006,
-        "narHash": "sha256-pmt0SFjACJJAI8g8QU5arg2c9BXNZG9/okVwRSDJkG8=",
+        "lastModified": 1748730131,
+        "narHash": "sha256-QHKZlwzw80hoJkNGXQePIg4u109lqcodALkont2WJAc=",
         "owner": "rycee",
         "repo": "nur-expressions",
-        "rev": "f9801a86d6603260940890c36650275090d1dceb",
+        "rev": "aa7bfc2ec4763b57386fcd50242c390a596b9bb0",
         "type": "gitlab"
       },
       "original": {
@@ -115,11 +115,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748455938,
-        "narHash": "sha256-mQ/iNzPra2WtDQ+x2r5IadcWNr0m3uHvLMzJkXKAG/8=",
+        "lastModified": 1748811839,
+        "narHash": "sha256-MDl6vpEK18ZfPHfoeOa9dGRdwVWNfmCCGazt72nHw+U=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "02077149e2921014511dac2729ae6dadb4ec50e2",
+        "rev": "6abf27943bbb09a0f9d443df45ec70b07a6cbe20",
         "type": "github"
       },
       "original": {
@@ -150,7 +150,7 @@
         "narHash": "sha256-hsFe4Tsqqg4l+FfQWphDtjC79WzNCZbEFhHI8j2KJzw=",
         "rev": "47aad376c87e2e65967f17099277428e4b3f8e5a",
         "type": "tarball",
-        "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/47aad376c87e2e65967f17099277428e4b3f8e5a.tar.gz"
+        "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/47aad376c87e2e65967f17099277428e4b3f8e5a.tar.gz?rev=47aad376c87e2e65967f17099277428e4b3f8e5a"
       },
       "original": {
         "type": "tarball",
@@ -171,7 +171,7 @@
         "narHash": "sha256-11R4K3iAx4tLXjUs+hQ5K90JwDABD/XHhsM9nkeS5N8=",
         "rev": "cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc",
         "type": "tarball",
-        "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc.tar.gz"
+        "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc.tar.gz?rev=cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc"
       },
       "original": {
         "type": "tarball",
@@ -227,11 +227,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748397853,
-        "narHash": "sha256-tudGoP5caIJ5TzkV6wnsmUk7Spx21oWMKpkmPbjRNZc=",
+        "lastModified": 1748744745,
+        "narHash": "sha256-kcj58eYic+yLX/KjtHEOmn6lVnCRwL1IfRGnb8aHprE=",
         "owner": "nix-community",
         "repo": "nix-vscode-extensions",
-        "rev": "ac4fc8eb9a1ee5eeb3c0a30f57652e4c5428d3a5",
+        "rev": "c008ed9dd78efdeda5e9d5bb835c785e600791f6",
         "type": "github"
       },
       "original": {
@@ -242,11 +242,11 @@
     },
     "nixos-hardware": {
       "locked": {
-        "lastModified": 1747900541,
-        "narHash": "sha256-dn64Pg9xLETjblwZs9Euu/SsjW80pd6lr5qSiyLY1pg=",
+        "lastModified": 1748634340,
+        "narHash": "sha256-pZH4bqbOd8S+si6UcfjHovWDiWKiIGRNRMpmRWaDIms=",
         "owner": "NixOS",
         "repo": "nixos-hardware",
-        "rev": "11f2d9ea49c3e964315215d6baa73a8d42672f06",
+        "rev": "daa628a725ab4948e0e2b795e8fb6f4c3e289a7a",
         "type": "github"
       },
       "original": {
@@ -258,11 +258,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1748370509,
-        "narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
+        "lastModified": 1748693115,
+        "narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
+        "rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
         "type": "github"
       },
       "original": {
diff --git a/modules/nixos-modules/desktop.nix b/modules/nixos-modules/desktop.nix
index cf59cd9..323b7cc 100644
--- a/modules/nixos-modules/desktop.nix
+++ b/modules/nixos-modules/desktop.nix
@@ -19,12 +19,6 @@
           # Enable the X11 windowing system.
           enable = true;
 
-          # Enable the GNOME Desktop Environment.
-          displayManager.gdm.enable = true;
-          desktopManager = {
-            gnome.enable = true;
-          };
-
           # Get rid of xTerm
           desktopManager.xterm.enable = false;
           excludePackages = with pkgs; [
@@ -47,6 +41,10 @@
           ];
         };
 
+        # Enable the GNOME Desktop Environment.
+        displayManager.gdm.enable = true;
+        desktopManager.gnome.enable = true;
+
         pipewire = {
           enable = true;
           alsa.enable = true;

From 42e2ce9258660796c4607ce8b088978406e7d57e Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 20:58:30 -0500
Subject: [PATCH 23/51] fixed warnings on defiant

---
 configurations/nixos/defiant/configuration.nix | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/configurations/nixos/defiant/configuration.nix b/configurations/nixos/defiant/configuration.nix
index a48bddb..0b9d1b7 100644
--- a/configurations/nixos/defiant/configuration.nix
+++ b/configurations/nixos/defiant/configuration.nix
@@ -201,16 +201,14 @@
 
     # temp enable desktop enviroment for setup
     # Enable the X11 windowing system.
-    xserver = {
-      enable = true;
+    xserver.enable = true;
 
-      # Enable the GNOME Desktop Environment.
-      displayManager = {
-        gdm.enable = true;
-      };
-      desktopManager = {
-        gnome.enable = true;
-      };
+    # Enable the GNOME Desktop Environment.
+    displayManager = {
+      gdm.enable = true;
+    };
+    desktopManager = {
+      gnome.enable = true;
     };
 
     ollama = {
@@ -300,7 +298,7 @@
     hibernate.enable = false;
     hybrid-sleep.enable = false;
   };
-  services.xserver.displayManager.gdm.autoSuspend = false;
+  services.displayManager.gdm.autoSuspend = false;
 
   # This value determines the NixOS release from which the default
   # settings for stateful data, like file locations and database versions

From 1a4c2b2f950359eb905a2a7975e6e9af56e1aceb Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 21:06:54 -0500
Subject: [PATCH 24/51] stripped down twilight configuration.nix

---
 .../nixos/twilight/configuration.nix          |  63 ++++++++++
 configurations/nixos/twilight/default.nix     |   1 +
 .../nixos/twilight/hardware-configuration.nix | 116 +-----------------
 .../nixos/twilight/nvidia-drivers.nix         |  52 ++++++++
 4 files changed, 121 insertions(+), 111 deletions(-)
 create mode 100644 configurations/nixos/twilight/nvidia-drivers.nix

diff --git a/configurations/nixos/twilight/configuration.nix b/configurations/nixos/twilight/configuration.nix
index e9032d8..0306f19 100644
--- a/configurations/nixos/twilight/configuration.nix
+++ b/configurations/nixos/twilight/configuration.nix
@@ -1,6 +1,7 @@
 {
   inputs,
   config,
+  pkgs,
   ...
 }: {
   imports = [
@@ -121,6 +122,63 @@
 
     syncthing.enable = true;
   };
+
+  boot.supportedFilesystems = ["nfs"];
+
+  fileSystems = {
+    "/mnt/leyla_documents" = {
+      device = "defiant:/exports/leyla_documents";
+      fsType = "nfs";
+      options = [
+        "x-systemd.automount"
+        "noauto"
+        "user"
+        "noatime"
+        "nofail"
+        "soft"
+        "x-systemd.idle-timeout=600"
+        "fsc"
+      ];
+    };
+
+    "/mnt/users_documents" = {
+      device = "defiant:/exports/users_documents";
+      fsType = "nfs";
+      options = [
+        "x-systemd.automount"
+        "noauto"
+        "user"
+        "nofail"
+        "soft"
+        "x-systemd.idle-timeout=600"
+        "fsc"
+      ];
+    };
+
+    "/mnt/media" = {
+      device = "defiant:/exports/media";
+      fsType = "nfs";
+      options = [
+        "x-systemd.automount"
+        "noauto"
+        "user"
+        "noatime"
+        "nofail"
+        "soft"
+        "x-systemd.idle-timeout=600"
+        "noatime"
+        "nodiratime"
+        "relatime"
+        "rsize=32768"
+        "wsize=32768"
+        "fsc"
+      ];
+    };
+  };
+
+  environment.systemPackages = with pkgs; [
+    cachefilesd
+  ];
   programs.steam = {
     enable = true;
     remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
@@ -128,6 +186,11 @@
   };
   hardware.steam-hardware.enable = true; # Provides udev rules for controller, HTC vive, and Valve Index
 
+  networking = {
+    networkmanager.enable = true;
+    hostName = "twilight"; # Define your hostname.
+  };
+
   # enabled virtualisation for docker
   # virtualisation.docker.enable = true;
 
diff --git a/configurations/nixos/twilight/default.nix b/configurations/nixos/twilight/default.nix
index edfb3f6..43a9164 100644
--- a/configurations/nixos/twilight/default.nix
+++ b/configurations/nixos/twilight/default.nix
@@ -3,5 +3,6 @@
   imports = [
     ./configuration.nix
     ./hardware-configuration.nix
+    ./nvidia-drivers.nix
   ];
 }
diff --git a/configurations/nixos/twilight/hardware-configuration.nix b/configurations/nixos/twilight/hardware-configuration.nix
index 1cba7de..9a4c2d2 100644
--- a/configurations/nixos/twilight/hardware-configuration.nix
+++ b/configurations/nixos/twilight/hardware-configuration.nix
@@ -25,16 +25,6 @@
       systemd-boot.enable = true;
       efi.canTouchEfiVariables = true;
     };
-
-    supportedFilesystems = ["nfs"];
-  };
-
-  services.xserver = {
-    # Load nvidia driver for Xorg and Wayland
-    videoDrivers = ["nvidia"];
-
-    # Use X instead of wayland for gaming reasons
-    displayManager.gdm.wayland = false;
   };
 
   fileSystems = {
@@ -48,111 +38,15 @@
       fsType = "vfat";
       options = ["fmask=0022" "dmask=0022"];
     };
-
-    "/mnt/leyla_documents" = {
-      device = "defiant:/exports/leyla_documents";
-      fsType = "nfs";
-      options = [
-        "x-systemd.automount"
-        "noauto"
-        "user"
-        "noatime"
-        "nofail"
-        "soft"
-        "x-systemd.idle-timeout=600"
-        "fsc"
-      ];
-    };
-
-    "/mnt/users_documents" = {
-      device = "defiant:/exports/users_documents";
-      fsType = "nfs";
-      options = [
-        "x-systemd.automount"
-        "noauto"
-        "user"
-        "nofail"
-        "soft"
-        "x-systemd.idle-timeout=600"
-        "fsc"
-      ];
-    };
-
-    "/mnt/media" = {
-      device = "defiant:/exports/media";
-      fsType = "nfs";
-      options = [
-        "x-systemd.automount"
-        "noauto"
-        "user"
-        "noatime"
-        "nofail"
-        "soft"
-        "x-systemd.idle-timeout=600"
-        "noatime"
-        "nodiratime"
-        "relatime"
-        "rsize=32768"
-        "wsize=32768"
-        "fsc"
-      ];
-    };
   };
 
-  environment.systemPackages = with pkgs; [
-    cachefilesd
-  ];
-
   swapDevices = [];
 
-  networking = {
-    networkmanager.enable = true;
-    # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
-    # (the default) this is the recommended approach. When using systemd-networkd it's
-    # still possible to use this option, but it's recommended to use it in conjunction
-    # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
-    useDHCP = lib.mkDefault true;
-    hostName = "twilight"; # Define your hostname.
-  };
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
 
   nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-
-  hardware = {
-    # Enable OpenGL
-    graphics.enable = true;
-
-    # install graphics drivers
-    nvidia = {
-      # Modesetting is required.
-      modesetting.enable = true;
-
-      # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
-      # Enable this if you have graphical corruption issues or application crashes after waking
-      # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
-      # of just the bare essentials.
-      powerManagement.enable = false;
-
-      # Fine-grained power management. Turns off GPU when not in use.
-      # Experimental and only works on modern Nvidia GPUs (Turing or newer).
-      powerManagement.finegrained = false;
-
-      # Use the NVidia open source kernel module (not to be confused with the
-      # independent third-party "nouveau" open source driver).
-      # Support is limited to the Turing and later architectures. Full list of
-      # supported GPUs is at:
-      # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
-      # Only available from driver 515.43.04+
-      # Currently alpha-quality/buggy, so false is currently the recommended setting.
-      open = false;
-
-      # Enable the Nvidia settings menu,
-      # accessible via `nvidia-settings`.
-      nvidiaSettings = true;
-
-      # Optionally, you may need to select the appropriate driver version for your specific GPU.
-      package = config.boot.kernelPackages.nvidiaPackages.production;
-    };
-
-    cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-  };
 }
diff --git a/configurations/nixos/twilight/nvidia-drivers.nix b/configurations/nixos/twilight/nvidia-drivers.nix
new file mode 100644
index 0000000..883b5cb
--- /dev/null
+++ b/configurations/nixos/twilight/nvidia-drivers.nix
@@ -0,0 +1,52 @@
+{
+  lib,
+  config,
+  ...
+}: {
+  services.xserver = {
+    # Load nvidia driver for Xorg and Wayland
+    videoDrivers = ["nvidia"];
+
+    # Use X instead of wayland for gaming reasons
+    displayManager.gdm.wayland = false;
+  };
+
+  hardware = {
+    # Enable OpenGL
+    graphics.enable = true;
+
+    # install graphics drivers
+    nvidia = {
+      # Modesetting is required.
+      modesetting.enable = true;
+
+      # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
+      # Enable this if you have graphical corruption issues or application crashes after waking
+      # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
+      # of just the bare essentials.
+      powerManagement.enable = false;
+
+      # Fine-grained power management. Turns off GPU when not in use.
+      # Experimental and only works on modern Nvidia GPUs (Turing or newer).
+      powerManagement.finegrained = false;
+
+      # Use the NVidia open source kernel module (not to be confused with the
+      # independent third-party "nouveau" open source driver).
+      # Support is limited to the Turing and later architectures. Full list of
+      # supported GPUs is at:
+      # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
+      # Only available from driver 515.43.04+
+      # Currently alpha-quality/buggy, so false is currently the recommended setting.
+      open = true;
+
+      # Enable the Nvidia settings menu,
+      # accessible via `nvidia-settings`.
+      nvidiaSettings = true;
+
+      # Optionally, you may need to select the appropriate driver version for your specific GPU.
+      package = config.boot.kernelPackages.nvidiaPackages.production;
+    };
+
+    cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+  };
+}

From a7b738eae366d806f145b291c6de1ba8e1580dc2 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 22:10:29 -0500
Subject: [PATCH 25/51] made twilight hardware-configuration.nix match what is
 automatically generated

---
 .../nixos/twilight/configuration.nix          |  8 ++++++++
 .../nixos/twilight/hardware-configuration.nix | 20 +++++--------------
 .../nixos/twilight/nvidia-drivers.nix         |  8 +-------
 3 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/configurations/nixos/twilight/configuration.nix b/configurations/nixos/twilight/configuration.nix
index 0306f19..6cef2fb 100644
--- a/configurations/nixos/twilight/configuration.nix
+++ b/configurations/nixos/twilight/configuration.nix
@@ -10,6 +10,14 @@
 
   nixpkgs.config.allowUnfree = true;
 
+  boot.initrd.availableKernelModules = ["usb_storage"];
+  boot.kernelModules = ["sg"];
+
+  boot.loader = {
+    systemd-boot.enable = true;
+    efi.canTouchEfiVariables = true;
+  };
+
   sops.secrets = {
     "vpn-keys/tailscale-authkey/twilight" = {
       sopsFile = "${inputs.secrets}/vpn-keys.yaml";
diff --git a/configurations/nixos/twilight/hardware-configuration.nix b/configurations/nixos/twilight/hardware-configuration.nix
index 9a4c2d2..1389caf 100644
--- a/configurations/nixos/twilight/hardware-configuration.nix
+++ b/configurations/nixos/twilight/hardware-configuration.nix
@@ -4,7 +4,6 @@
 {
   config,
   lib,
-  pkgs,
   modulesPath,
   ...
 }: {
@@ -12,20 +11,10 @@
     (modulesPath + "/installer/scan/not-detected.nix")
   ];
 
-  boot = {
-    initrd = {
-      availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
-      kernelModules = [];
-    };
-    kernelModules = ["kvm-amd" "sg"];
-    extraModulePackages = [];
-
-    # Bootloader.
-    loader = {
-      systemd-boot.enable = true;
-      efi.canTouchEfiVariables = true;
-    };
-  };
+  boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
+  boot.initrd.kernelModules = [];
+  boot.kernelModules = ["kvm-amd"];
+  boot.extraModulePackages = [];
 
   fileSystems = {
     "/" = {
@@ -49,4 +38,5 @@
   networking.useDHCP = lib.mkDefault true;
 
   nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
 }
diff --git a/configurations/nixos/twilight/nvidia-drivers.nix b/configurations/nixos/twilight/nvidia-drivers.nix
index 883b5cb..d373bf2 100644
--- a/configurations/nixos/twilight/nvidia-drivers.nix
+++ b/configurations/nixos/twilight/nvidia-drivers.nix
@@ -1,8 +1,4 @@
-{
-  lib,
-  config,
-  ...
-}: {
+{config, ...}: {
   services.xserver = {
     # Load nvidia driver for Xorg and Wayland
     videoDrivers = ["nvidia"];
@@ -46,7 +42,5 @@
       # Optionally, you may need to select the appropriate driver version for your specific GPU.
       package = config.boot.kernelPackages.nvidiaPackages.production;
     };
-
-    cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
   };
 }

From e6a640abfc772e034b9dcdffc14a5101d8973fac Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Sun, 1 Jun 2025 23:52:13 -0500
Subject: [PATCH 26/51] fixed warning in nvida-drivers

---
 configurations/nixos/twilight/nvidia-drivers.nix | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/configurations/nixos/twilight/nvidia-drivers.nix b/configurations/nixos/twilight/nvidia-drivers.nix
index d373bf2..47763f8 100644
--- a/configurations/nixos/twilight/nvidia-drivers.nix
+++ b/configurations/nixos/twilight/nvidia-drivers.nix
@@ -1,8 +1,9 @@
 {config, ...}: {
-  services.xserver = {
-    # Load nvidia driver for Xorg and Wayland
-    videoDrivers = ["nvidia"];
-
+  services = {
+    xserver = {
+      # Load nvidia driver for Xorg and Wayland
+      videoDrivers = ["nvidia"];
+    };
     # Use X instead of wayland for gaming reasons
     displayManager.gdm.wayland = false;
   };

From dd537353547ae61bf29174997014180cca9cc644 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Mon, 2 Jun 2025 21:07:09 -0500
Subject: [PATCH 27/51] refactored leyla packages into several folders

---
 configurations/home-manager/leyla/default.nix |   2 +-
 .../home-manager/leyla/packages.nix           | 136 ------------------
 .../home-manager/leyla/packages/default.nix   | 104 ++++++++++++++
 .../home-manager/leyla/packages/direnv.nix    |  12 ++
 .../leyla/{ => packages}/firefox.nix          |  10 +-
 .../home-manager/leyla/packages/git.nix       |  22 +++
 .../home-manager/leyla/packages/openssh.nix   |  24 ++++
 .../leyla/{ => packages}/vscode/default.nix   |   3 +-
 .../{ => packages}/vscode/user-words.nix      |   0
 modules/home-manager-modules/continue.nix     |  60 ++++----
 modules/home-manager-modules/default.nix      |   1 +
 modules/home-manager-modules/openssh.nix      | 117 +++++++--------
 modules/home-manager-modules/user.nix         |  17 +++
 13 files changed, 275 insertions(+), 233 deletions(-)
 delete mode 100644 configurations/home-manager/leyla/packages.nix
 create mode 100644 configurations/home-manager/leyla/packages/default.nix
 create mode 100644 configurations/home-manager/leyla/packages/direnv.nix
 rename configurations/home-manager/leyla/{ => packages}/firefox.nix (98%)
 create mode 100644 configurations/home-manager/leyla/packages/git.nix
 create mode 100644 configurations/home-manager/leyla/packages/openssh.nix
 rename configurations/home-manager/leyla/{ => packages}/vscode/default.nix (97%)
 rename configurations/home-manager/leyla/{ => packages}/vscode/user-words.nix (100%)
 create mode 100644 modules/home-manager-modules/user.nix

diff --git a/configurations/home-manager/leyla/default.nix b/configurations/home-manager/leyla/default.nix
index 90251a3..d7cecc4 100644
--- a/configurations/home-manager/leyla/default.nix
+++ b/configurations/home-manager/leyla/default.nix
@@ -1,7 +1,7 @@
 {osConfig, ...}: {
   imports = [
+    ./packages
     ./i18n.nix
-    ./packages.nix
     ./impermanence.nix
     ./dconf.nix
   ];
diff --git a/configurations/home-manager/leyla/packages.nix b/configurations/home-manager/leyla/packages.nix
deleted file mode 100644
index 020060d..0000000
--- a/configurations/home-manager/leyla/packages.nix
+++ /dev/null
@@ -1,136 +0,0 @@
-{
-  lib,
-  config,
-  osConfig,
-  pkgs,
-  ...
-}: let
-  userConfig = osConfig.host.users.leyla;
-  hardware = osConfig.host.hardware;
-in {
-  imports = [
-    ./vscode/default.nix
-    ./firefox.nix
-  ];
-
-  config = lib.mkMerge [
-    (lib.mkIf userConfig.isTerminalUser {
-      home.packages = with pkgs; [
-        # command line tools
-        sox
-        yt-dlp
-        ffmpeg
-        imagemagick
-      ];
-    })
-    (lib.mkIf userConfig.isDesktopUser {
-      nixpkgs.config = {
-        allowUnfree = true;
-      };
-
-      home.packages = (
-        lib.lists.optionals userConfig.isDesktopUser (
-          (with pkgs; [
-            # helvetica font
-            aileron
-
-            gnomeExtensions.dash-to-dock
-
-            # development tools
-            dbeaver-bin
-            bruno
-            proxmark3
-          ])
-          ++ (
-            lib.lists.optionals hardware.directAccess.enable (with pkgs; [
-              #foss platforms
-              signal-desktop-bin
-              bitwarden
-              ungoogled-chromium
-              libreoffice
-              inkscape
-              gimp
-              krita
-              freecad
-              # cura
-              # kicad-small
-              makemkv
-              onionshare
-              # rhythmbox
-              (lib.mkIf hardware.graphicsAcceleration.enable obs-studio)
-              # wireshark
-              # rpi-imager
-              # fritzing
-              mfoc
-              tor-browser
-              anki
-              pdfarranger
-              calibre
-              qbittorrent
-              picard
-
-              # proprietary platforms
-              discord
-              obsidian
-              prostudiomasters
-              (lib.mkIf hardware.graphicsAcceleration.enable davinci-resolve)
-
-              # development tools
-              # androidStudioPackages.canary
-              jetbrains.idea-community
-              qFlipper
-
-              # system tools
-              protonvpn-gui
-              openvpn
-              noisetorch
-
-              # hardware management tools
-              (lib.mkIf hardware.piperMouse.enable piper)
-              (lib.mkIf hardware.openRGB.enable openrgb)
-              (lib.mkIf hardware.viaKeyboard.enable via)
-            ])
-          )
-        )
-      );
-      programs = lib.mkIf userConfig.isDesktopUser {
-        # Let Home Manager install and manage itself.
-        home-manager.enable = true;
-
-        # set up git defaults
-        git = {
-          enable = true;
-          userName = "Leyla Becker";
-          userEmail = "git@jan-leila.com";
-          extraConfig.init.defaultBranch = "main";
-        };
-
-        # add direnv to auto load flakes for development
-        direnv = {
-          enable = true;
-          enableBashIntegration = true;
-          nix-direnv.enable = true;
-          config = {
-            global.hide_env_diff = true;
-            whitelist.exact = ["/home/leyla/documents/code/nix-config"];
-          };
-        };
-        bash.enable = true;
-
-        openssh = {
-          authorizedKeys = [
-            "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon"
-            "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIILimFIW2exEH/Xo7LtXkqgE04qusvnPNpPWSCeNrFkP leyla@defiant"
-            "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKBiZkg1c2aaNHiieBX4cEziqvJVj9pcDfzUrKU/mO0I leyla@twilight"
-          ];
-          hostKeys = [
-            {
-              type = "ed25519";
-              path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
-            }
-          ];
-        };
-      };
-    })
-  ];
-}
diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix
new file mode 100644
index 0000000..fd2347c
--- /dev/null
+++ b/configurations/home-manager/leyla/packages/default.nix
@@ -0,0 +1,104 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: let
+  hardware = osConfig.host.hardware;
+in {
+  imports = [
+    ./vscode
+    ./firefox.nix
+    ./direnv.nix
+    ./openssh.nix
+    ./git.nix
+  ];
+
+  config = lib.mkMerge [
+    (lib.mkIf config.user.isTerminalUser {
+      home.packages = with pkgs; [
+        # command line tools
+        sox
+        yt-dlp
+        ffmpeg
+        imagemagick
+      ];
+    })
+    (lib.mkIf config.user.isDesktopUser {
+      nixpkgs.config = {
+        allowUnfree = true;
+      };
+
+      home.packages = (
+        (with pkgs; [
+          # helvetica font
+          aileron
+
+          gnomeExtensions.dash-to-dock
+
+          # development tools
+          dbeaver-bin
+          bruno
+          proxmark3
+        ])
+        ++ (
+          lib.lists.optionals hardware.directAccess.enable (with pkgs; [
+            #foss platforms
+            signal-desktop-bin
+            bitwarden
+            ungoogled-chromium
+            libreoffice
+            inkscape
+            gimp
+            krita
+            freecad
+            # cura
+            # kicad-small
+            makemkv
+            onionshare
+            # rhythmbox
+            (lib.mkIf hardware.graphicsAcceleration.enable obs-studio)
+            # wireshark
+            # rpi-imager
+            # fritzing
+            mfoc
+            tor-browser
+            anki
+            pdfarranger
+            calibre
+            qbittorrent
+            picard
+
+            # proprietary platforms
+            discord
+            obsidian
+            prostudiomasters
+            (lib.mkIf hardware.graphicsAcceleration.enable davinci-resolve)
+
+            # development tools
+            # androidStudioPackages.canary
+            jetbrains.idea-community
+            qFlipper
+
+            # system tools
+            protonvpn-gui
+            openvpn
+            noisetorch
+
+            # hardware management tools
+            (lib.mkIf hardware.piperMouse.enable piper)
+            (lib.mkIf hardware.openRGB.enable openrgb)
+            (lib.mkIf hardware.viaKeyboard.enable via)
+          ])
+        )
+      );
+      programs = {
+        # Let Home Manager install and manage itself.
+        home-manager.enable = true;
+
+        bash.enable = true;
+      };
+    })
+  ];
+}
diff --git a/configurations/home-manager/leyla/packages/direnv.nix b/configurations/home-manager/leyla/packages/direnv.nix
new file mode 100644
index 0000000..630d0cc
--- /dev/null
+++ b/configurations/home-manager/leyla/packages/direnv.nix
@@ -0,0 +1,12 @@
+{config, ...}: {
+  config = {
+    programs = {
+      git = {
+        enable = config.user.isDesktopUser || config.user.isTerminalUser;
+        userName = "Leyla Becker";
+        userEmail = "git@jan-leila.com";
+        extraConfig.init.defaultBranch = "main";
+      };
+    };
+  };
+}
diff --git a/configurations/home-manager/leyla/firefox.nix b/configurations/home-manager/leyla/packages/firefox.nix
similarity index 98%
rename from configurations/home-manager/leyla/firefox.nix
rename to configurations/home-manager/leyla/packages/firefox.nix
index 0adea28..fcac972 100644
--- a/configurations/home-manager/leyla/firefox.nix
+++ b/configurations/home-manager/leyla/packages/firefox.nix
@@ -2,14 +2,12 @@
   lib,
   pkgs,
   inputs,
-  osConfig,
+  config,
   ...
-}: let
-  is-desktop-user = osConfig.host.users.leyla.isDesktopUser;
-in {
-  config = lib.mkIf is-desktop-user {
+}: {
+  config = {
     programs.firefox = {
-      enable = true;
+      enable = config.user.isDesktopUser;
       profiles.leyla = {
         settings = {
           "browser.search.defaultenginename" = "Searx";
diff --git a/configurations/home-manager/leyla/packages/git.nix b/configurations/home-manager/leyla/packages/git.nix
new file mode 100644
index 0000000..038c149
--- /dev/null
+++ b/configurations/home-manager/leyla/packages/git.nix
@@ -0,0 +1,22 @@
+{
+  lib,
+  config,
+  osConfig,
+  ...
+}: let
+  userConfig = osConfig.host.users.leyla;
+in {
+  config = lib.mkIf userConfig.isDesktopUser {
+    programs = {
+      direnv = {
+        enable = true;
+        enableBashIntegration = true;
+        nix-direnv.enable = true;
+        config = {
+          global.hide_env_diff = true;
+          whitelist.exact = ["${config.home.homeDirectory}/documents/code/nix-config"];
+        };
+      };
+    };
+  };
+}
diff --git a/configurations/home-manager/leyla/packages/openssh.nix b/configurations/home-manager/leyla/packages/openssh.nix
new file mode 100644
index 0000000..07b4488
--- /dev/null
+++ b/configurations/home-manager/leyla/packages/openssh.nix
@@ -0,0 +1,24 @@
+{
+  config,
+  osConfig,
+  ...
+}: {
+  config = {
+    programs = {
+      openssh = {
+        enable = config.user.isDesktopUser;
+        authorizedKeys = [
+          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon"
+          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIILimFIW2exEH/Xo7LtXkqgE04qusvnPNpPWSCeNrFkP leyla@defiant"
+          "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKBiZkg1c2aaNHiieBX4cEziqvJVj9pcDfzUrKU/mO0I leyla@twilight"
+        ];
+        hostKeys = [
+          {
+            type = "ed25519";
+            path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
+          }
+        ];
+      };
+    };
+  };
+}
diff --git a/configurations/home-manager/leyla/vscode/default.nix b/configurations/home-manager/leyla/packages/vscode/default.nix
similarity index 97%
rename from configurations/home-manager/leyla/vscode/default.nix
rename to configurations/home-manager/leyla/packages/vscode/default.nix
index c2ee066..4ad8c81 100644
--- a/configurations/home-manager/leyla/vscode/default.nix
+++ b/configurations/home-manager/leyla/packages/vscode/default.nix
@@ -8,9 +8,8 @@
 }: let
   nix-development-enabled = osConfig.host.nix-development.enable;
   ai-tooling-enabled = config.user.continue.enable && osConfig.host.ai.enable;
-  is-desktop-user = osConfig.host.users.leyla.isDesktopUser;
 in {
-  config = lib.mkIf is-desktop-user {
+  config = lib.mkIf config.user.isDesktopUser {
     nixpkgs = {
       overlays = [
         inputs.nix-vscode-extensions.overlays.default
diff --git a/configurations/home-manager/leyla/vscode/user-words.nix b/configurations/home-manager/leyla/packages/vscode/user-words.nix
similarity index 100%
rename from configurations/home-manager/leyla/vscode/user-words.nix
rename to configurations/home-manager/leyla/packages/vscode/user-words.nix
diff --git a/modules/home-manager-modules/continue.nix b/modules/home-manager-modules/continue.nix
index 327ee44..20ec52b 100644
--- a/modules/home-manager-modules/continue.nix
+++ b/modules/home-manager-modules/continue.nix
@@ -7,40 +7,38 @@
 }: let
   ai-tooling-enabled = config.user.continue.enable && osConfig.host.ai.enable;
 in {
-  options = {
-    user.continue = {
-      enable = lib.mkEnableOption "should continue be enabled on this machine";
-      docs = lib.mkOption {
-        type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
-          options = {
-            name = lib.mkOption {
-              type = lib.types.str;
-              default = name;
-            };
-            startUrl = lib.mkOption {
-              type = lib.types.str;
-            };
+  options.user.continue = {
+    enable = lib.mkEnableOption "should continue be enabled on this machine";
+    docs = lib.mkOption {
+      type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
+        options = {
+          name = lib.mkOption {
+            type = lib.types.str;
+            default = name;
           };
-        }));
-      };
-      context = lib.mkOption {
-        type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
-          options = {
-            provider = lib.mkOption {
-              type = lib.types.str;
-              default = name;
-            };
+          startUrl = lib.mkOption {
+            type = lib.types.str;
           };
-        }));
-        default = {
-          "code" = {};
-          "docs" = {};
-          "diff" = {};
-          "terminal" = {};
-          "problems" = {};
-          "folder" = {};
-          "codebase" = {};
         };
+      }));
+    };
+    context = lib.mkOption {
+      type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
+        options = {
+          provider = lib.mkOption {
+            type = lib.types.str;
+            default = name;
+          };
+        };
+      }));
+      default = {
+        "code" = {};
+        "docs" = {};
+        "diff" = {};
+        "terminal" = {};
+        "problems" = {};
+        "folder" = {};
+        "codebase" = {};
       };
     };
   };
diff --git a/modules/home-manager-modules/default.nix b/modules/home-manager-modules/default.nix
index ee47fb5..b4d9c16 100644
--- a/modules/home-manager-modules/default.nix
+++ b/modules/home-manager-modules/default.nix
@@ -1,6 +1,7 @@
 # this folder container modules that are for home manager only
 {...}: {
   imports = [
+    ./user.nix
     ./flipperzero.nix
     ./i18n.nix
     ./openssh.nix
diff --git a/modules/home-manager-modules/openssh.nix b/modules/home-manager-modules/openssh.nix
index 7b646b8..c8ba22d 100644
--- a/modules/home-manager-modules/openssh.nix
+++ b/modules/home-manager-modules/openssh.nix
@@ -6,6 +6,7 @@
   ...
 }: {
   options.programs.openssh = {
+    enable = lib.mkEnableOption "should we enable openssh";
     authorizedKeys = lib.mkOption {
       type = lib.types.listOf lib.types.str;
       default = [];
@@ -37,63 +38,65 @@
     };
   };
 
-  config = lib.mkMerge [
-    (
-      lib.mkIf ((builtins.length config.programs.openssh.hostKeys) != 0) {
-        services.ssh-agent.enable = true;
-        programs.ssh = {
-          enable = true;
-          compression = true;
-          addKeysToAgent = "confirm";
-          extraConfig = lib.strings.concatLines (
-            builtins.map (hostKey: "IdentityFile ~/.ssh/${hostKey.path}") config.programs.openssh.hostKeys
+  config = lib.mkIf config.programs.openssh.enable (
+    lib.mkMerge [
+      (
+        lib.mkIf ((builtins.length config.programs.openssh.hostKeys) != 0) {
+          services.ssh-agent.enable = true;
+          programs.ssh = {
+            enable = true;
+            compression = true;
+            addKeysToAgent = "confirm";
+            extraConfig = lib.strings.concatLines (
+              builtins.map (hostKey: "IdentityFile ~/.ssh/${hostKey.path}") config.programs.openssh.hostKeys
+            );
+          };
+
+          systemd.user.services = builtins.listToAttrs (
+            builtins.map (hostKey:
+              lib.attrsets.nameValuePair "ssh-gen-keys-${hostKey.path}" {
+                Install = {
+                  WantedBy = ["default.target"];
+                };
+                Service = let
+                  path = "${config.home.homeDirectory}/.ssh/${hostKey.path}";
+                in {
+                  Restart = "always";
+                  Type = "simple";
+                  ExecStart = "${
+                    pkgs.writeShellScript "ssh-gen-keys" ''
+                      if ! [ -s "${path}" ]; then
+                          if ! [ -h "${path}" ]; then
+                              rm -f "${path}"
+                          fi
+                          mkdir -p "$(dirname '${path}')"
+                          chmod 0755 "$(dirname '${path}')"
+                          ${pkgs.openssh}/bin/ssh-keygen \
+                            -t "${hostKey.type}" \
+                            ${lib.optionalString (hostKey ? bits) "-b ${toString hostKey.bits}"} \
+                            ${lib.optionalString (hostKey ? rounds) "-a ${toString hostKey.rounds}"} \
+                            ${lib.optionalString (hostKey ? comment) "-C '${hostKey.comment}'"} \
+                            ${lib.optionalString (hostKey ? openSSHFormat && hostKey.openSSHFormat) "-o"} \
+                            -f "${path}" \
+                            -N ""
+                          chown ${config.home.username} ${path}*
+                          chgrp ${config.home.username} ${path}*
+                      fi
+                    ''
+                  }";
+                };
+              })
+            config.programs.openssh.hostKeys
+          );
+        }
+      )
+      (lib.mkIf osConfig.host.impermanence.enable {
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          files = lib.lists.flatten (
+            builtins.map (hostKey: [".ssh/${hostKey.path}" ".ssh/${hostKey.path}.pub"]) config.programs.openssh.hostKeys
           );
         };
-
-        systemd.user.services = builtins.listToAttrs (
-          builtins.map (hostKey:
-            lib.attrsets.nameValuePair "ssh-gen-keys-${hostKey.path}" {
-              Install = {
-                WantedBy = ["default.target"];
-              };
-              Service = let
-                path = "${config.home.homeDirectory}/.ssh/${hostKey.path}";
-              in {
-                Restart = "always";
-                Type = "simple";
-                ExecStart = "${
-                  pkgs.writeShellScript "ssh-gen-keys" ''
-                    if ! [ -s "${path}" ]; then
-                        if ! [ -h "${path}" ]; then
-                            rm -f "${path}"
-                        fi
-                        mkdir -p "$(dirname '${path}')"
-                        chmod 0755 "$(dirname '${path}')"
-                        ${pkgs.openssh}/bin/ssh-keygen \
-                          -t "${hostKey.type}" \
-                          ${lib.optionalString (hostKey ? bits) "-b ${toString hostKey.bits}"} \
-                          ${lib.optionalString (hostKey ? rounds) "-a ${toString hostKey.rounds}"} \
-                          ${lib.optionalString (hostKey ? comment) "-C '${hostKey.comment}'"} \
-                          ${lib.optionalString (hostKey ? openSSHFormat && hostKey.openSSHFormat) "-o"} \
-                          -f "${path}" \
-                          -N ""
-                        chown ${config.home.username} ${path}*
-                        chgrp ${config.home.username} ${path}*
-                    fi
-                  ''
-                }";
-              };
-            })
-          config.programs.openssh.hostKeys
-        );
-      }
-    )
-    (lib.mkIf osConfig.host.impermanence.enable {
-      home.persistence."/persist${config.home.homeDirectory}" = {
-        files = lib.lists.flatten (
-          builtins.map (hostKey: [".ssh/${hostKey.path}" ".ssh/${hostKey.path}.pub"]) config.programs.openssh.hostKeys
-        );
-      };
-    })
-  ];
+      })
+    ]
+  );
 }
diff --git a/modules/home-manager-modules/user.nix b/modules/home-manager-modules/user.nix
new file mode 100644
index 0000000..efce22d
--- /dev/null
+++ b/modules/home-manager-modules/user.nix
@@ -0,0 +1,17 @@
+{
+  lib,
+  config,
+  osConfig,
+  ...
+}: {
+  options.user = {
+    isDesktopUser = lib.mkOption {
+      type = lib.types.bool;
+      default = osConfig.host.users.${config.home.username}.isDesktopUser;
+    };
+    isTerminalUser = lib.mkOption {
+      type = lib.types.bool;
+      default = osConfig.host.users.${config.home.username}.isTerminalUser;
+    };
+  };
+}

From 666504a63aca6f31213bb28a299fc51103c3c432 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Mon, 2 Jun 2025 21:13:45 -0500
Subject: [PATCH 28/51] added notes for leyla packages

---
 .../home-manager/leyla/packages/default.nix   | 10 ++++++++
 .../home-manager/leyla/packages/direnv.nix    | 24 +++++++++++++------
 .../home-manager/leyla/packages/firefox.nix   |  1 +
 .../home-manager/leyla/packages/git.nix       | 24 ++++++-------------
 .../home-manager/leyla/packages/openssh.nix   |  1 +
 5 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix
index fd2347c..d8b200d 100644
--- a/configurations/home-manager/leyla/packages/default.nix
+++ b/configurations/home-manager/leyla/packages/default.nix
@@ -45,7 +45,9 @@ in {
         ++ (
           lib.lists.optionals hardware.directAccess.enable (with pkgs; [
             #foss platforms
+            # TODO: move signal to package with impermanence
             signal-desktop-bin
+            # TODO: move bitwarden to package with impermanence
             bitwarden
             ungoogled-chromium
             libreoffice
@@ -55,9 +57,12 @@ in {
             freecad
             # cura
             # kicad-small
+            # TODO: move makemkv to package with configs set and impermanence
             makemkv
             onionshare
             # rhythmbox
+
+            # TODO: move obs to package with impermanence
             (lib.mkIf hardware.graphicsAcceleration.enable obs-studio)
             # wireshark
             # rpi-imager
@@ -71,17 +76,22 @@ in {
             picard
 
             # proprietary platforms
+            # TODO: move discord to package with impermanence
             discord
+            # TODO: move obsidian to package with impermanence
             obsidian
+            # TODO: move prostudiomasters to package with impermanence
             prostudiomasters
             (lib.mkIf hardware.graphicsAcceleration.enable davinci-resolve)
 
             # development tools
             # androidStudioPackages.canary
+            # TODO: move idea to package with impermanence and installed extensions
             jetbrains.idea-community
             qFlipper
 
             # system tools
+            # TODO: move protonvpn to package with impermanence and installed extensions
             protonvpn-gui
             openvpn
             noisetorch
diff --git a/configurations/home-manager/leyla/packages/direnv.nix b/configurations/home-manager/leyla/packages/direnv.nix
index 630d0cc..038c149 100644
--- a/configurations/home-manager/leyla/packages/direnv.nix
+++ b/configurations/home-manager/leyla/packages/direnv.nix
@@ -1,11 +1,21 @@
-{config, ...}: {
-  config = {
+{
+  lib,
+  config,
+  osConfig,
+  ...
+}: let
+  userConfig = osConfig.host.users.leyla;
+in {
+  config = lib.mkIf userConfig.isDesktopUser {
     programs = {
-      git = {
-        enable = config.user.isDesktopUser || config.user.isTerminalUser;
-        userName = "Leyla Becker";
-        userEmail = "git@jan-leila.com";
-        extraConfig.init.defaultBranch = "main";
+      direnv = {
+        enable = true;
+        enableBashIntegration = true;
+        nix-direnv.enable = true;
+        config = {
+          global.hide_env_diff = true;
+          whitelist.exact = ["${config.home.homeDirectory}/documents/code/nix-config"];
+        };
       };
     };
   };
diff --git a/configurations/home-manager/leyla/packages/firefox.nix b/configurations/home-manager/leyla/packages/firefox.nix
index fcac972..a343b0a 100644
--- a/configurations/home-manager/leyla/packages/firefox.nix
+++ b/configurations/home-manager/leyla/packages/firefox.nix
@@ -341,5 +341,6 @@
         };
       };
     };
+    # TODO: impermanence module, prob in home-manager-modules?
   };
 }
diff --git a/configurations/home-manager/leyla/packages/git.nix b/configurations/home-manager/leyla/packages/git.nix
index 038c149..630d0cc 100644
--- a/configurations/home-manager/leyla/packages/git.nix
+++ b/configurations/home-manager/leyla/packages/git.nix
@@ -1,21 +1,11 @@
-{
-  lib,
-  config,
-  osConfig,
-  ...
-}: let
-  userConfig = osConfig.host.users.leyla;
-in {
-  config = lib.mkIf userConfig.isDesktopUser {
+{config, ...}: {
+  config = {
     programs = {
-      direnv = {
-        enable = true;
-        enableBashIntegration = true;
-        nix-direnv.enable = true;
-        config = {
-          global.hide_env_diff = true;
-          whitelist.exact = ["${config.home.homeDirectory}/documents/code/nix-config"];
-        };
+      git = {
+        enable = config.user.isDesktopUser || config.user.isTerminalUser;
+        userName = "Leyla Becker";
+        userEmail = "git@jan-leila.com";
+        extraConfig.init.defaultBranch = "main";
       };
     };
   };
diff --git a/configurations/home-manager/leyla/packages/openssh.nix b/configurations/home-manager/leyla/packages/openssh.nix
index 07b4488..e7131c9 100644
--- a/configurations/home-manager/leyla/packages/openssh.nix
+++ b/configurations/home-manager/leyla/packages/openssh.nix
@@ -20,5 +20,6 @@
         ];
       };
     };
+    # TODO: impermanence module, prob in home-manager-modules?
   };
 }

From 9fe35e74ad5feb6711ec3335d6ee12db15231c2c Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Mon, 2 Jun 2025 22:47:01 -0500
Subject: [PATCH 29/51] created program option entries for all packages that
 needs continual state

---
 configurations/home-manager/eve/packages.nix  | 62 ++++++++++---------
 .../home-manager/leyla/packages/default.nix   | 56 +++++++++--------
 .../home-manager/leyla/packages/firefox.nix   |  2 -
 .../home-manager/leyla/packages/git.nix       |  3 +-
 .../home-manager/leyla/packages/openssh.nix   |  2 -
 .../leyla/packages/vscode/default.nix         |  2 -
 modules/home-manager-modules/default.nix      |  1 +
 .../home-manager-modules/programs/anki.nix    | 24 +++++++
 .../programs/bitwarden.nix                    | 24 +++++++
 .../home-manager-modules/programs/calibre.nix | 24 +++++++
 .../home-manager-modules/programs/default.nix | 17 +++++
 .../home-manager-modules/programs/discord.nix | 24 +++++++
 .../home-manager-modules/programs/firefox.nix |  3 +
 .../home-manager-modules/programs/idea.nix    | 24 +++++++
 .../home-manager-modules/programs/makemkv.nix | 25 ++++++++
 modules/home-manager-modules/programs/obs.nix | 24 +++++++
 .../programs/obsidian.nix                     | 24 +++++++
 .../programs/prostudiomasters.nix             | 24 +++++++
 .../programs/protonvpn.nix                    | 24 +++++++
 .../programs/qbittorrent.nix                  | 24 +++++++
 .../home-manager-modules/programs/signal.nix  | 24 +++++++
 21 files changed, 374 insertions(+), 63 deletions(-)
 create mode 100644 modules/home-manager-modules/programs/anki.nix
 create mode 100644 modules/home-manager-modules/programs/bitwarden.nix
 create mode 100644 modules/home-manager-modules/programs/calibre.nix
 create mode 100644 modules/home-manager-modules/programs/default.nix
 create mode 100644 modules/home-manager-modules/programs/discord.nix
 create mode 100644 modules/home-manager-modules/programs/firefox.nix
 create mode 100644 modules/home-manager-modules/programs/idea.nix
 create mode 100644 modules/home-manager-modules/programs/makemkv.nix
 create mode 100644 modules/home-manager-modules/programs/obs.nix
 create mode 100644 modules/home-manager-modules/programs/obsidian.nix
 create mode 100644 modules/home-manager-modules/programs/prostudiomasters.nix
 create mode 100644 modules/home-manager-modules/programs/protonvpn.nix
 create mode 100644 modules/home-manager-modules/programs/qbittorrent.nix
 create mode 100644 modules/home-manager-modules/programs/signal.nix

diff --git a/configurations/home-manager/eve/packages.nix b/configurations/home-manager/eve/packages.nix
index 6cc4630..1abf501 100644
--- a/configurations/home-manager/eve/packages.nix
+++ b/configurations/home-manager/eve/packages.nix
@@ -12,41 +12,47 @@ in {
     # See https://search.nixos.org/packages for all options
     home.packages = lib.lists.optionals userConfig.isDesktopUser (
       with pkgs; [
-        firefox
-        bitwarden
-        discord
-        makemkv
-        signal-desktop-bin
         ungoogled-chromium
       ]
     );
 
     # Packages that need to be installed with some extra configuration
     # See https://home-manager-options.extranix.com/ for all options
-    programs = {
-      # Let Home Manager install and manage itself.
-      home-manager.enable = true;
+    programs = lib.mkMerge [
+      {
+        # Let Home Manager install and manage itself.
+        home-manager.enable = true;
+      }
+      (lib.mkIf (config.user.isDesktopUser || config.user.isTerminalUser) {
+        git = {
+          enable = true;
+          userName = "Eve";
+          userEmail = "evesnrobins@gmail.com";
+          extraConfig.init.defaultBranch = "main";
+        };
 
-      git = {
-        enable = true;
-        userName = "Eve";
-        userEmail = "evesnrobins@gmail.com";
-        extraConfig.init.defaultBranch = "main";
-      };
+        openssh = {
+          enable = true;
+          hostKeys = [
+            {
+              type = "ed25519";
+              path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
+            }
+          ];
+        };
+      })
+      (lib.mkIf userConfig.isDesktopUser {
+        vscode = {
+          enable = true;
+          package = pkgs.vscodium;
+        };
 
-      vscode = {
-        enable = true;
-        package = pkgs.vscodium;
-      };
-
-      openssh = {
-        hostKeys = [
-          {
-            type = "ed25519";
-            path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
-          }
-        ];
-      };
-    };
+        firefox.enable = true;
+        bitwarden.enable = true;
+        discord.enable = true;
+        makemkv.enable = true;
+        signal-desktop-bin.enable = true;
+      })
+    ];
   };
 }
diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix
index d8b200d..cfe70cc 100644
--- a/configurations/home-manager/leyla/packages/default.nix
+++ b/configurations/home-manager/leyla/packages/default.nix
@@ -45,10 +45,6 @@ in {
         ++ (
           lib.lists.optionals hardware.directAccess.enable (with pkgs; [
             #foss platforms
-            # TODO: move signal to package with impermanence
-            signal-desktop-bin
-            # TODO: move bitwarden to package with impermanence
-            bitwarden
             ungoogled-chromium
             libreoffice
             inkscape
@@ -57,42 +53,25 @@ in {
             freecad
             # cura
             # kicad-small
-            # TODO: move makemkv to package with configs set and impermanence
-            makemkv
             onionshare
             # rhythmbox
 
-            # TODO: move obs to package with impermanence
-            (lib.mkIf hardware.graphicsAcceleration.enable obs-studio)
             # wireshark
             # rpi-imager
             # fritzing
             mfoc
             tor-browser
-            anki
             pdfarranger
-            calibre
-            qbittorrent
             picard
 
             # proprietary platforms
-            # TODO: move discord to package with impermanence
-            discord
-            # TODO: move obsidian to package with impermanence
-            obsidian
-            # TODO: move prostudiomasters to package with impermanence
-            prostudiomasters
             (lib.mkIf hardware.graphicsAcceleration.enable davinci-resolve)
 
             # development tools
             # androidStudioPackages.canary
-            # TODO: move idea to package with impermanence and installed extensions
-            jetbrains.idea-community
             qFlipper
 
             # system tools
-            # TODO: move protonvpn to package with impermanence and installed extensions
-            protonvpn-gui
             openvpn
             noisetorch
 
@@ -103,12 +82,35 @@ in {
           ])
         )
       );
-      programs = {
-        # Let Home Manager install and manage itself.
-        home-manager.enable = true;
-
-        bash.enable = true;
-      };
+      programs = lib.mkMerge [
+        {
+          # Let Home Manager install and manage itself.
+          home-manager.enable = true;
+          bash.enable = true;
+        }
+        (lib.mkIf (config.user.isDesktopUser || config.user.isTerminalUser) {
+          git.enable = true;
+          openssh.enable = true;
+        })
+        (lib.mkIf hardware.directAccess.enable {
+          anki.enable = true;
+          bitwarden.enable = true;
+          signal-desktop-bin.enable = true;
+          makemkv.enable = true;
+          obs-studio.enable = hardware.graphicsAcceleration.enable;
+          calibre.enable = true;
+          qbittorrent.enable = true;
+          discord.enable = true;
+          obsidian.enable = true;
+          prostudiomasters.enable = true;
+          jetbrains.idea-community.enable = true;
+          protonvpn-gui.enable = true;
+        })
+        (lib.mkIf (hardware.directAccess.enable && config.user.isDesktopUser) {
+          vscode.enable = true;
+          firefox.enable = true;
+        })
+      ];
     })
   ];
 }
diff --git a/configurations/home-manager/leyla/packages/firefox.nix b/configurations/home-manager/leyla/packages/firefox.nix
index a343b0a..f9787b9 100644
--- a/configurations/home-manager/leyla/packages/firefox.nix
+++ b/configurations/home-manager/leyla/packages/firefox.nix
@@ -2,12 +2,10 @@
   lib,
   pkgs,
   inputs,
-  config,
   ...
 }: {
   config = {
     programs.firefox = {
-      enable = config.user.isDesktopUser;
       profiles.leyla = {
         settings = {
           "browser.search.defaultenginename" = "Searx";
diff --git a/configurations/home-manager/leyla/packages/git.nix b/configurations/home-manager/leyla/packages/git.nix
index 630d0cc..568cd7a 100644
--- a/configurations/home-manager/leyla/packages/git.nix
+++ b/configurations/home-manager/leyla/packages/git.nix
@@ -1,8 +1,7 @@
-{config, ...}: {
+{...}: {
   config = {
     programs = {
       git = {
-        enable = config.user.isDesktopUser || config.user.isTerminalUser;
         userName = "Leyla Becker";
         userEmail = "git@jan-leila.com";
         extraConfig.init.defaultBranch = "main";
diff --git a/configurations/home-manager/leyla/packages/openssh.nix b/configurations/home-manager/leyla/packages/openssh.nix
index e7131c9..91aec11 100644
--- a/configurations/home-manager/leyla/packages/openssh.nix
+++ b/configurations/home-manager/leyla/packages/openssh.nix
@@ -6,7 +6,6 @@
   config = {
     programs = {
       openssh = {
-        enable = config.user.isDesktopUser;
         authorizedKeys = [
           "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon"
           "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIILimFIW2exEH/Xo7LtXkqgE04qusvnPNpPWSCeNrFkP leyla@defiant"
@@ -20,6 +19,5 @@
         ];
       };
     };
-    # TODO: impermanence module, prob in home-manager-modules?
   };
 }
diff --git a/configurations/home-manager/leyla/packages/vscode/default.nix b/configurations/home-manager/leyla/packages/vscode/default.nix
index 4ad8c81..c21e01d 100644
--- a/configurations/home-manager/leyla/packages/vscode/default.nix
+++ b/configurations/home-manager/leyla/packages/vscode/default.nix
@@ -26,8 +26,6 @@ in {
         open-vsx = extensions.open-vsx;
         vscode-marketplace = extensions.vscode-marketplace;
       in {
-        enable = true;
-
         package = pkgs.vscodium;
 
         mutableExtensionsDir = false;
diff --git a/modules/home-manager-modules/default.nix b/modules/home-manager-modules/default.nix
index b4d9c16..faf6f58 100644
--- a/modules/home-manager-modules/default.nix
+++ b/modules/home-manager-modules/default.nix
@@ -6,5 +6,6 @@
     ./i18n.nix
     ./openssh.nix
     ./continue.nix
+    ./programs
   ];
 }
diff --git a/modules/home-manager-modules/programs/anki.nix b/modules/home-manager-modules/programs/anki.nix
new file mode 100644
index 0000000..d513657
--- /dev/null
+++ b/modules/home-manager-modules/programs/anki.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.anki = {
+    enable = lib.mkEnableOption "enable anki";
+  };
+
+  config = lib.mkIf config.programs.anki.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        anki
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for anki
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/bitwarden.nix b/modules/home-manager-modules/programs/bitwarden.nix
new file mode 100644
index 0000000..b68ee30
--- /dev/null
+++ b/modules/home-manager-modules/programs/bitwarden.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.bitwarden = {
+    enable = lib.mkEnableOption "enable bitwarden";
+  };
+
+  config = lib.mkIf config.programs.bitwarden.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        bitwarden
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for bitwarden
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/calibre.nix b/modules/home-manager-modules/programs/calibre.nix
new file mode 100644
index 0000000..f22fbbf
--- /dev/null
+++ b/modules/home-manager-modules/programs/calibre.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.calibre = {
+    enable = lib.mkEnableOption "enable calibre";
+  };
+
+  config = lib.mkIf config.programs.calibre.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        calibre
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for calibre
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/default.nix b/modules/home-manager-modules/programs/default.nix
new file mode 100644
index 0000000..a9139bc
--- /dev/null
+++ b/modules/home-manager-modules/programs/default.nix
@@ -0,0 +1,17 @@
+{...}: {
+  imports = [
+    ./firefox.nix
+    ./signal.nix
+    ./bitwarden.nix
+    ./makemkv.nix
+    ./obs.nix
+    ./anki.nix
+    ./qbittorrent.nix
+    ./discord.nix
+    ./obsidian.nix
+    ./prostudiomasters.nix
+    ./idea.nix
+    ./protonvpn.nix
+    ./calibre.nix
+  ];
+}
diff --git a/modules/home-manager-modules/programs/discord.nix b/modules/home-manager-modules/programs/discord.nix
new file mode 100644
index 0000000..a81bb03
--- /dev/null
+++ b/modules/home-manager-modules/programs/discord.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.discord = {
+    enable = lib.mkEnableOption "enable discord";
+  };
+
+  config = lib.mkIf config.programs.discord.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        discord
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for discord
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/firefox.nix b/modules/home-manager-modules/programs/firefox.nix
new file mode 100644
index 0000000..654a480
--- /dev/null
+++ b/modules/home-manager-modules/programs/firefox.nix
@@ -0,0 +1,3 @@
+{...}: {
+  # TODO: map firefox impermanence
+}
diff --git a/modules/home-manager-modules/programs/idea.nix b/modules/home-manager-modules/programs/idea.nix
new file mode 100644
index 0000000..a7a6d7f
--- /dev/null
+++ b/modules/home-manager-modules/programs/idea.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.jetbrains.idea-community = {
+    enable = lib.mkEnableOption "enable idea-community";
+  };
+
+  config = lib.mkIf config.programs.jetbrains.idea-community.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        jetbrains.idea-community
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for idea-community
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/makemkv.nix b/modules/home-manager-modules/programs/makemkv.nix
new file mode 100644
index 0000000..c1040bb
--- /dev/null
+++ b/modules/home-manager-modules/programs/makemkv.nix
@@ -0,0 +1,25 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.makemkv = {
+    enable = lib.mkEnableOption "enable makemkv";
+  };
+
+  config = lib.mkIf config.programs.makemkv.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        makemkv
+      ];
+      # TODO: write config file for makemkv
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for makemkv
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/obs.nix b/modules/home-manager-modules/programs/obs.nix
new file mode 100644
index 0000000..b29521a
--- /dev/null
+++ b/modules/home-manager-modules/programs/obs.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.obs-studio = {
+    # enable = lib.mkEnableOption "enable obs";
+  };
+
+  config = lib.mkIf config.programs.obs-studio.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        obs-studio
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for obs
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/obsidian.nix b/modules/home-manager-modules/programs/obsidian.nix
new file mode 100644
index 0000000..57f119b
--- /dev/null
+++ b/modules/home-manager-modules/programs/obsidian.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.obsidian = {
+    # enable = lib.mkEnableOption "enable obsidian";
+  };
+
+  config = lib.mkIf config.programs.obsidian.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        obsidian
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for obsidian
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/prostudiomasters.nix b/modules/home-manager-modules/programs/prostudiomasters.nix
new file mode 100644
index 0000000..4481f5b
--- /dev/null
+++ b/modules/home-manager-modules/programs/prostudiomasters.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.prostudiomasters = {
+    enable = lib.mkEnableOption "enable prostudiomasters";
+  };
+
+  config = lib.mkIf config.programs.prostudiomasters.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        prostudiomasters
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for prostudiomasters
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/protonvpn.nix b/modules/home-manager-modules/programs/protonvpn.nix
new file mode 100644
index 0000000..1ddedc7
--- /dev/null
+++ b/modules/home-manager-modules/programs/protonvpn.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.protonvpn-gui = {
+    enable = lib.mkEnableOption "enable protonvpn";
+  };
+
+  config = lib.mkIf config.programs.protonvpn-gui.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        protonvpn-gui
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for protonvpn
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/qbittorrent.nix b/modules/home-manager-modules/programs/qbittorrent.nix
new file mode 100644
index 0000000..1e98c3e
--- /dev/null
+++ b/modules/home-manager-modules/programs/qbittorrent.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.qbittorrent = {
+    enable = lib.mkEnableOption "enable qbittorrent";
+  };
+
+  config = lib.mkIf config.programs.qbittorrent.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        qbittorrent
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for qbittorrent
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/signal.nix b/modules/home-manager-modules/programs/signal.nix
new file mode 100644
index 0000000..4eb0f37
--- /dev/null
+++ b/modules/home-manager-modules/programs/signal.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.signal-desktop-bin = {
+    enable = lib.mkEnableOption "enable signal";
+  };
+
+  config = lib.mkIf config.programs.signal-desktop-bin.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        signal-desktop-bin
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for signal
+      }
+    )
+  ]);
+}

From d741c252914683a6e5f38eb50f2fdcf262badef7 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Mon, 2 Jun 2025 22:50:35 -0500
Subject: [PATCH 30/51] moved some packages under desktop + direct access

---
 .../home-manager/leyla/packages/default.nix      | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix
index cfe70cc..ff32361 100644
--- a/configurations/home-manager/leyla/packages/default.nix
+++ b/configurations/home-manager/leyla/packages/default.nix
@@ -92,21 +92,21 @@ in {
           git.enable = true;
           openssh.enable = true;
         })
-        (lib.mkIf hardware.directAccess.enable {
-          anki.enable = true;
+        (lib.mkIf config.user.isDesktopUser {
           bitwarden.enable = true;
-          signal-desktop-bin.enable = true;
-          makemkv.enable = true;
           obs-studio.enable = hardware.graphicsAcceleration.enable;
-          calibre.enable = true;
           qbittorrent.enable = true;
-          discord.enable = true;
-          obsidian.enable = true;
           prostudiomasters.enable = true;
-          jetbrains.idea-community.enable = true;
           protonvpn-gui.enable = true;
         })
         (lib.mkIf (hardware.directAccess.enable && config.user.isDesktopUser) {
+          anki.enable = true;
+          makemkv.enable = true;
+          discord.enable = true;
+          signal-desktop-bin.enable = true;
+          calibre.enable = true;
+          obsidian.enable = true;
+          jetbrains.idea-community.enable = true;
           vscode.enable = true;
           firefox.enable = true;
         })

From eca8dfcf69ed8a312ea1326f7493535513a0d0b4 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Mon, 2 Jun 2025 23:15:17 -0500
Subject: [PATCH 31/51] removed extra packages

---
 flake.lock                                    | 24 +++++++++----------
 modules/home-manager-modules/programs/obs.nix | 10 --------
 .../programs/obsidian.nix                     | 10 --------
 3 files changed, 12 insertions(+), 32 deletions(-)

diff --git a/flake.lock b/flake.lock
index bbaffa4..f77dacd 100644
--- a/flake.lock
+++ b/flake.lock
@@ -7,11 +7,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748225455,
-        "narHash": "sha256-AzlJCKaM4wbEyEpV3I/PUq5mHnib2ryEy32c+qfj6xk=",
+        "lastModified": 1748832438,
+        "narHash": "sha256-/CtyLVfNaFP7PrOPrTEuGOJBIhcBKVQ91KiEbtXJi0A=",
         "owner": "nix-community",
         "repo": "disko",
-        "rev": "a894f2811e1ee8d10c50560551e50d6ab3c392ba",
+        "rev": "58d6e5a83fff9982d57e0a0a994d4e5c0af441e4",
         "type": "github"
       },
       "original": {
@@ -28,11 +28,11 @@
       },
       "locked": {
         "dir": "pkgs/firefox-addons",
-        "lastModified": 1748730131,
-        "narHash": "sha256-QHKZlwzw80hoJkNGXQePIg4u109lqcodALkont2WJAc=",
+        "lastModified": 1748923398,
+        "narHash": "sha256-794RwyZJto9NoFlGYuhWKhkhkJ0KrH9Paw5w1DM2zA0=",
         "owner": "rycee",
         "repo": "nur-expressions",
-        "rev": "aa7bfc2ec4763b57386fcd50242c390a596b9bb0",
+        "rev": "9eb346d6488b06f04809da4de2073666e25ede9d",
         "type": "gitlab"
       },
       "original": {
@@ -115,11 +115,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748811839,
-        "narHash": "sha256-MDl6vpEK18ZfPHfoeOa9dGRdwVWNfmCCGazt72nHw+U=",
+        "lastModified": 1748923085,
+        "narHash": "sha256-wXguCR+auZ5eoW8fKlm0C/6LNXL+1r4UXNLylwV7wQU=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "6abf27943bbb09a0f9d443df45ec70b07a6cbe20",
+        "rev": "5adc1a51a2fa8efec9d4eaa4f7df97908cded00d",
         "type": "github"
       },
       "original": {
@@ -227,11 +227,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748744745,
-        "narHash": "sha256-kcj58eYic+yLX/KjtHEOmn6lVnCRwL1IfRGnb8aHprE=",
+        "lastModified": 1748916419,
+        "narHash": "sha256-xeIzrAq+HNCp6Tx+lNfoty4D3zzfqSgQGgeTHXb2zGk=",
         "owner": "nix-community",
         "repo": "nix-vscode-extensions",
-        "rev": "c008ed9dd78efdeda5e9d5bb835c785e600791f6",
+        "rev": "1599b5b404e6bbdaf088f4c8872954146f8a19bb",
         "type": "github"
       },
       "original": {
diff --git a/modules/home-manager-modules/programs/obs.nix b/modules/home-manager-modules/programs/obs.nix
index b29521a..98c4fea 100644
--- a/modules/home-manager-modules/programs/obs.nix
+++ b/modules/home-manager-modules/programs/obs.nix
@@ -1,20 +1,10 @@
 {
   lib,
-  pkgs,
   config,
   osConfig,
   ...
 }: {
-  options.programs.obs-studio = {
-    # enable = lib.mkEnableOption "enable obs";
-  };
-
   config = lib.mkIf config.programs.obs-studio.enable (lib.mkMerge [
-    {
-      home.packages = with pkgs; [
-        obs-studio
-      ];
-    }
     (
       lib.mkIf osConfig.host.impermanence.enable {
         # TODO: map impermanence for obs
diff --git a/modules/home-manager-modules/programs/obsidian.nix b/modules/home-manager-modules/programs/obsidian.nix
index 57f119b..9dd9299 100644
--- a/modules/home-manager-modules/programs/obsidian.nix
+++ b/modules/home-manager-modules/programs/obsidian.nix
@@ -1,20 +1,10 @@
 {
   lib,
-  pkgs,
   config,
   osConfig,
   ...
 }: {
-  options.programs.obsidian = {
-    # enable = lib.mkEnableOption "enable obsidian";
-  };
-
   config = lib.mkIf config.programs.obsidian.enable (lib.mkMerge [
-    {
-      home.packages = with pkgs; [
-        obsidian
-      ];
-    }
     (
       lib.mkIf osConfig.host.impermanence.enable {
         # TODO: map impermanence for obsidian

From 7473ad541586ed857039bc651567c3b1d7278ce0 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Tue, 3 Jun 2025 11:19:34 -0500
Subject: [PATCH 32/51] moved more packages to module

---
 .../home-manager/leyla/packages/default.nix   | 66 +++++++++----------
 .../home-manager-modules/programs/bruno.nix   | 24 +++++++
 .../home-manager-modules/programs/dbeaver.nix | 24 +++++++
 .../home-manager-modules/programs/default.nix |  2 +
 4 files changed, 83 insertions(+), 33 deletions(-)
 create mode 100644 modules/home-manager-modules/programs/bruno.nix
 create mode 100644 modules/home-manager-modules/programs/dbeaver.nix

diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix
index ff32361..8f06441 100644
--- a/configurations/home-manager/leyla/packages/default.nix
+++ b/configurations/home-manager/leyla/packages/default.nix
@@ -16,6 +16,39 @@ in {
   ];
 
   config = lib.mkMerge [
+    {
+      programs = lib.mkMerge [
+        {
+          # Let Home Manager install and manage itself.
+          home-manager.enable = true;
+        }
+        (lib.mkIf (config.user.isTerminalUser || config.user.isDesktopUser) {
+          bash.enable = true;
+          git.enable = true;
+          openssh.enable = true;
+        })
+        (lib.mkIf config.user.isDesktopUser {
+          bitwarden.enable = true;
+          obs-studio.enable = hardware.graphicsAcceleration.enable;
+          qbittorrent.enable = true;
+          prostudiomasters.enable = true;
+          protonvpn-gui.enable = true;
+          dbeaver-bin.enable = true;
+          bruno.enable = true;
+        })
+        (lib.mkIf (hardware.directAccess.enable && config.user.isDesktopUser) {
+          anki.enable = true;
+          makemkv.enable = true;
+          discord.enable = true;
+          signal-desktop-bin.enable = true;
+          calibre.enable = true;
+          obsidian.enable = true;
+          jetbrains.idea-community.enable = true;
+          vscode.enable = true;
+          firefox.enable = true;
+        })
+      ];
+    }
     (lib.mkIf config.user.isTerminalUser {
       home.packages = with pkgs; [
         # command line tools
@@ -32,14 +65,10 @@ in {
 
       home.packages = (
         (with pkgs; [
-          # helvetica font
           aileron
 
           gnomeExtensions.dash-to-dock
 
-          # development tools
-          dbeaver-bin
-          bruno
           proxmark3
         ])
         ++ (
@@ -82,35 +111,6 @@ in {
           ])
         )
       );
-      programs = lib.mkMerge [
-        {
-          # Let Home Manager install and manage itself.
-          home-manager.enable = true;
-          bash.enable = true;
-        }
-        (lib.mkIf (config.user.isDesktopUser || config.user.isTerminalUser) {
-          git.enable = true;
-          openssh.enable = true;
-        })
-        (lib.mkIf config.user.isDesktopUser {
-          bitwarden.enable = true;
-          obs-studio.enable = hardware.graphicsAcceleration.enable;
-          qbittorrent.enable = true;
-          prostudiomasters.enable = true;
-          protonvpn-gui.enable = true;
-        })
-        (lib.mkIf (hardware.directAccess.enable && config.user.isDesktopUser) {
-          anki.enable = true;
-          makemkv.enable = true;
-          discord.enable = true;
-          signal-desktop-bin.enable = true;
-          calibre.enable = true;
-          obsidian.enable = true;
-          jetbrains.idea-community.enable = true;
-          vscode.enable = true;
-          firefox.enable = true;
-        })
-      ];
     })
   ];
 }
diff --git a/modules/home-manager-modules/programs/bruno.nix b/modules/home-manager-modules/programs/bruno.nix
new file mode 100644
index 0000000..b7e6ae3
--- /dev/null
+++ b/modules/home-manager-modules/programs/bruno.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.bruno = {
+    enable = lib.mkEnableOption "enable bruno";
+  };
+
+  config = lib.mkIf config.programs.bruno.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        bruno
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for bruno
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/dbeaver.nix b/modules/home-manager-modules/programs/dbeaver.nix
new file mode 100644
index 0000000..fed1d6d
--- /dev/null
+++ b/modules/home-manager-modules/programs/dbeaver.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  pkgs,
+  config,
+  osConfig,
+  ...
+}: {
+  options.programs.dbeaver-bin = {
+    enable = lib.mkEnableOption "enable dbeaver";
+  };
+
+  config = lib.mkIf config.programs.dbeaver-bin.enable (lib.mkMerge [
+    {
+      home.packages = with pkgs; [
+        dbeaver-bin
+      ];
+    }
+    (
+      lib.mkIf osConfig.host.impermanence.enable {
+        # TODO: map impermanence for dbeaver
+      }
+    )
+  ]);
+}
diff --git a/modules/home-manager-modules/programs/default.nix b/modules/home-manager-modules/programs/default.nix
index a9139bc..aa15701 100644
--- a/modules/home-manager-modules/programs/default.nix
+++ b/modules/home-manager-modules/programs/default.nix
@@ -13,5 +13,7 @@
     ./idea.nix
     ./protonvpn.nix
     ./calibre.nix
+    ./bruno.nix
+    ./dbeaver.nix
   ];
 }

From 9c7cc3e3a759f38c515e7b2e73dd2cbe5f1aaebf Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Tue, 3 Jun 2025 16:23:20 -0500
Subject: [PATCH 33/51] drafted out home manager steam configuration

---
 .../home-manager/leyla/packages/default.nix    |  1 +
 configurations/nixos/horizon/configuration.nix |  2 +-
 .../nixos/twilight/configuration.nix           |  2 +-
 .../home-manager-modules/programs/default.nix  |  1 +
 .../home-manager-modules/programs/steam.nix    | 17 +++++++++++++++++
 modules/nixos-modules/home-manager/default.nix |  1 +
 modules/nixos-modules/home-manager/steam.nix   | 18 ++++++++++++++++++
 7 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 modules/home-manager-modules/programs/steam.nix
 create mode 100644 modules/nixos-modules/home-manager/steam.nix

diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix
index 8f06441..5af20ef 100644
--- a/configurations/home-manager/leyla/packages/default.nix
+++ b/configurations/home-manager/leyla/packages/default.nix
@@ -46,6 +46,7 @@ in {
           jetbrains.idea-community.enable = true;
           vscode.enable = true;
           firefox.enable = true;
+          steam.enable = true;
         })
       ];
     }
diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix
index 5817e2b..8398a38 100644
--- a/configurations/nixos/horizon/configuration.nix
+++ b/configurations/nixos/horizon/configuration.nix
@@ -71,7 +71,7 @@
   programs = {
     adb.enable = true;
     steam = {
-      enable = true;
+      # enable = true;
       remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
       dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
     };
diff --git a/configurations/nixos/twilight/configuration.nix b/configurations/nixos/twilight/configuration.nix
index 6cef2fb..cb3813e 100644
--- a/configurations/nixos/twilight/configuration.nix
+++ b/configurations/nixos/twilight/configuration.nix
@@ -188,7 +188,7 @@
     cachefilesd
   ];
   programs.steam = {
-    enable = true;
+    # enable = true;
     remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
     dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
   };
diff --git a/modules/home-manager-modules/programs/default.nix b/modules/home-manager-modules/programs/default.nix
index aa15701..ee52da2 100644
--- a/modules/home-manager-modules/programs/default.nix
+++ b/modules/home-manager-modules/programs/default.nix
@@ -15,5 +15,6 @@
     ./calibre.nix
     ./bruno.nix
     ./dbeaver.nix
+    ./steam.nix
   ];
 }
diff --git a/modules/home-manager-modules/programs/steam.nix b/modules/home-manager-modules/programs/steam.nix
new file mode 100644
index 0000000..a754575
--- /dev/null
+++ b/modules/home-manager-modules/programs/steam.nix
@@ -0,0 +1,17 @@
+{
+  lib,
+  pkgs,
+  config,
+  ...
+}: {
+  options.programs.steam = {
+    enable = lib.mkEnableOption "enable steam";
+  };
+
+  config = lib.mkIf config.programs.steam.enable {
+    home.packages = with pkgs; [
+      steam
+      steam.run
+    ];
+  };
+}
diff --git a/modules/nixos-modules/home-manager/default.nix b/modules/nixos-modules/home-manager/default.nix
index cab004b..10f86c7 100644
--- a/modules/nixos-modules/home-manager/default.nix
+++ b/modules/nixos-modules/home-manager/default.nix
@@ -4,5 +4,6 @@
     ./flipperzero.nix
     ./i18n.nix
     ./openssh.nix
+    ./steam.nix
   ];
 }
diff --git a/modules/nixos-modules/home-manager/steam.nix b/modules/nixos-modules/home-manager/steam.nix
new file mode 100644
index 0000000..d151bca
--- /dev/null
+++ b/modules/nixos-modules/home-manager/steam.nix
@@ -0,0 +1,18 @@
+{
+  lib,
+  config,
+  ...
+}: let
+  setupSteam =
+    lib.lists.any
+    (value: value)
+    (lib.attrsets.mapAttrsToList (name: value: value.programs.steam.enable) config.home-manager.users);
+in {
+  config = lib.mkIf setupSteam {
+    programs.steam = {
+      enable = true;
+      # TODO: figure out how to not install steam here
+      # package = lib.mkDefault pkgs.emptyFile;
+    };
+  };
+}

From 2c011fda87b99f9a8d8811f18821940114644089 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Tue, 3 Jun 2025 16:32:44 -0500
Subject: [PATCH 34/51] moved steam config out of nix configurations

---
 configurations/home-manager/eve/packages.nix    | 1 +
 configurations/nixos/emergent/configuration.nix | 7 +------
 configurations/nixos/horizon/configuration.nix  | 5 -----
 configurations/nixos/twilight/configuration.nix | 5 -----
 modules/nixos-modules/default.nix               | 1 +
 modules/nixos-modules/steam.nix                 | 9 +++++++++
 6 files changed, 12 insertions(+), 16 deletions(-)
 create mode 100644 modules/nixos-modules/steam.nix

diff --git a/configurations/home-manager/eve/packages.nix b/configurations/home-manager/eve/packages.nix
index 1abf501..3c2a281 100644
--- a/configurations/home-manager/eve/packages.nix
+++ b/configurations/home-manager/eve/packages.nix
@@ -52,6 +52,7 @@ in {
         discord.enable = true;
         makemkv.enable = true;
         signal-desktop-bin.enable = true;
+        steam.enable = true;
       })
     ];
   };
diff --git a/configurations/nixos/emergent/configuration.nix b/configurations/nixos/emergent/configuration.nix
index aacc820..c75c162 100644
--- a/configurations/nixos/emergent/configuration.nix
+++ b/configurations/nixos/emergent/configuration.nix
@@ -98,12 +98,7 @@
 
   # Packages that need to be installed with some extra configuration
   # See https://search.nixos.org/options for all options
-  programs.steam = {
-    enable = true;
-    remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
-    dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
-    localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
-  };
+  programs = {};
 
   # Some programs need SUID wrappers, can be configured further or are
   # started in user sessions.
diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix
index 8398a38..1c88cc3 100644
--- a/configurations/nixos/horizon/configuration.nix
+++ b/configurations/nixos/horizon/configuration.nix
@@ -70,11 +70,6 @@
 
   programs = {
     adb.enable = true;
-    steam = {
-      # enable = true;
-      remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
-      dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
-    };
   };
 
   networking = {
diff --git a/configurations/nixos/twilight/configuration.nix b/configurations/nixos/twilight/configuration.nix
index cb3813e..111c002 100644
--- a/configurations/nixos/twilight/configuration.nix
+++ b/configurations/nixos/twilight/configuration.nix
@@ -187,11 +187,6 @@
   environment.systemPackages = with pkgs; [
     cachefilesd
   ];
-  programs.steam = {
-    # enable = true;
-    remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
-    dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
-  };
   hardware.steam-hardware.enable = true; # Provides udev rules for controller, HTC vive, and Valve Index
 
   networking = {
diff --git a/modules/nixos-modules/default.nix b/modules/nixos-modules/default.nix
index 8cdeae9..2ba1a58 100644
--- a/modules/nixos-modules/default.nix
+++ b/modules/nixos-modules/default.nix
@@ -14,6 +14,7 @@
     ./ollama.nix
     ./ai.nix
     ./tailscale.nix
+    ./steam.nix
     ./server
   ];
 
diff --git a/modules/nixos-modules/steam.nix b/modules/nixos-modules/steam.nix
new file mode 100644
index 0000000..20c0978
--- /dev/null
+++ b/modules/nixos-modules/steam.nix
@@ -0,0 +1,9 @@
+{...}: {
+  programs = {
+    steam = {
+      remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
+      dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
+      localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
+    };
+  };
+}

From ef03167d23b28506cf3c086d8ca4b5688ded866f Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Tue, 3 Jun 2025 20:22:35 -0500
Subject: [PATCH 35/51] added TODO note

---
 modules/home-manager-modules/programs/steam.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/home-manager-modules/programs/steam.nix b/modules/home-manager-modules/programs/steam.nix
index a754575..551cb5d 100644
--- a/modules/home-manager-modules/programs/steam.nix
+++ b/modules/home-manager-modules/programs/steam.nix
@@ -14,4 +14,6 @@
       steam.run
     ];
   };
+
+  # TODO: bind impermanence config
 }

From 54722eff619a303b6ce59aa206bba12958622a52 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Tue, 3 Jun 2025 21:12:51 -0500
Subject: [PATCH 36/51] set up impermanence configurations for applications

---
 modules/home-manager-modules/programs/anki.nix      | 7 ++++++-
 modules/home-manager-modules/programs/bitwarden.nix | 7 ++++++-
 modules/home-manager-modules/programs/bruno.nix     | 7 ++++++-
 modules/home-manager-modules/programs/calibre.nix   | 7 ++++++-
 modules/home-manager-modules/programs/dbeaver.nix   | 7 ++++++-
 modules/home-manager-modules/programs/discord.nix   | 7 ++++++-
 6 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/modules/home-manager-modules/programs/anki.nix b/modules/home-manager-modules/programs/anki.nix
index d513657..13e28c9 100644
--- a/modules/home-manager-modules/programs/anki.nix
+++ b/modules/home-manager-modules/programs/anki.nix
@@ -17,7 +17,12 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for anki
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            "~/.local/share/Anki2"
+          ];
+          allowOther = true;
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/bitwarden.nix b/modules/home-manager-modules/programs/bitwarden.nix
index b68ee30..0265488 100644
--- a/modules/home-manager-modules/programs/bitwarden.nix
+++ b/modules/home-manager-modules/programs/bitwarden.nix
@@ -17,7 +17,12 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for bitwarden
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            "~/.config/Bitwarden"
+          ];
+          allowOther = true;
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/bruno.nix b/modules/home-manager-modules/programs/bruno.nix
index b7e6ae3..3323e5b 100644
--- a/modules/home-manager-modules/programs/bruno.nix
+++ b/modules/home-manager-modules/programs/bruno.nix
@@ -17,7 +17,12 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for bruno
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            "~/.config/bruno/"
+          ];
+          allowOther = true;
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/calibre.nix b/modules/home-manager-modules/programs/calibre.nix
index f22fbbf..c26cd5e 100644
--- a/modules/home-manager-modules/programs/calibre.nix
+++ b/modules/home-manager-modules/programs/calibre.nix
@@ -17,7 +17,12 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for calibre
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            "~/.config/calibre"
+          ];
+          allowOther = true;
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/dbeaver.nix b/modules/home-manager-modules/programs/dbeaver.nix
index fed1d6d..26dcc52 100644
--- a/modules/home-manager-modules/programs/dbeaver.nix
+++ b/modules/home-manager-modules/programs/dbeaver.nix
@@ -17,7 +17,12 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for dbeaver
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            "~/.local/share/DBeaverData/"
+          ];
+          allowOther = true;
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/discord.nix b/modules/home-manager-modules/programs/discord.nix
index a81bb03..a7cbb5f 100644
--- a/modules/home-manager-modules/programs/discord.nix
+++ b/modules/home-manager-modules/programs/discord.nix
@@ -17,7 +17,12 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for discord
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            "~/.config/discord/"
+          ];
+          allowOther = true;
+        };
       }
     )
   ]);

From 17cb9bbaf560066d3605db3ddf0fe39c7a810c44 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Tue, 3 Jun 2025 21:15:26 -0500
Subject: [PATCH 37/51] set up more continue agents for horizon

---
 .../nixos/horizon/configuration.nix           | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix
index 1c88cc3..f72b264 100644
--- a/configurations/nixos/horizon/configuration.nix
+++ b/configurations/nixos/horizon/configuration.nix
@@ -46,6 +46,28 @@
           roles = ["chat" "edit" "apply"];
           apiBase = "http://twilight:11434";
         };
+        "Deepseek Coder:6.7B" = {
+          model = "deepseek-coder:6.7b";
+          roles = ["chat" "edit" "apply"];
+          apiBase = "http://twilight:11434";
+        };
+        "Deepseek Coder:33B" = {
+          model = "deepseek-coder:33b";
+          roles = ["chat" "edit" "apply"];
+          apiBase = "http://twilight:11434";
+        };
+
+        "Deepseek r1:8B" = {
+          model = "deepseek-r1:8b";
+          roles = ["chat"];
+          apiBase = "http://twilight:11434";
+        };
+
+        "Deepseek r1:32B" = {
+          model = "deepseek-r1:32b";
+          roles = ["chat"];
+          apiBase = "http://twilight:11434";
+        };
 
         "qwen2.5-coder:1.5b-base" = {
           model = "qwen2.5-coder:1.5b-base";

From 8d86de4a2d7f9d9586219ba2202283b086c0e5b7 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Tue, 3 Jun 2025 21:17:08 -0500
Subject: [PATCH 38/51] drafted out firefox impermanence

---
 .../home-manager-modules/programs/firefox.nix | 32 ++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/modules/home-manager-modules/programs/firefox.nix b/modules/home-manager-modules/programs/firefox.nix
index 654a480..5e78114 100644
--- a/modules/home-manager-modules/programs/firefox.nix
+++ b/modules/home-manager-modules/programs/firefox.nix
@@ -1,3 +1,33 @@
-{...}: {
+{
+  lib,
+  config,
+  osConfig,
+  ...
+}: {
   # TODO: map firefox impermanence
+  config = lib.mkIf (config.programs.firefox.enable && osConfig.host.impermanence.enable) {
+    # firefox profiles are defined by: programs.firefox.profile
+    # TODO: only set these if we arn't using custom firefox profiles. If we are using custom profiles then we should set this for each firefox profile
+    # home.persistence."/persist${config.home.homeDirectory}" = {
+    #   directories = [
+    #     ".mozilla/firefox/default/extensions"
+    #   ];
+    #   files = [
+    #     ".mozilla/firefox/default/cookies.sqlite"
+    #     ".mozilla/firefox/default/favicons.sqlite"
+    #     # Permissions and zoom levels for each site
+    #     ".mozilla/firefox/default/permissions.sqlite"
+    #     ".mozilla/firefox/default/content-prefs.sqlite"
+    #     # Browser history and bookmarks
+    #     ".mozilla/firefox/default/places.sqlite"
+    #     # I guess this is useful?
+    #     # https://bugzilla.mozilla.org/show_bug.cgi?id=1511384
+    #     # https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria
+    #     ".mozilla/firefox/default/storage.sqlite"
+    #     # Extension configuration
+    #     ".mozilla/firefox/default/extension-settings.json"
+    #   ];
+    #   allowOther = true;
+    # };
+  };
 }

From 89373ac24366250e791a2a156018ebcb57016550 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 12:16:21 -0500
Subject: [PATCH 39/51] set up firefox impermanence

---
 configurations/home-manager/eve/packages.nix  |  2 +-
 .../home-manager-modules/programs/firefox.nix | 60 +++++++++++--------
 2 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/configurations/home-manager/eve/packages.nix b/configurations/home-manager/eve/packages.nix
index 3c2a281..30fc361 100644
--- a/configurations/home-manager/eve/packages.nix
+++ b/configurations/home-manager/eve/packages.nix
@@ -41,7 +41,7 @@ in {
           ];
         };
       })
-      (lib.mkIf userConfig.isDesktopUser {
+      (lib.mkIf config.user.isDesktopUser {
         vscode = {
           enable = true;
           package = pkgs.vscodium;
diff --git a/modules/home-manager-modules/programs/firefox.nix b/modules/home-manager-modules/programs/firefox.nix
index 5e78114..907b619 100644
--- a/modules/home-manager-modules/programs/firefox.nix
+++ b/modules/home-manager-modules/programs/firefox.nix
@@ -3,31 +3,41 @@
   config,
   osConfig,
   ...
-}: {
-  # TODO: map firefox impermanence
+}: let
+  buildProfilePersistence = profile: {
+    directories = [
+      ".mozilla/firefox/${profile}/extensions"
+    ];
+    files = [
+      ".mozilla/firefox/${profile}/cookies.sqlite"
+      ".mozilla/firefox/${profile}/favicons.sqlite"
+      # Permissions and ${profileName} levels for each site
+      ".mozilla/firefox/${profile}/permissions.sqlite"
+      ".mozilla/firefox/${profile}/content-prefs.sqlite"
+      # Browser history and bookmarks
+      ".mozilla/firefox/${profile}/places.sqlite"
+      # I guess this is useful?
+      # https://bugzilla.mozilla.org/show_bug.cgi?id=1511384
+      # https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria
+      ".mozilla/firefox/${profile}/storage.sqlite"
+      # Extension configuration
+      ".mozilla/firefox/${profile}/extension-settings.json"
+    ];
+    allowOther = true;
+  };
+in {
   config = lib.mkIf (config.programs.firefox.enable && osConfig.host.impermanence.enable) {
-    # firefox profiles are defined by: programs.firefox.profile
-    # TODO: only set these if we arn't using custom firefox profiles. If we are using custom profiles then we should set this for each firefox profile
-    # home.persistence."/persist${config.home.homeDirectory}" = {
-    #   directories = [
-    #     ".mozilla/firefox/default/extensions"
-    #   ];
-    #   files = [
-    #     ".mozilla/firefox/default/cookies.sqlite"
-    #     ".mozilla/firefox/default/favicons.sqlite"
-    #     # Permissions and zoom levels for each site
-    #     ".mozilla/firefox/default/permissions.sqlite"
-    #     ".mozilla/firefox/default/content-prefs.sqlite"
-    #     # Browser history and bookmarks
-    #     ".mozilla/firefox/default/places.sqlite"
-    #     # I guess this is useful?
-    #     # https://bugzilla.mozilla.org/show_bug.cgi?id=1511384
-    #     # https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria
-    #     ".mozilla/firefox/default/storage.sqlite"
-    #     # Extension configuration
-    #     ".mozilla/firefox/default/extension-settings.json"
-    #   ];
-    #   allowOther = true;
-    # };
+    home.persistence."/persist${config.home.homeDirectory}" = lib.mkMerge (
+      (
+        lib.attrsets.mapAttrsToList
+        (profile: _: buildProfilePersistence profile)
+        config.programs.firefox.profiles
+      )
+      ++ (
+        lib.lists.optional
+        ((builtins.length (lib.attrsets.mapAttrsToList (key: value: value) config.programs.firefox.profiles)) == 0)
+        (buildProfilePersistence "default")
+      )
+    );
   };
 }

From 4e94731d9c33c95e6776116e3e8a6ea6f1bf60e2 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 12:30:40 -0500
Subject: [PATCH 40/51] added impermanence for jetbrains idea-community

---
 modules/home-manager-modules/programs/idea.nix | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/modules/home-manager-modules/programs/idea.nix b/modules/home-manager-modules/programs/idea.nix
index a7a6d7f..f4edf12 100644
--- a/modules/home-manager-modules/programs/idea.nix
+++ b/modules/home-manager-modules/programs/idea.nix
@@ -17,7 +17,16 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for idea-community
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            # configuration
+            "~/.config/JetBrains/"
+            # plugins
+            "~/.local/share/JetBrains/"
+            # System and Logs
+            "~/.cache/JetBrains/"
+          ];
+        };
       }
     )
   ]);

From 50aca7b17014f102f413bc796bd236363f1a09d2 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 13:14:11 -0500
Subject: [PATCH 41/51] added applications key file

---
 .sops.yaml         |  4 ++++
 flake.lock         | 44 ++++++++++++++++++++++----------------------
 nix-config-secrets |  2 +-
 3 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/.sops.yaml b/.sops.yaml
index b8b0adf..a6e6f4f 100644
--- a/.sops.yaml
+++ b/.sops.yaml
@@ -13,3 +13,7 @@ creation_rules:
     key_groups:
       - age:
         - *leyla
+  - path_regex: secrets/application-keys.yaml$
+    key_groups:
+      - age:
+        - *leyla
\ No newline at end of file
diff --git a/flake.lock b/flake.lock
index f77dacd..eeebec5 100644
--- a/flake.lock
+++ b/flake.lock
@@ -28,11 +28,11 @@
       },
       "locked": {
         "dir": "pkgs/firefox-addons",
-        "lastModified": 1748923398,
-        "narHash": "sha256-794RwyZJto9NoFlGYuhWKhkhkJ0KrH9Paw5w1DM2zA0=",
+        "lastModified": 1749009805,
+        "narHash": "sha256-eRv4m89aPJvIAX9mZQcJM+l3sYG+OJvcLsiHvAvXalg=",
         "owner": "rycee",
         "repo": "nur-expressions",
-        "rev": "9eb346d6488b06f04809da4de2073666e25ede9d",
+        "rev": "622c38d004cdded682d9a5ab7323181dc6efb0c1",
         "type": "gitlab"
       },
       "original": {
@@ -115,11 +115,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748923085,
-        "narHash": "sha256-wXguCR+auZ5eoW8fKlm0C/6LNXL+1r4UXNLylwV7wQU=",
+        "lastModified": 1749049052,
+        "narHash": "sha256-wIt8ZBc8diKg1H5ibi3Bw9HUcPR2w3xy4ddcuzjgLb0=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "5adc1a51a2fa8efec9d4eaa4f7df97908cded00d",
+        "rev": "ffab96a8b4a523c4b5e2645ee09e95a75cbdbfab",
         "type": "github"
       },
       "original": {
@@ -185,11 +185,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748352827,
-        "narHash": "sha256-sNUUP6qxGkK9hXgJ+p362dtWLgnIWwOCmiq72LAWtYo=",
+        "lastModified": 1749012745,
+        "narHash": "sha256-Cax/k9ZRPKqTz18vZtmqGR45pHRXM+sDvEVd4V/3NrU=",
         "owner": "LnL7",
         "repo": "nix-darwin",
-        "rev": "44a7d0e687a87b73facfe94fba78d323a6686a90",
+        "rev": "fa6120c32f10bd2aac9e8c9a6e71528a9d9d823b",
         "type": "github"
       },
       "original": {
@@ -227,11 +227,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1748916419,
-        "narHash": "sha256-xeIzrAq+HNCp6Tx+lNfoty4D3zzfqSgQGgeTHXb2zGk=",
+        "lastModified": 1749002682,
+        "narHash": "sha256-v9K6RyPF/+4r/YJhjEH8y07VWE6Vj7Vl88E/K5m/uJ0=",
         "owner": "nix-community",
         "repo": "nix-vscode-extensions",
-        "rev": "1599b5b404e6bbdaf088f4c8872954146f8a19bb",
+        "rev": "46eb9c16d8ccfedf8bc648be03f9b2993fe3c994",
         "type": "github"
       },
       "original": {
@@ -242,11 +242,11 @@
     },
     "nixos-hardware": {
       "locked": {
-        "lastModified": 1748634340,
-        "narHash": "sha256-pZH4bqbOd8S+si6UcfjHovWDiWKiIGRNRMpmRWaDIms=",
+        "lastModified": 1749056381,
+        "narHash": "sha256-QITcurR19KZlrCngBoCjsFF2BdYsiCG4UqmlrVcLb8Q=",
         "owner": "NixOS",
         "repo": "nixos-hardware",
-        "rev": "daa628a725ab4948e0e2b795e8fb6f4c3e289a7a",
+        "rev": "029bd66faa180e11262dd1bc2732254c33415f52",
         "type": "github"
       },
       "original": {
@@ -258,11 +258,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1748693115,
-        "narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
+        "lastModified": 1748929857,
+        "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
+        "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
         "type": "github"
       },
       "original": {
@@ -292,11 +292,11 @@
     "secrets": {
       "flake": false,
       "locked": {
-        "lastModified": 1743538790,
-        "narHash": "sha256-QXmvyxfAhpifxAWcYTvuGfzv9I+9gHw0bq4WYtGEB9A=",
+        "lastModified": 1749060788,
+        "narHash": "sha256-bXTN8zJwbnUFEisKAZjO/6UWPVP6u38MGAmQI20QU8o=",
         "ref": "refs/heads/main",
-        "rev": "3d63dff77f8eda1667e3586169642cf256c4aa34",
-        "revCount": 17,
+        "rev": "96e0ee4409830716a1658b37737f9e05d366408e",
+        "revCount": 18,
         "type": "git",
         "url": "ssh://git@git.jan-leila.com/jan-leila/nix-config-secrets.git"
       },
diff --git a/nix-config-secrets b/nix-config-secrets
index 3d63dff..96e0ee4 160000
--- a/nix-config-secrets
+++ b/nix-config-secrets
@@ -1 +1 @@
-Subproject commit 3d63dff77f8eda1667e3586169642cf256c4aa34
+Subproject commit 96e0ee4409830716a1658b37737f9e05d366408e

From 7363fc97bc0c6248bc12891940175052777d5b62 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 13:19:44 -0500
Subject: [PATCH 42/51] updated application key file structure

---
 flake.lock         | 8 ++++----
 nix-config-secrets | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/flake.lock b/flake.lock
index eeebec5..636f746 100644
--- a/flake.lock
+++ b/flake.lock
@@ -292,11 +292,11 @@
     "secrets": {
       "flake": false,
       "locked": {
-        "lastModified": 1749060788,
-        "narHash": "sha256-bXTN8zJwbnUFEisKAZjO/6UWPVP6u38MGAmQI20QU8o=",
+        "lastModified": 1749061163,
+        "narHash": "sha256-WflcbitH7ErNZBFqZCdy1ODUqKF51xbu2zYfqA35+1M=",
         "ref": "refs/heads/main",
-        "rev": "96e0ee4409830716a1658b37737f9e05d366408e",
-        "revCount": 18,
+        "rev": "1c5c059c0c7b6ce691993262fe10a2b63e1c31ba",
+        "revCount": 19,
         "type": "git",
         "url": "ssh://git@git.jan-leila.com/jan-leila/nix-config-secrets.git"
       },
diff --git a/nix-config-secrets b/nix-config-secrets
index 96e0ee4..1c5c059 160000
--- a/nix-config-secrets
+++ b/nix-config-secrets
@@ -1 +1 @@
-Subproject commit 96e0ee4409830716a1658b37737f9e05d366408e
+Subproject commit 1c5c059c0c7b6ce691993262fe10a2b63e1c31ba

From 0f26b73f6a3e96aed1978432f80689b892083760 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 18:37:53 -0500
Subject: [PATCH 43/51] set up makemkv persistence

---
 .../home-manager/leyla/packages/default.nix   |  1 +
 .../home-manager/leyla/packages/makemkv.nix   | 17 +++++++++++++++
 modules/home-manager-modules/default.nix      |  1 +
 .../home-manager-modules/programs/makemkv.nix | 21 +++++++++++++++++--
 modules/home-manager-modules/sops.nix         |  7 +++++++
 5 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 configurations/home-manager/leyla/packages/makemkv.nix
 create mode 100644 modules/home-manager-modules/sops.nix

diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix
index 5af20ef..4acfaf1 100644
--- a/configurations/home-manager/leyla/packages/default.nix
+++ b/configurations/home-manager/leyla/packages/default.nix
@@ -13,6 +13,7 @@ in {
     ./direnv.nix
     ./openssh.nix
     ./git.nix
+    ./makemkv.nix
   ];
 
   config = lib.mkMerge [
diff --git a/configurations/home-manager/leyla/packages/makemkv.nix b/configurations/home-manager/leyla/packages/makemkv.nix
new file mode 100644
index 0000000..ee71955
--- /dev/null
+++ b/configurations/home-manager/leyla/packages/makemkv.nix
@@ -0,0 +1,17 @@
+{
+  config,
+  inputs,
+  ...
+}: {
+  config = {
+    sops.secrets = {
+      "application-keys/makemkv" = {
+        sopsFile = "${inputs.secrets}/application-keys.yaml";
+      };
+    };
+    programs.makemkv = {
+      appKeyFile = config.sops.placeholder."application-keys/makemkv";
+      destinationDir = "/home/leyla/downloads/makemkv";
+    };
+  };
+}
diff --git a/modules/home-manager-modules/default.nix b/modules/home-manager-modules/default.nix
index faf6f58..73876f4 100644
--- a/modules/home-manager-modules/default.nix
+++ b/modules/home-manager-modules/default.nix
@@ -1,6 +1,7 @@
 # this folder container modules that are for home manager only
 {...}: {
   imports = [
+    ./sops.nix
     ./user.nix
     ./flipperzero.nix
     ./i18n.nix
diff --git a/modules/home-manager-modules/programs/makemkv.nix b/modules/home-manager-modules/programs/makemkv.nix
index c1040bb..eca059d 100644
--- a/modules/home-manager-modules/programs/makemkv.nix
+++ b/modules/home-manager-modules/programs/makemkv.nix
@@ -7,6 +7,12 @@
 }: {
   options.programs.makemkv = {
     enable = lib.mkEnableOption "enable makemkv";
+    appKeyFile = lib.mkOption {
+      type = lib.types.str;
+    };
+    destinationDir = lib.mkOption {
+      type = lib.types.str;
+    };
   };
 
   config = lib.mkIf config.programs.makemkv.enable (lib.mkMerge [
@@ -14,11 +20,22 @@
       home.packages = with pkgs; [
         makemkv
       ];
-      # TODO: write config file for makemkv
+
+      sops.templates."MakeMKV.settings.conf".content = ''
+        app_DestinationDir = "${config.programs.makemkv.destinationDir}"
+        app_DestinationType = "2"
+        app_Key = "${config.programs.makemkv.appKeyFile}"
+      '';
+
+      home.file.".MakeMKV/settings.conf".source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."MakeMKV.settings.conf".path;
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for makemkv
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            ".MakeMKV"
+          ];
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/sops.nix b/modules/home-manager-modules/sops.nix
new file mode 100644
index 0000000..910fbb6
--- /dev/null
+++ b/modules/home-manager-modules/sops.nix
@@ -0,0 +1,7 @@
+{...}: {
+  config = {
+    sops = {
+      age.keyFile = "/var/lib/sops-nix/key.txt";
+    };
+  };
+}

From 033cc6bc2202749421defbda249c0568f4816899 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 18:43:22 -0500
Subject: [PATCH 44/51] removed outdated note

---
 configurations/home-manager/leyla/packages/firefox.nix | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configurations/home-manager/leyla/packages/firefox.nix b/configurations/home-manager/leyla/packages/firefox.nix
index f9787b9..1613cb3 100644
--- a/configurations/home-manager/leyla/packages/firefox.nix
+++ b/configurations/home-manager/leyla/packages/firefox.nix
@@ -339,6 +339,5 @@
         };
       };
     };
-    # TODO: impermanence module, prob in home-manager-modules?
   };
 }

From ca01e667a197e5175c903689d67aa79201539608 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 20:50:15 -0500
Subject: [PATCH 45/51] added more application persistence configurations

---
 modules/home-manager-modules/programs/obsidian.nix         | 6 +++++-
 modules/home-manager-modules/programs/prostudiomasters.nix | 6 +++++-
 modules/home-manager-modules/programs/protonvpn.nix        | 7 ++++++-
 modules/home-manager-modules/programs/qbittorrent.nix      | 6 +++++-
 modules/home-manager-modules/programs/signal.nix           | 6 +++++-
 5 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/modules/home-manager-modules/programs/obsidian.nix b/modules/home-manager-modules/programs/obsidian.nix
index 9dd9299..d2d9c77 100644
--- a/modules/home-manager-modules/programs/obsidian.nix
+++ b/modules/home-manager-modules/programs/obsidian.nix
@@ -7,7 +7,11 @@
   config = lib.mkIf config.programs.obsidian.enable (lib.mkMerge [
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for obsidian
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            ".config/obsidian"
+          ];
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/prostudiomasters.nix b/modules/home-manager-modules/programs/prostudiomasters.nix
index 4481f5b..372cfc6 100644
--- a/modules/home-manager-modules/programs/prostudiomasters.nix
+++ b/modules/home-manager-modules/programs/prostudiomasters.nix
@@ -17,7 +17,11 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for prostudiomasters
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            ".config/ProStudioMasters"
+          ];
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/protonvpn.nix b/modules/home-manager-modules/programs/protonvpn.nix
index 1ddedc7..9a0ee65 100644
--- a/modules/home-manager-modules/programs/protonvpn.nix
+++ b/modules/home-manager-modules/programs/protonvpn.nix
@@ -17,7 +17,12 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for protonvpn
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            ".config/protonvpn"
+            ".config/Proton"
+          ];
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/qbittorrent.nix b/modules/home-manager-modules/programs/qbittorrent.nix
index 1e98c3e..5d22c89 100644
--- a/modules/home-manager-modules/programs/qbittorrent.nix
+++ b/modules/home-manager-modules/programs/qbittorrent.nix
@@ -17,7 +17,11 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for qbittorrent
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            ".config/qBittorrent"
+          ];
+        };
       }
     )
   ]);
diff --git a/modules/home-manager-modules/programs/signal.nix b/modules/home-manager-modules/programs/signal.nix
index 4eb0f37..d75b8a6 100644
--- a/modules/home-manager-modules/programs/signal.nix
+++ b/modules/home-manager-modules/programs/signal.nix
@@ -17,7 +17,11 @@
     }
     (
       lib.mkIf osConfig.host.impermanence.enable {
-        # TODO: map impermanence for signal
+        home.persistence."/persist${config.home.homeDirectory}" = {
+          directories = [
+            ".config/Signal"
+          ];
+        };
       }
     )
   ]);

From 28ac8a4fa46b5a50f3cfb115fd0af84ff8a636ba Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 20:54:47 -0500
Subject: [PATCH 46/51] fixed home directory starts

---
 modules/home-manager-modules/programs/anki.nix      | 2 +-
 modules/home-manager-modules/programs/bitwarden.nix | 2 +-
 modules/home-manager-modules/programs/bruno.nix     | 2 +-
 modules/home-manager-modules/programs/calibre.nix   | 2 +-
 modules/home-manager-modules/programs/idea.nix      | 6 +++---
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/home-manager-modules/programs/anki.nix b/modules/home-manager-modules/programs/anki.nix
index 13e28c9..0e3ebdf 100644
--- a/modules/home-manager-modules/programs/anki.nix
+++ b/modules/home-manager-modules/programs/anki.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            "~/.local/share/Anki2"
+            ".local/share/Anki2"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/bitwarden.nix b/modules/home-manager-modules/programs/bitwarden.nix
index 0265488..117e302 100644
--- a/modules/home-manager-modules/programs/bitwarden.nix
+++ b/modules/home-manager-modules/programs/bitwarden.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            "~/.config/Bitwarden"
+            ".config/Bitwarden"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/bruno.nix b/modules/home-manager-modules/programs/bruno.nix
index 3323e5b..20b0ce6 100644
--- a/modules/home-manager-modules/programs/bruno.nix
+++ b/modules/home-manager-modules/programs/bruno.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            "~/.config/bruno/"
+            ".config/bruno/"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/calibre.nix b/modules/home-manager-modules/programs/calibre.nix
index c26cd5e..3d6e9db 100644
--- a/modules/home-manager-modules/programs/calibre.nix
+++ b/modules/home-manager-modules/programs/calibre.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            "~/.config/calibre"
+            ".config/calibre"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/idea.nix b/modules/home-manager-modules/programs/idea.nix
index f4edf12..8f2768e 100644
--- a/modules/home-manager-modules/programs/idea.nix
+++ b/modules/home-manager-modules/programs/idea.nix
@@ -20,11 +20,11 @@
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
             # configuration
-            "~/.config/JetBrains/"
+            ".config/JetBrains/"
             # plugins
-            "~/.local/share/JetBrains/"
+            ".local/share/JetBrains/"
             # System and Logs
-            "~/.cache/JetBrains/"
+            ".cache/JetBrains/"
           ];
         };
       }

From 8c4bd4291ddd893ad2cd07a84d551ffd3d67c0f1 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 21:00:04 -0500
Subject: [PATCH 47/51] updated paths to be based on xdg configurations

---
 configurations/home-manager/leyla/default.nix             | 8 ++++++--
 configurations/home-manager/leyla/impermanence.nix        | 5 +++--
 modules/home-manager-modules/programs/anki.nix            | 2 +-
 modules/home-manager-modules/programs/bitwarden.nix       | 2 +-
 modules/home-manager-modules/programs/bruno.nix           | 2 +-
 modules/home-manager-modules/programs/calibre.nix         | 2 +-
 modules/home-manager-modules/programs/dbeaver.nix         | 2 +-
 modules/home-manager-modules/programs/discord.nix         | 2 +-
 modules/home-manager-modules/programs/idea.nix            | 6 +++---
 modules/home-manager-modules/programs/obsidian.nix        | 2 +-
 .../home-manager-modules/programs/prostudiomasters.nix    | 2 +-
 modules/home-manager-modules/programs/protonvpn.nix       | 4 ++--
 modules/home-manager-modules/programs/qbittorrent.nix     | 2 +-
 modules/home-manager-modules/programs/signal.nix          | 2 +-
 14 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/configurations/home-manager/leyla/default.nix b/configurations/home-manager/leyla/default.nix
index d7cecc4..49abfe1 100644
--- a/configurations/home-manager/leyla/default.nix
+++ b/configurations/home-manager/leyla/default.nix
@@ -1,4 +1,8 @@
-{osConfig, ...}: {
+{
+  config,
+  osConfig,
+  ...
+}: {
   imports = [
     ./packages
     ./i18n.nix
@@ -35,7 +39,7 @@
         #   org.gradle.console=verbose
         #   org.gradle.daemon.idletimeout=3600000
         # '';
-        ".config/user-dirs.dirs" = {
+        "${config.xdg.configHome}/user-dirs.dirs" = {
           force = true;
           text = ''
             # This file is written by xdg-user-dirs-update
diff --git a/configurations/home-manager/leyla/impermanence.nix b/configurations/home-manager/leyla/impermanence.nix
index 29936b5..ceab775 100644
--- a/configurations/home-manager/leyla/impermanence.nix
+++ b/configurations/home-manager/leyla/impermanence.nix
@@ -1,5 +1,6 @@
 {
   lib,
+  config,
   osConfig,
   ...
 }: {
@@ -10,13 +11,13 @@
         "downloads"
         "documents"
         {
-          directory = ".local/share/Steam";
+          directory = "${config.xdg.dataHome}/Steam";
           method = "symlink";
         }
       ];
       files = [
         ".bash_history" # keep shell history around
-        ".local/share/recently-used.xbel" # gnome recently viewed files
+        "${config.xdg.dataHome}/recently-used.xbel" # gnome recently viewed files
       ];
       allowOther = true;
     };
diff --git a/modules/home-manager-modules/programs/anki.nix b/modules/home-manager-modules/programs/anki.nix
index 0e3ebdf..083d205 100644
--- a/modules/home-manager-modules/programs/anki.nix
+++ b/modules/home-manager-modules/programs/anki.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".local/share/Anki2"
+            "${config.xdg.dataHome}/Anki2/"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/bitwarden.nix b/modules/home-manager-modules/programs/bitwarden.nix
index 117e302..b9b91c4 100644
--- a/modules/home-manager-modules/programs/bitwarden.nix
+++ b/modules/home-manager-modules/programs/bitwarden.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".config/Bitwarden"
+            "${config.xdg.configHome}/Bitwarden"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/bruno.nix b/modules/home-manager-modules/programs/bruno.nix
index 20b0ce6..00b248f 100644
--- a/modules/home-manager-modules/programs/bruno.nix
+++ b/modules/home-manager-modules/programs/bruno.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".config/bruno/"
+            "${config.xdg.configHome}/bruno/"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/calibre.nix b/modules/home-manager-modules/programs/calibre.nix
index 3d6e9db..9e5f34e 100644
--- a/modules/home-manager-modules/programs/calibre.nix
+++ b/modules/home-manager-modules/programs/calibre.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".config/calibre"
+            "${config.xdg.configHome}/calibre"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/dbeaver.nix b/modules/home-manager-modules/programs/dbeaver.nix
index 26dcc52..a962459 100644
--- a/modules/home-manager-modules/programs/dbeaver.nix
+++ b/modules/home-manager-modules/programs/dbeaver.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            "~/.local/share/DBeaverData/"
+            "${config.xdg.dataHome}/DBeaverData/"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/discord.nix b/modules/home-manager-modules/programs/discord.nix
index a7cbb5f..e8605a5 100644
--- a/modules/home-manager-modules/programs/discord.nix
+++ b/modules/home-manager-modules/programs/discord.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            "~/.config/discord/"
+            "${config.xdg.configHome}/discord/"
           ];
           allowOther = true;
         };
diff --git a/modules/home-manager-modules/programs/idea.nix b/modules/home-manager-modules/programs/idea.nix
index 8f2768e..f0a928c 100644
--- a/modules/home-manager-modules/programs/idea.nix
+++ b/modules/home-manager-modules/programs/idea.nix
@@ -20,11 +20,11 @@
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
             # configuration
-            ".config/JetBrains/"
+            "${config.xdg.configHome}/JetBrains/"
             # plugins
-            ".local/share/JetBrains/"
+            "${config.xdg.dataHome}/JetBrains/"
             # System and Logs
-            ".cache/JetBrains/"
+            "${config.xdg.cacheHome}/JetBrains/"
           ];
         };
       }
diff --git a/modules/home-manager-modules/programs/obsidian.nix b/modules/home-manager-modules/programs/obsidian.nix
index d2d9c77..4d28b3e 100644
--- a/modules/home-manager-modules/programs/obsidian.nix
+++ b/modules/home-manager-modules/programs/obsidian.nix
@@ -9,7 +9,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".config/obsidian"
+            "${config.xdg.configHome}/obsidian"
           ];
         };
       }
diff --git a/modules/home-manager-modules/programs/prostudiomasters.nix b/modules/home-manager-modules/programs/prostudiomasters.nix
index 372cfc6..9e6088f 100644
--- a/modules/home-manager-modules/programs/prostudiomasters.nix
+++ b/modules/home-manager-modules/programs/prostudiomasters.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".config/ProStudioMasters"
+            "${config.xdg.configHome}/ProStudioMasters"
           ];
         };
       }
diff --git a/modules/home-manager-modules/programs/protonvpn.nix b/modules/home-manager-modules/programs/protonvpn.nix
index 9a0ee65..dd11aae 100644
--- a/modules/home-manager-modules/programs/protonvpn.nix
+++ b/modules/home-manager-modules/programs/protonvpn.nix
@@ -19,8 +19,8 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".config/protonvpn"
-            ".config/Proton"
+            "${config.xdg.configHome}/protonvpn"
+            "${config.xdg.configHome}/Proton"
           ];
         };
       }
diff --git a/modules/home-manager-modules/programs/qbittorrent.nix b/modules/home-manager-modules/programs/qbittorrent.nix
index 5d22c89..02e23df 100644
--- a/modules/home-manager-modules/programs/qbittorrent.nix
+++ b/modules/home-manager-modules/programs/qbittorrent.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".config/qBittorrent"
+            "${config.xdg.configHome}/qBittorrent"
           ];
         };
       }
diff --git a/modules/home-manager-modules/programs/signal.nix b/modules/home-manager-modules/programs/signal.nix
index d75b8a6..fdf0af9 100644
--- a/modules/home-manager-modules/programs/signal.nix
+++ b/modules/home-manager-modules/programs/signal.nix
@@ -19,7 +19,7 @@
       lib.mkIf osConfig.host.impermanence.enable {
         home.persistence."/persist${config.home.homeDirectory}" = {
           directories = [
-            ".config/Signal"
+            "${config.xdg.configHome}/Signal"
           ];
         };
       }

From fc294686bac331f7311fbb7987e58c5550eccad6 Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Wed, 4 Jun 2025 22:57:14 -0500
Subject: [PATCH 48/51] added steam impermanence config

---
 .../home-manager/leyla/impermanence.nix       |  4 ---
 .../home-manager-modules/programs/steam.nix   | 30 +++++++++++++++----
 2 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/configurations/home-manager/leyla/impermanence.nix b/configurations/home-manager/leyla/impermanence.nix
index ceab775..041bff8 100644
--- a/configurations/home-manager/leyla/impermanence.nix
+++ b/configurations/home-manager/leyla/impermanence.nix
@@ -10,10 +10,6 @@
         "desktop"
         "downloads"
         "documents"
-        {
-          directory = "${config.xdg.dataHome}/Steam";
-          method = "symlink";
-        }
       ];
       files = [
         ".bash_history" # keep shell history around
diff --git a/modules/home-manager-modules/programs/steam.nix b/modules/home-manager-modules/programs/steam.nix
index 551cb5d..4661151 100644
--- a/modules/home-manager-modules/programs/steam.nix
+++ b/modules/home-manager-modules/programs/steam.nix
@@ -2,18 +2,36 @@
   lib,
   pkgs,
   config,
+  osConfig,
   ...
 }: {
   options.programs.steam = {
     enable = lib.mkEnableOption "enable steam";
   };
 
-  config = lib.mkIf config.programs.steam.enable {
-    home.packages = with pkgs; [
-      steam
-      steam.run
-    ];
-  };
+  config = lib.mkIf config.programs.steam.enable (
+    lib.mkMerge [
+      {
+        home.packages = with pkgs; [
+          steam
+          steam.run
+        ];
+      }
+      (
+        lib.mkIf osConfig.host.impermanence.enable {
+          home.persistence."/persist${config.home.homeDirectory}" = {
+            directories = [
+              {
+                directory = "${config.xdg.dataHome}/Steam";
+                method = "symlink";
+              }
+            ];
+            allowOther = true;
+          };
+        }
+      )
+    ]
+  );
 
   # TODO: bind impermanence config
 }

From 6c7b40e10e0c2181018b05e089b7d18fb6216a1d Mon Sep 17 00:00:00 2001
From: Eve <evesnrobins@gmail.com>
Date: Thu, 5 Jun 2025 04:40:13 +0000
Subject: [PATCH 49/51] fixed eve not importing packages.nix

---
 configurations/home-manager/eve/default.nix  | 6 +++---
 configurations/home-manager/eve/packages.nix | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/configurations/home-manager/eve/default.nix b/configurations/home-manager/eve/default.nix
index 0ab0c59..52a70a6 100644
--- a/configurations/home-manager/eve/default.nix
+++ b/configurations/home-manager/eve/default.nix
@@ -1,9 +1,9 @@
 {osConfig, ...}: let
   userConfig = osConfig.host.users.eve;
 in {
-  nixpkgs.config = {
-    allowUnfree = true;
-  };
+  imports = [
+    ./packages.nix
+  ];
 
   home = {
     username = userConfig.name;
diff --git a/configurations/home-manager/eve/packages.nix b/configurations/home-manager/eve/packages.nix
index 30fc361..6edfa37 100644
--- a/configurations/home-manager/eve/packages.nix
+++ b/configurations/home-manager/eve/packages.nix
@@ -8,6 +8,10 @@
   userConfig = osConfig.host.users.eve;
 in {
   config = {
+    nixpkgs.config = {
+      allowUnfree = true;
+    };
+
     # Packages that can be installed without any extra configuration
     # See https://search.nixos.org/packages for all options
     home.packages = lib.lists.optionals userConfig.isDesktopUser (

From 98a1d1da6098a5517b2361fb9e4899f59f1c0534 Mon Sep 17 00:00:00 2001
From: Eve <evesnrobins@gmail.com>
Date: Thu, 5 Jun 2025 04:53:30 +0000
Subject: [PATCH 50/51] added piper for user eve

---
 configurations/home-manager/eve/packages.nix    | 2 ++
 configurations/nixos/emergent/configuration.nix | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/configurations/home-manager/eve/packages.nix b/configurations/home-manager/eve/packages.nix
index 6edfa37..c6e38f9 100644
--- a/configurations/home-manager/eve/packages.nix
+++ b/configurations/home-manager/eve/packages.nix
@@ -6,6 +6,7 @@
   ...
 }: let
   userConfig = osConfig.host.users.eve;
+  hardware = osConfig.host.hardware;
 in {
   config = {
     nixpkgs.config = {
@@ -17,6 +18,7 @@ in {
     home.packages = lib.lists.optionals userConfig.isDesktopUser (
       with pkgs; [
         ungoogled-chromium
+        (lib.mkIf hardware.piperMouse.enable piper)
       ]
     );
 
diff --git a/configurations/nixos/emergent/configuration.nix b/configurations/nixos/emergent/configuration.nix
index c75c162..c42c97e 100644
--- a/configurations/nixos/emergent/configuration.nix
+++ b/configurations/nixos/emergent/configuration.nix
@@ -49,6 +49,9 @@
         isPrincipleUser = true;
       };
     };
+    hardware = {
+      piperMouse.enable = true;
+    };
 
     storage = {
       enable = true;

From b3918c8105074b741c995cab63e0cf84c487405d Mon Sep 17 00:00:00 2001
From: Leyla Becker <git@jan-leila.com>
Date: Thu, 5 Jun 2025 14:04:52 -0500
Subject: [PATCH 51/51] added dconf-editor to devShell

---
 flake.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/flake.nix b/flake.nix
index 7896d60..71acc37 100644
--- a/flake.nix
+++ b/flake.nix
@@ -150,6 +150,8 @@
           nixos-anywhere
           # for updating disko configurations
           disko
+          # for viewing dconf entries
+          dconf-editor
         ];
 
         SOPS_AGE_KEY_DIRECTORY = import ./const/sops_age_key_directory.nix;