diff --git a/flake.nix b/flake.nix index 34fb3f6..a164c43 100644 --- a/flake.nix +++ b/flake.nix @@ -63,14 +63,9 @@ sharedOverlays = [ nur.overlay emacs-overlay.overlay ]; hostDefaults = { modules = mapModulesRec' ./modules import ++ [ - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.james = import ./home.nix; - } { nixpkgs.overlays = [ nur.overlay (import ./pkgs) ]; } ]; + specialArgs = { inherit home-manager nixos-hardware; }; system = "x86_64-linux"; }; }; diff --git a/home.nix b/home.nix index ceb4d1b..e9deb77 100644 --- a/home.nix +++ b/home.nix @@ -1,21 +1,19 @@ -{ config, pkgs, ... }: +{ config, pkgs, ... }: { + # # Home Manager needs a bit of information about you and the + # # paths it should manage. + # home.username = "james"; + # home.homeDirectory = "/home/james"; -{ - # Home Manager needs a bit of information about you and the - # paths it should manage. - home.username = "james"; - home.homeDirectory = "/home/james"; + # # This value determines the Home Manager release that your + # # configuration is compatible with. This helps avoid breakage + # # when a new Home Manager release introduces backwards + # # incompatible changes. + # # + # # You can update Home Manager without changing this value. See + # # the Home Manager release notes for a list of state version + # # changes in each release. + # home.stateVersion = "21.11"; - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # You can update Home Manager without changing this value. See - # the Home Manager release notes for a list of state version - # changes in each release. - home.stateVersion = "21.11"; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; + # # Let Home Manager install and manage itself. + # programs.home-manager.enable = true; } diff --git a/modules/system/homemanager.nix b/modules/system/homemanager.nix new file mode 100644 index 0000000..cc54211 --- /dev/null +++ b/modules/system/homemanager.nix @@ -0,0 +1,24 @@ +{ config, home-manager, lib, pkgs, ... }: { + imports = [ home-manager.nixosModules.home-manager ]; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.james = { + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "james"; + home.homeDirectory = "/home/james"; + + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # You can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "21.11"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + }; +}