From 97f64f3e5a3f60d036d26987f164056a2e8f0129 Mon Sep 17 00:00:00 2001 From: Patrick Neff Date: Mon, 8 Apr 2024 16:27:26 +0200 Subject: [PATCH] Import modules directly --- flake.nix | 7 +++++++ hosts/vm/configuration.nix | 13 +++++++++++-- lib/mkHomeConfiguration.nix | 30 ++++++++++++------------------ 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/flake.nix b/flake.nix index 9978b28..4c8b710 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,13 @@ ]; domain = "odie.intranet"; }; + + overlays = [ + inputs.nixvim.overlays.default + inputs.neovim-nightly-overlay.overlays.default + inputs.nur.overlay + inputs.nixgl.overlay + ]; in { nixosModules = { diff --git a/hosts/vm/configuration.nix b/hosts/vm/configuration.nix index 55c6a33..5faafdc 100644 --- a/hosts/vm/configuration.nix +++ b/hosts/vm/configuration.nix @@ -24,8 +24,17 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - user.${vars.userName} = flakeLib.mkHomeConfiguration { - inherit nixpkgs vars outputs inputs flakeLib system profile modules; + user.${vars.userName} = { + modules = [ + outputs.homeManagerModules.base + outputs.homeManagerModules.shell + outputs.homeManagerModules.dev + outputs.homeManagerModules.desktop + ]; + }; + extraSpecialArgs = { + inherit inputs outputs vars flakeLib; + inherit (inputs) nix-colors; }; }; diff --git a/lib/mkHomeConfiguration.nix b/lib/mkHomeConfiguration.nix index 04692d8..0d42266 100644 --- a/lib/mkHomeConfiguration.nix +++ b/lib/mkHomeConfiguration.nix @@ -7,22 +7,16 @@ system, profile, modules ? [], + overlays ? [], ... -}: let - overlays = [ - inputs.nixvim.overlays.default - inputs.neovim-nightly-overlay.overlays.default - inputs.nur.overlay - inputs.nixgl.overlay - ]; -in - import profile { - inherit inputs outputs modules; - extraSpecialArgs = { - inherit inputs outputs vars flakeLib; - inherit (inputs) nix-colors; - }; - pkgs = flakeLib.mkPkgs { - inherit nixpkgs system overlays; - }; - } +}: +import profile { + inherit inputs outputs modules; + extraSpecialArgs = { + inherit inputs outputs vars flakeLib; + inherit (inputs) nix-colors; + }; + pkgs = flakeLib.mkPkgs { + inherit nixpkgs system overlays; + }; +}