<NickHu>
e.g. I want home-manager to use overlays from ${dotfiles}/.config/nixpkgs/overlays
<infinisil>
NickHu: Check out builtins.readDir
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
ardumont has quit [Ping timeout: 246 seconds]
ardumont has joined #home-manager
linarcx has quit [Ping timeout: 250 seconds]
linarcx has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
linarcx has quit [Ping timeout: 245 seconds]
linarcx has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
Orbstheorem has joined #home-manager
<Orbstheorem>
Hello, how can I manage my home-manager configuration from my configuration.nix?
<Orbstheorem>
The instructions on the wiki say to import <home-manager>/nixos, but this doesn't exist, so I'm trying to import <home-manager>/modules instead
<Orbstheorem>
I'm getting this error when I build the derivation: `error: anonymous function at /nix/store/[...]/default.nix:1:1 called with unexpected argument 'config',`
ardumont has quit [Ping timeout: 245 seconds]
<Orbstheorem>
`overlays = [ "${home-manager}/overlay.nix" ];` doesn't work either, I get `error: Module `[...]nixos-config/modules/users.nix` has unsupported attribute `overlays'.[...]`
ardumont has joined #home-manager
linarcx has quit [Ping timeout: 268 seconds]
linarcx has joined #home-manager
<Orbstheorem>
Well, the overlay was definitely not what I wanted
<Orbstheorem>
turns out I somehow managed to get a partial checkout of home-manager
<Orbstheorem>
Importing <home-manager/nixos> works
<Orbstheorem>
I'm now dealing with a situation where I import the module in the same file I define options that use home-manager types provided in it's options.
<Orbstheorem>
If I access them via options, I get that they don't exist (I believe because the imports have not been processed yet) and if I access them via config, I get an infinite recursion :D
ardumont has quit [Ping timeout: 250 seconds]
ardumont has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
ardumont has quit [Ping timeout: 245 seconds]
ardumont has joined #home-manager
ardumont has quit [Ping timeout: 246 seconds]
ardumont has joined #home-manager
xent has joined #home-manager
<infinisil>
Orbstheorem: Unfortunately you can't use `imports` and `options` in your home-manager modules when using it through NixOS
<infinisil>
This is because the module system fundamentally doesn't support this
<infinisil>
So what you need to do instead is write NixOS modules for everything, and include those from other NixOS modules
<infinisil>
Then you can define new options (even HM ones) and use imports in those
<Orbstheorem>
Okay
<infinisil>
home-manager.users.* can't have any imports/options declarations that is
<Orbstheorem>
right, ofc
<Orbstheorem>
I'm trying to replicate your options.mine.userConfig in my own configuration
xent has quit [Remote host closed the connection]
<Orbstheorem>
(I'm still phrasing my question x) )
<Orbstheorem>
So, I `imports = [ <home-manager/nixos> ];`, but when I define my `options.roos.userConfig = {type = options.home-manager.users.type.function.wrapper;, ...`, I get an evaluation error saying that attribute 'home-manager' is missing from 'options'
<Orbstheorem>
Since I can't see any imports to home-manager in your system config, I wonder how does it get evaluated?
<iceypoi>
rycee: I've been playing around quite successfully with home-manager in WSL
<iceypoi>
apart from that one package that just doesn't exist in 64 bits, it all pretty much just works ;-)
<infinisil>
Orbstheorem: Ah, you need to add `options` to the argument list at the top
<infinisil>
This is why some people don't like `with`, because in this case your `options` value came from `lib.options` due to the `with lib;`
<infinisil>
Which is not the same `options` as the one from the argument list
<Orbstheorem>
Ah!
* Orbstheorem
didn't know there was a lib.options
<Orbstheorem>
Je check
<Orbstheorem>
It works \^^/
ardumont has quit [Ping timeout: 245 seconds]
ardumont has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #home-manager
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #home-manager
iceypoi has quit [Quit: WeeChat 2.4]
<rycee>
infinisil: Hmm, I use module imports within my configuration that i Nix import into the system configuration.
<rycee>
I.e., I have `home-manager.users.rycee = import ./user/rycee.nix;` in my system configuration and inside rycee.nix I have e.g. `imports = [ ./common.nix ./extra-packages.nix ];`
<rycee>
Works fine.
<rycee>
Or maybe I misunderstood something?
<rycee>
But I suspect the user configuration module needs to be of a "function form", not just an attribute set.
linarcx has quit [Quit: WeeChat 2.4]
<rycee>
Damn, Matrix is really nice. My internet has been down since the afternoon and I still got all messages from the Matrix users in here :-D
ardumont has quit [Ping timeout: 250 seconds]
<infinisil>
rycee: Do you try to define options in rycee.nix?
<infinisil>
It only doesn't work if you do, I'm pretty sure