diff --git a/flake.nix b/flake.nix index b621bd44..b8e890fb 100644 --- a/flake.nix +++ b/flake.nix @@ -194,44 +194,13 @@ (flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; - homeManager = (mkHomeConfig rec { + homeManager = (mkHomeConfig { inherit system; + configuration = ./home-manager/minimal.nix; hostname = "devShell"; homeDirectory = "/tmp/home"; # Needs to run with `--impure` flag username = builtins.getEnv "USER"; - extraModules = [{ - home = { - # Not sure why this variable is not filling up automatically - sessionPath = [ "${homeDirectory}/.nix-profile/bin" ]; - stateVersion = "23.11"; - }; - # Disable some modules - home-manager = { - darwin.enable = false; - cli = { - enable = false; - git.enable = true; - htop.enable = true; - tmux.enable = true; - zsh.enable = true; - }; - editor.helix.enable = false; - meta.enable = false; - }; - # Disable systemd services/sockets/timers/etc. - systemd.user = { - automounts = pkgs.lib.mkForce { }; - mounts = pkgs.lib.mkForce { }; - paths = pkgs.lib.mkForce { }; - services = pkgs.lib.mkForce { }; - sessionVariables = pkgs.lib.mkForce { }; - slices = pkgs.lib.mkForce { }; - sockets = pkgs.lib.mkForce { }; - targets = pkgs.lib.mkForce { }; - timers = pkgs.lib.mkForce { }; - }; - }]; }).homeConfigurations.devShell; in { diff --git a/home-manager/meta/default.nix b/home-manager/meta/default.nix index 48323d8d..ee551b63 100644 --- a/home-manager/meta/default.nix +++ b/home-manager/meta/default.nix @@ -8,7 +8,6 @@ options.home-manager.meta.enable = lib.mkDefaultOption "Home-Manager config"; config = lib.mkIf config.home-manager.meta.enable { - # Add some Nix related packages home.packages = with pkgs; [ nix-cleanup diff --git a/home-manager/minimal.nix b/home-manager/minimal.nix new file mode 100644 index 00000000..343acd2d --- /dev/null +++ b/home-manager/minimal.nix @@ -0,0 +1,40 @@ +{ config, lib, ... }: + +{ + imports = [ ./default.nix ]; + + home = { + # Not sure why this variable is not filling up automatically + sessionPath = [ "${config.home.homeDirectory}/.nix-profile/bin" ]; + stateVersion = "23.11"; + }; + + # Disable some modules + home-manager = { + darwin.enable = false; + cli = { + enable = false; + git.enable = true; + htop.enable = true; + tmux.enable = true; + zsh.enable = true; + }; + editor.helix.enable = false; + meta.enable = false; + }; + + # Disable systemd services/sockets/timers/etc. + systemd.user = { + automounts = lib.mkForce { }; + mounts = lib.mkForce { }; + paths = lib.mkForce { }; + services = lib.mkForce { }; + sessionVariables = lib.mkForce { }; + slices = lib.mkForce { }; + sockets = lib.mkForce { }; + targets = lib.mkForce { }; + timers = lib.mkForce { }; + }; + + manual.manpages.enable = false; +}