From 0f47490e49e6f54f6b16b80e83dd3da45c5f6956 Mon Sep 17 00:00:00 2001 From: Victor Borja Date: Thu, 12 Feb 2026 04:01:40 -0600 Subject: [PATCH] fix: remove withSystem dependency for standalone hm --- modules/_types.nix | 12 ++++++++++-- modules/config.nix | 12 ++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/modules/_types.nix b/modules/_types.nix index 28b2881..516bf04 100644 --- a/modules/_types.nix +++ b/modules/_types.nix @@ -57,7 +57,7 @@ let - adding specialArgs when absolutely required. ''; example = lib.literalExpression "inputs.nixpkgs.lib.nixosSystem"; - type = lib.types.unspecified; + type = lib.types.raw; default = { nixos = inputs.nixpkgs.lib.nixosSystem; @@ -147,6 +147,14 @@ let class = strOpt "home management nix class" "homeManager"; aspect = strOpt "main aspect name" config.name; description = strOpt "home description" "home.${config.userName}@${config.system}"; + pkgs = lib.mkOption { + description = '' + nixpkgs instance used to build the home configuration. + ''; + example = lib.literalExpression ''inputs.nixpkgs.legacyPackages.''${home.system}''; + type = lib.types.raw; + default = inputs.nixpkgs.legacyPackages.${config.system}; + }; instantiate = lib.mkOption { description = '' Function used to instantiate the home configuration. @@ -160,7 +168,7 @@ let - adding extraSpecialArgs when absolutely required. ''; example = lib.literalExpression "inputs.home-manager.lib.homeManagerConfiguration"; - type = lib.types.unspecified; + type = lib.types.raw; default = { homeManager = inputs.home-manager.lib.homeManagerConfiguration; diff --git a/modules/config.nix b/modules/config.nix index 7481687..6c19288 100644 --- a/modules/config.nix +++ b/modules/config.nix @@ -1,7 +1,6 @@ { config, lib, - withSystem, ... }: let @@ -28,13 +27,10 @@ let homeConfiguration = home: - withSystem home.system ( - { pkgs, ... }: - home.instantiate { - inherit pkgs; - modules = [ home.mainModule ]; - } - ); + home.instantiate { + pkgs = home.pkgs; + modules = [ home.mainModule ]; + }; cfgs = (build osConfiguration config.den.hosts) ++ (build homeConfiguration config.den.homes);