Misterio77 / nix-colors

Modules and schemes to make theming with Nix awesome.
GNU General Public License v3.0
498 stars 42 forks source link

using extraSpecialArgs in home-manager fails #59

Open joshuacox opened 5 months ago

joshuacox commented 5 months ago

When I add this to my config:

{
  description = "A nix config";

  inputs = {
    nix-colors.url = "github:misterio77/nix-colors";
  };

  outputs = inputs@{ clip, nx, musnix, sops-nix, nixpkgs, nix-colors, home-manager, ... }:
    let 
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in {
    nixosConfigurations = {
      host1 = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        specialArgs = {  
          inherit nix-colors; 
        };
        modules = [
          nix-colors.homeManagerModules.default
          home-manager.nixosModules.home-manager
          {
            home-manager.useGlobalPkgs = true;
            home-manager.useUserPackages = true;
            home-manager.users.thoth = import ../../users/thoth/home.nix;
            extraSpecialArgs = {inherit nix-colors;};
          }
        ];
      };
    };
  };
}

I get:

sudo nixos-rebuild switch --flake .#
trace: warning: External use of `lib.modules.applyModuleArgsIfFunction` is deprecated. If your use case isn't covered by non-deprecated functions, we'd like to know more and perhaps support your use case well, instead of providing access to these low level functions. In this case please open an issue in https://github.com/nixos/nixpkgs/issues/.
trace: lib.zip is deprecated, use lib.zipAttrsWith instead
trace: lib.crossLists is deprecated, use lib.cartesianProductOfSets instead
trace: warning: External use of `lib.modules.dischargeProperties` is deprecated. If your use case isn't covered by non-deprecated functions, we'd like to know more and perhaps support your use case well, instead of providing access to these low level functions. In this case please open an issue in https://github.com/nixos/nixpkgs/issues/.
trace: warning: External use of `lib.modules.evalOptionValue` is deprecated. If your use case isn't covered by non-deprecated functions, we'd like to know more and perhaps support your use case well, instead of providing access to these low level functions. In this case please open an issue in https://github.com/nixos/nixpkgs/issues/.
trace: warning: literalExample is deprecated, use literalExpression instead, or use literalMD for a non-Nix description.
error:
       … while calling the 'seq' builtin

         at /nix/store/f6lbic2a83c51ygb2czksw9gv8x6w5wg-source/lib/modules.nix:320:18:

          319|         options = checked options;
          320|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          321|         _module = checked (config._module);

       … while calling the 'throw' builtin

         at /nix/store/f6lbic2a83c51ygb2czksw9gv8x6w5wg-source/lib/modules.nix:296:18:

          295|                     ''
          296|             else throw baseMsg
             |                  ^
          297|         else null;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: getting status of '/nix/store/3cw7ichm2mrdkffyvhfrkwzkjafyixm0-source/maintainers': No such file or directory

Have I configured something wrong?

a3ru commented 4 months ago

use home-manager.extraSpecialArgs = {inherit nix-colors;};