Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using extraSpecialArgs in home-manager fails #59

Open
joshuacox opened this issue May 27, 2024 · 1 comment
Open

using extraSpecialArgs in home-manager fails #59

joshuacox opened this issue May 27, 2024 · 1 comment

Comments

@joshuacox
Copy link

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
Copy link

a3ru commented Jun 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants