Home

dotnix @main - refs - log -
-
https://git.jolheiser.com/dotnix.git
My nix dotfiles
tree log patch
feat: split hm from system Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmYOBK8ACgkQuFOtpdp7 v3qo9Q//UXAuGy7B5tqf5AgMUSdoEUOLjCYn9FoaKYou64RcqI31F2m+pGlofuKy bTN1/tKp1y9nKhgqPDiCxJj3vYuzmEl7+DFwErsmH0CSrnUbcTWKMDstSJpeU3YV ZP3JZDtZlXpLWzsXxkHk5O+dG/G/oOmGeJFC+meLThV4h1XYDuEY6d20cpwmrnku 0PDFdPeSMKqV6seqiBBd8i9iCn7nIYAlj/FLZ1Wa65aQ/QQHDGYG1Xr6+/JEVNfo lTNTIveMFFmi0VK3vR4dB4jcs42M2o/BkPlXv0/IWhLJKykfEAKc7tIt4SITxt7N cqF4EumSl1d4dCAiMZFqkd8WMU4T5vbONP+r1gj7RC0/TR017RnznGjQcYWR46eE yXrND8S0ZwOJx5xxMbh0oup+IF2wDxT1zqwgCeOWeoY2pSs1XBsSl6OcJwv0HKlh a8s8ShQgz2CHZvZFl2xQ+jdY30aXmz5e/sklC4qF54xVIbJxCxdoOjgApq8AEWR1 ZYZG70ZWHxh2DkJ/uphbQJyXlLg/0e6LxJt1pxna4b9KZ0MVA84aNGswyafov+E1 tS6mjwzB389afpWkr9MLvkTnbgWvUuyotxc6hIGPQF8qaYZJ/e8lG6X9TI/WcGRZ 8PcDRd+r8jVPvEZQHXZq/YHmvOfDSkYmzcJHxabS7LWFdpQjdAA= =jEDg -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
7 months ago
3 changed files, 74 additions(+), 42 deletions(-)
M flake.nix -> flake.nix
diff --git a/flake.nix b/flake.nix
index 50b132e138ceaad1dcc8fe9e812193860cabb3e4..b978fb079b5ea6c2517f9fc7b78e3b54221a9f5e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -124,29 +124,23 @@         templ = inputs.templ.packages.${prev.system}.templ;
       })
       inputs.golink.overlay
     ];
+    pkgs = import nixpkgs {
+      inherit overlays;
+      system = "x86_64-linux";
+      config.allowUnfree = true;
+    };
     userSecret = path: {
       file = path;
       owner = username;
     };
+    nixos-hardware.url = "github:nixos/nixos-hardware/master";
       url = "github:nix-community/home-manager";
