!UUqahLbShAYkkrXmKs:matrix.org

DevOS

37 Members
Seeking help and geeking out together on https://github.com/divnix/devos & https://github.com/divnix/digga10 Servers

Load older messages


SenderMessageTime
12 Aug 2021
@d4hines:matrix.orgd4hines * I'm getting the same error, obviously because I'm not telling home-manger "use this new nixpkgs" (there could be other mistakes too thought 😅)19:07:33
@d4hines:matrix.orgd4hines * I'm getting the same error, obviously because I'm not telling home-manger "use this new nixpkgs" (there could be other mistakes too though 😅)19:07:39
@timdeh:matrix.org@timdeh:matrix.org so I think the overlay should go in channels.<your-channel>.overlays 19:08:16
@timdeh:matrix.org@timdeh:matrix.orgbased on whichever channel gets forward to home-manager19:08:28
@d4hines:matrix.orgd4hines
In reply to @timdeh:matrix.org
so I think the overlay should go in channels.<your-channel>.overlays
Would you happen to have a link to docs describing this?
19:08:53
@d4hines:matrix.orgd4hinesI have trouble finding nix flake docs.19:09:09
@timdeh:matrix.org@timdeh:matrix.orgthis is a digga feature, so it should be documented here: digga.divnix.com19:12:21
@timdeh:matrix.org@timdeh:matrix.orgoh wait, it looks like you are not using mkFlake19:12:50
@timdeh:matrix.org@timdeh:matrix.orgso maybe not19:12:52
@d4hines:matrix.orgd4hinesRight. I want to do this without libraries first, then refactor as necessary.19:13:08
@d4hines:matrix.orgd4hinesStill trying to wrap my head around nix, flakes, etc.19:13:20
@timdeh:matrix.org@timdeh:matrix.orgso by pulling pkgs from the module are here: https://github.com/nrdxp/nixpkgs/blob/6dbf8c04097c8961bb1cb9cb319fee42eb19ab7a/nixos/modules/programs/zsh/zsh.nix#L288-L293 You are overiding the pkgs you declared in your let binding earlier19:13:42
@timdeh:matrix.org@timdeh:matrix.org * so by pulling pkgs from the module args here: https://github.com/nrdxp/nixpkgs/blob/6dbf8c04097c8961bb1cb9cb319fee42eb19ab7a/nixos/modules/programs/zsh/zsh.nix#L288-L293 You are overiding the pkgs you declared in your let binding earlier19:13:51
@timdeh:matrix.org@timdeh:matrix.orgdoes home-manager have a way to override the global pkgs? I doesn't look like it from the docs. In that case, it looks like you'd wanna throw your overlay in nixpkgs.overlays19:16:17
@d4hines:matrix.orgd4hines
In reply to @timdeh:matrix.org
does home-manager have a way to override the global pkgs? I doesn't look like it from the docs. In that case, it looks like you'd wanna throw your overlay in nixpkgs.overlays
There's an attribute called overlay in the flake schema. I don't put it in there?
19:18:29
@timdeh:matrix.org@timdeh:matrix.org You could do that, and then import it into home-manager by referencing it from self 19:18:51
@timdeh:matrix.org@timdeh:matrix.orgdigga's mkFlake does this for you, but if your building from scratch you'd have to wire that up yourself19:19:08
@timdeh:matrix.org@timdeh:matrix.org so basically the way you have it now, you could just add a nixpkgs.overlays = [ self.overlay ] 19:19:55
@timdeh:matrix.org@timdeh:matrix.orgto your home-manager module19:20:06
@d4hines:matrix.orgd4hines

That doesn't quite make sense to me. So here's what you're suggesting (correct if wrong)

  • add the overlay attribute to the flake.
  • in the configuration attribute of the object passed to homeManagerConfiguration, I add something like this:
configuration = { config, pkgs, ... }: {
  nixpkgs.overlays = [ self.overlay ];
}

What confuses me about this is that I'm still using the pkgs argument in configuration elsewhere in the function. My intuition says that I should modify pkgs by applying the overlay to it.

19:26:05
@timdeh:matrix.org@timdeh:matrix.orgThat's what nixpkgs.overlays does under the hood19:26:59
@timdeh:matrix.org@timdeh:matrix.org so nixos has a nixpkgs.pkgs option where you can just build the global pkg set and it will be passed in to every module. Home-manager doesn't seem to have this, but it does have nixpkgs.config and nixpkgs.overlays, which would be applied to the underlying package set and passed in to every module as pkgs 19:27:56
@d4hines:matrix.orgd4hines I get dependency injection but this seems convoluted. It also seems purely conventional - its' just convention that the prop called nixpkgs.overlays gets picked up by home-manager, applied to nixpkgs, and the result is passed to each module, right? 19:30:35
@d4hines:matrix.orgd4hinesAm I missing a piece, or is it something I get used to as I go along?19:32:27
@ultranix:matrix.orgultranixI still don't understand how to add profiles/suites to a home.users.<user> in flake.nix, 19:32:53
@timdeh:matrix.org@timdeh:matrix.orgare you already familiar with how to use them for nixos? it should be basically the same19:34:22
@d4hines:matrix.orgd4hines
In reply to @ultranix:matrix.org
I still don't understand how to add profiles/suites to a home.users.<user> in flake.nix,
I'm not sure if this example would be helpful to you but here's I'm doing it https://github.com/d4hines/devos/blob/hope/flake.nix#L103
19:34:26
@d4hines:matrix.orgd4hines
In reply to @timdeh:matrix.org
so basically the way you have it now, you could just add a nixpkgs.overlays = [ self.overlay ]

The wiki lists overlay as a valid attribute of flakes; however, I'm getting this error:

error: flake 'git+file:///home/d4hines/repos/beth' has an unsupported attribute 'overlay', at /nix/store/9cdyiyw5333969j5rhyrc3112kl2wkcv-source/flake.nix:4:3
19:37:06
@d4hines:matrix.orgd4hineshttps://nixos.wiki/wiki/Flakes#Output_schema19:37:21
@d4hines:matrix.orgd4hinesOh, it's an attribute of the output object19:38:08

Show newer messages


Back to Room ListRoom Version: 6