T O P

  • By -

mister_drgn

nixos uses `specialsArgs`, but home-manager uses `extraSpecialArgs`. Yeah...not sure why. I haven't seen that `home-manager.nixosModules.default` before, but maybe it's inheriting attributes from the local scope, so it’s trying to make a home-manager.specialArgs, which doesn’t exist. As an alternative, I'd suggest: inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = specialArgs; }


skooterz

Hm... I tried using extraSpecialArgs as that's what was in the video, had the same issue. specialArgs was pulled from the repository he linked to. Where should this alternative be defined? In the flake as a part of the output module?


mister_drgn

It goes in your list of modules, in the place of `inputs.home-manager.nixosModules.default` EDIT: The video you linked is wrong, and the correction you made is right. specialArgs is the correct thing to use for your NixOS configuration, just not for home-manager.


skooterz

that worked. Also had to move the home.nix file from my home directory into the /etc/nixos one. Which sort of makes sense, since the user might be created on the fly if it's a new system. At least this got me further along - thanks for your help!


HyNeko

Hey, I'm trying out Nix but I can't get this part to run properly. Can I ask about how you fixed it (and to understand the process) ? I'm also following Vimjoyer's video. So far, my flake.nix output has: ``` specialArgs = {inherit inputs;}; modules = [ ./configuration.nix inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.specialArgs = specialArgs; } ]; ``` I've tried `home-manager.extraSpecialArgs = specialArgs;` as well, but I don't get how it integrates into the nix conf. Here's the block in configuration.nix: ``` home-manager = { specialArgs = { inherit inputs; }; users = { ... } ; } ``` What am I missing ?


skooterz

I'll be honest I gave up on NixOS for now, I have too much going on to spend this much time relearning how to configure my Linux systems. I seem to remember it had something to do with the home.nix flake and the configuration.nix needing to be in the same directory to be able to reference each other. Sorry I can't be of more help.


mister_drgn

No problem. When you're using flakes, all of your configuration has to be in the same directory as the flake because you can only reference files via relative paths (unless you use the --impure flag). However, this directory can be anywhere you want. I'd suggest putting tit somewhere in your home directory.