rycee changed the topic of #home-manager to: Support and discussion around the Home Manager project (https://github.com/rycee/home-manager) | Logs: https://logs.nix.samueldr.com/home-manager
evanjs- has joined #home-manager
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 240 seconds]
evanjs- has quit [Ping timeout: 276 seconds]
evanjs- has joined #home-manager
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 276 seconds]
evanjs- has quit [Quit: ZNC 1.7.4 - https://znc.in]
evanjs- has joined #home-manager
evanjs- has quit [Ping timeout: 268 seconds]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 245 seconds]
mexisme has joined #home-manager
utdemir has joined #home-manager
<utdemir> Hey. I am using home-manager as a NixOS module (`home-manager.users.username = args: {};`), and the configuration is built on a pinned nixpkgs. However I observe the resulting derivation using NIX_PATH somehow. Can anyone tell me why home manager is using `NIX_PATH` instead of `pkgs`? Or am I doing something wrong?
__monty__ has joined #home-manager
<utdemir> In other words, these two traces return different paths: `home-manager.users.username = builtins.trace (pkgs.path) ({ pkgs, ... }: { home.packages = builtins.trace (pkgs.path) []; });`
<__monty__> Wouldn't it be weird for them not to?
<utdemir> Probably my mental model is wrong then. I'd expect home-manager to inherit `pkgs` from the configuration in that case.
<__monty__> What I meant is if nested traces are identical you'd have a problem.
<utdemir> Why would I have a problem?
<__monty__> How would you tell which trace is which for one?
<utdemir> I changed it to this: ` home-manager.users.username = builtins.trace ("outside: ${pkgs.path}") ({ pkgs, ... }: { home.packages = builtins.trace ("inside: ${pkgs.path}") []; });`
<utdemir> I get something like :
<utdemir> `trace: outside: /nix/store/j923fhjwby770n0vq2ripjglf15635y3-7rkpglixprllp65nrbv7ld88qnfpzs1i-sourcetrace: inside: /nix/store/vkrhik806d71v4dknhjqpl7krn5634qb-f0lr5s64wjpc508p32mnd9kvyp8hnnhm-lni9pg2rhcdv296gndxzz2xpb1jhjakq-source`
<utdemir> `trace: outside: /nix/store/j923fhjwby770n0vq2ripjglf15635y3-7rkpglixprllp65nrbv7ld88qnfpzs1i-sourcetrace: inside: /nix/store/vkrhik806d71v4dknhjqpl7krn5634qb-f0lr5s64wjpc508p32mnd9kvyp8hnnhm-lni9pg2rhcdv296gndxzz2xpb1jhjakq-source`
<utdemir> outside is my pinned nixpkgs, inside comes from my NIX_PATH.
<__monty__> Looks like it's never getting to the inner trace?
<utdemir> Nah I just couldn't figure out how to put a newline in a message. The inside trace starts in the middle of the line.
<__monty__> Oh, was confused because you sent it twice. IRC doesn't allow line breaks.
<utdemir> My mistake, sorry.
<utdemir> It looks like the one from NIX_PATH is read by the `modules/misc/nixpkgs` module. And there is no way to override it.
<__monty__> I'm not clear on what you're trying to do. If you don't want the inner thing to get passed a nixpkgs, why not drop the argument and put references to the right nixpkgs inline? Or give a default value for pkgs.
<utdemir> the thing is that, even if my home-manager configuration is empty (as above), home-manager still uses some stuff from NIX_PATH and incurs some dependencies to packages from that.
<utdemir> I'm trying to build a system configuration while using a pinned nixpkgs, without referring to `<nixpkgs>`. However since home-manager depends on `<nixpkgs>` internally it pollutes my system image.
mexisme has quit [Ping timeout: 245 seconds]
<rycee> utdemir: You can add `_module.args.pkgs = mkForce outerPkgs;` inside the HM configuration.
<rycee> Need to add a let binding to the system configuration that binds `outerPkgs = pkgs;`
<rycee> This will prevent you from configuring nixpkgs from inside the user configuration, though.
<utdemir> Thank you rycee. I didn't know that I could override it like that, and I did this instead: https://gist.github.com/8e080451231f8a94b779d3f2096abb2b . Yours is much better.
<utdemir> Do you think this is a use case you might want to officially support somehow?
<rycee> Yeah, this is pretty much official :-)
<rycee> utdemir: An alternative would be to change the nixos module so that it introduces a `systemPkgs` argument or similar so that it's possible to use both pkgs and systemPkgs.
<utdemir> Understood. If you're happy with the solution I'm happy. Thank you for your answer, and thank you so much for creating home-manager.
<rycee> No worries, thanks :-)
utdemir has quit [Remote host closed the connection]
hmpffff has joined #home-manager
hmpffff_ has joined #home-manager
hmpffff has quit [Ping timeout: 240 seconds]
evanjs- has joined #home-manager
evanjs- has quit [Client Quit]
evanjs- has joined #home-manager
evanjs- has quit [Ping timeout: 245 seconds]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 246 seconds]
evanjs- has joined #home-manager
mexisme has joined #home-manager
evanjs- has quit [Quit: ZNC 1.7.4 - https://znc.in]
evanjs- has joined #home-manager
evanjs- has quit [Client Quit]
evanjs- has joined #home-manager
evanjs- has quit [Client Quit]
evanjs- has joined #home-manager
mexisme has quit [Ping timeout: 276 seconds]
evanjs- has quit [Quit: ZNC 1.7.4 - https://znc.in]
evanjs- has joined #home-manager
evanjs- has quit [Client Quit]
evanjs- has joined #home-manager
evanjs- has quit [Client Quit]
evanjs- has joined #home-manager
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 246 seconds]
__monty__ has quit [Quit: leaving]
Melkor333 has joined #home-manager
<Melkor333> Does anybody know if there is an "easy" way to clone and link a whole git repo to e.g. "~/.config/awesome/"?
<rycee> Melkor333: Perhaps something like `xdg.configFile.awesome.source = pkgs.fetchGit { ... }`?
<Melkor333> hmm.. Let me try this.. I may've been overthinking it
dbyte has joined #home-manager
dbyte has quit [Quit: Quit]
dbyte has joined #home-manager
<rycee> Good luck :-)
dbyte has quit [Quit: Quit]
<Melkor333> It seems to work but now I have a completely different problem.. I'm using home-manager in the nixos config as described in the nixos wiki, but I always get "error opening lock file '/nix/var/nix/profiles/default.lock': Permission denied"...
<Melkor333> I haven't used home-manager before so it's probably some kind of initial setup problem
dbyte has joined #home-manager
Melkor333 has quit [Quit: WeeChat 2.6]
Melkor333 has joined #home-manager
hmpffff_ has quit [Quit: nchrrrr…]
hmpffff has joined #home-manager
hmpffff has quit [Client Quit]
hmpffff has joined #home-manager
hmpffff has quit [Client Quit]
<Melkor333> rycee: fixed the permission issue temporarily. Thank you it seems to work! Now I just got to find out how to initiate git submodules :D
<rycee> Cool :-)
Melkor333 has quit [Quit: WeeChat 2.6]