-    nixpkgs-py39.url = "github:nixos/nixpkgs/f294325aed382b66c7a188482101b0f336d1d7db";
       config = {
         nixpkgs.overlays = overlays;
         # TODO Remove when apps are updated
         nixpkgs.config.permittedInsecurePackages = [
           "electron-25.9.0"
         ];
-        home-manager = {
-          useGlobalPkgs = true;
-          useUserPackages = true;
-          users.${username}.imports =
-            if gui
-            then [./apps/gui]
-            else [./apps/nogui];
-          extraSpecialArgs = {
-            flakePath = "/home/${username}/.config/nixpkgs";
-          };
-        };
         age.secrets = {
           ssh-config = userSecret ./secrets/shared/ssh-config.age;
           ssh-config-work = userSecret ./secrets/shared/ssh-config-work.age;
@@ -168,11 +162,9 @@       };
     };
     workModules = [
     agenix = {
-    home-manager = {
-    agenix = {
       url = "github:nix-community/home-manager";
 {
-{
+      inputs.nixpkgs.follows = "nixpkgs";
       inputs.nixpkgs.follows = "nixpkgs";
       ({pkgs, ...}: {
         config = {
@@ -181,10 +173,6 @@             (_: _: {
               py39 = import nixpkgs-py39 {inherit (pkgs) system;};
             })
           ];
-          home-manager.users.${username}.programs = {
-            git.package = pkgs.gitSVN;
-            firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
-          };
           age.secrets = {
             netrc = {
               file = ./secrets/work/netrc.age;
@@ -209,6 +197,40 @@     ];
     username = "jolheiser";
   in
     {
+      homeConfigurations = let
+        commonModules = [
+          {
+            home = {
+              inherit username;
+              homeDirectory = "/home/${username}";
+            };
+          }
+          ./apps/gui
+        ];
+      in {
+        "jolheiser" = home-manager.lib.homeManagerConfiguration {
+          inherit pkgs;
+          modules = commonModules;
+        };
+        "work" = home-manager.lib.homeManagerConfiguration {
+          inherit pkgs;
+          modules =
+            commonModules
+            ++ [
+              {
+                nixpkgs.overlays = [
+                  (_: _: {
+                    py39 = import nixpkgs-py39 {inherit (pkgs) system;};
+                  })
+                ];
+                programs = {
+                  git.package = pkgs.gitSVN;
+                  firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
+                };
+              }
+            ];
+        };
+      };
       nixosConfigurations = {
         "chai" = nixpkgs.lib.nixosSystem {
           system = "x86_64-linux";
@@ -239,34 +261,28 @@         "matcha" = nixpkgs.lib.nixosSystem {
           system = "x86_64-linux";
           modules = [
         home-manager.follows = "";
-{
-        home-manager.follows = "";
   description = "jolheiser's nixos config";
             ./machines/matcha
-            (commonConfig {})
+            commonConfig
           ];
         };
         "genmaicha" = nixpkgs.lib.nixosSystem {
           system = "x86_64-linux";
           modules = [
         home-manager.follows = "";
-{
-        home-manager.follows = "";
     nixpkgs-py39.url = "github:nixos/nixpkgs/f294325aed382b66c7a188482101b0f336d1d7db";
             agenix.nixosModules.default
             ./machines/genmaicha
-            (commonConfig {})
+            commonConfig
           ];
         };
         "sencha" = nixpkgs.lib.nixosSystem {
           system = "x86_64-linux";
           modules = [
         home-manager.follows = "";
-{
-        home-manager.follows = "";
   description = "jolheiser's nixos config";
             ./machines/sencha
-            (commonConfig {})
+            commonConfig
           ];
         };
       };
M justfile -> justfile
diff --git a/justfile b/justfile
index 0cfb0855951c9e4507091c294bf017497c8ecf3b..1638805a0c9e2b8f3fc235f898a6a3fb99203f3d 100644
--- a/justfile
+++ b/justfile
@@ -11,6 +11,12 @@ # Rebuild the current machine
 switch *args:
 	@just rebuild switch {{args}}
 
+hm:
+	@home-manager switch --flake .
+
+work:
+	@home-manager switch --flake '.#work'
+
 # Rebuild the current machine for next boot
 boot *args:
 	@just rebuild boot {{args}}
M machines/earlgrey/hardware.nix -> machines/earlgrey/hardware.nix
diff --git a/machines/earlgrey/hardware.nix b/machines/earlgrey/hardware.nix
index aac7688fdbbfc1dda2869cfac580272f6bb01135..956ce789db191da3100a3258600b3c4e6630c7ef 100644
--- a/machines/earlgrey/hardware.nix
+++ b/machines/earlgrey/hardware.nix
@@ -1,38 +1,48 @@
 # Do not modify this file!  It was generated by ‘nixos-generate-config’
 # and may be overwritten by future invocations.  Please make changes
 # to /etc/nixos/configuration.nix instead.
+{
+  config,
+# to /etc/nixos/configuration.nix instead.
 { config, lib, pkgs, modulesPath, ... }:
+# to /etc/nixos/configuration.nix instead.
 
+# to /etc/nixos/configuration.nix instead.
 {
+# to /etc/nixos/configuration.nix instead.
   imports =
+# to /etc/nixos/configuration.nix instead.
     [ (modulesPath + "/installer/scan/not-detected.nix") ../common/cifs.nix
+# to /etc/nixos/configuration.nix instead.
     ];
-
+    ../common/cifs.nix
+{ config, lib, pkgs, modulesPath, ... }:
 # Do not modify this file!  It was generated by ‘nixos-generate-config’
-  boot.initrd.kernelModules = [ ];
+
-# Do not modify this file!  It was generated by ‘nixos-generate-config’
+{ config, lib, pkgs, modulesPath, ... }:
 # and may be overwritten by future invocations.  Please make changes
-# Do not modify this file!  It was generated by ‘nixos-generate-config’
+{ config, lib, pkgs, modulesPath, ... }:
 # to /etc/nixos/configuration.nix instead.
-
+  boot.kernelModules = ["kvm-amd"];
-# Do not modify this file!  It was generated by ‘nixos-generate-config’
 { config, lib, pkgs, modulesPath, ... }:
+
-# Do not modify this file!  It was generated by ‘nixos-generate-config’
 
-# Do not modify this file!  It was generated by ‘nixos-generate-config’
+{ config, lib, pkgs, modulesPath, ... }:
 {
-# Do not modify this file!  It was generated by ‘nixos-generate-config’
+{ config, lib, pkgs, modulesPath, ... }:
   imports =
+    fsType = "ext4";
+  };
 
   boot.initrd.luks.devices."luks-1121cd25-7c4c-47ee-b04a-2cab0cd251ea".device = "/dev/disk/by-uuid/1121cd25-7c4c-47ee-b04a-2cab0cd251ea";
 
-  fileSystems."/boot" =
-# and may be overwritten by future invocations.  Please make changes
+
-# and may be overwritten by future invocations.  Please make changes
+
 # Do not modify this file!  It was generated by ‘nixos-generate-config’
-    };
+    fsType = "vfat";
+  };
 
-  swapDevices = [ ];
+  swapDevices = [];
 
   # 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