| 4 Dec 2023 |
| @patka_123:matrix.org joined the room. | 11:23:33 |
| 5 Dec 2023 |
| @federicodschonborn:matrix.org changed their profile picture. | 00:39:05 |
| 6 Dec 2023 |
Gaétan Lepage | Hi ! It seems that you can use flake-parts without clearly adding it to the inputs. Is it somehow "contained" in nixpkgs ? I tried to grep the nixpkgs repo for flake-parts but had no result. | 12:55:36 |
npc_projection | What makes you think you can use flake-parts without adding to inputs? | 13:14:37 |
Gaétan Lepage | I tried ^^ | 13:15:18 |
Gaétan Lepage | Apparently it is because it is part of the global flake registry | 13:15:29 |
Gaétan Lepage | I was not aware of its existence | 13:15:39 |
Gaétan Lepage | https://github.com/NixOS/flake-registry | 13:16:36 |
| 7 Dec 2023 |
Aldwin | Hi! I'm finally migrating my 6 years old nixos config to Flakes! It's mostly going well but I need some help. I used to have an overlay that added nixpkgs-unstable to the nixpkgs.unstable attribute (using fetchTarball to get it). Now, I want to use a flake input instead, and I used an inline module with an overlay to have it exposed in the same place again. I'm trying to make my existing modules compatible with the Flake, so I don't have to go in and change them all.
This all seems to work, except that Nix is refusing to evaluate Unfree packages from Unstable now. It appears as though the nixpkgs.config does not apply to the unstable input the way it used to. So my question is: How do I get this second nixpkgs input to adhere to the same config as my primary one? And by "primary" I guess I mean the one used to make the lib.nixosSystem call.
| 09:48:32 |
Aldwin | Right now, the overlay basically does { unstable = inputs.unstable.legacyPackages.x86_64-linux; }. I'm guessing this is where I should do something to inject the parent config into the unstable nixpkgs. | 09:52:49 |
Aldwin | Oh. Wow. I just noticed my old approach did a similar thing: unstable = import (fetchTarball url) { config = config.nixpkgs.config; }; | 09:55:45 |
Aldwin | But I don't know the way to refer to the config inside a Flake | 09:56:20 |
@petrichor:envs.net | it's not obvious, but you can literally do unstable = import inputs.unstable { config = ... } | 09:58:21 |
Aldwin | Oh? And then there's no need to mention the system architecture? :o | 09:59:03 |
Aldwin | And what goes in the ...? :P Because right now I also don't know where to actually grab the parent config from | 09:59:48 |
Aldwin | I'm also curious about how import inputs.x works. I thought input.x is an attribute set referring to the outputs of the flake you've imported. But it's also an import path referring to the source of what you've imported?! | 10:03:23 |
@petrichor:envs.net | i guess if you just want to allow unfree packages you can do unstable = import inputs.unstable { config.allowUnfree = true; } | 10:04:19 |
@petrichor:envs.net | In reply to @avaq:matrix.org Oh? And then there's no need to mention the system architecture? :o not sure, i'm still figuring out this stuff too, but i think it should work because by the time overlays are being evaluated the system is already known | 10:05:09 |
@petrichor:envs.net | i think your overlay could look like final: prev: { unstable = import inputs.unstable { inherit (prev) system config; } but you might get away with omitting system | 10:06:59 |
@petrichor:envs.net | In reply to @avaq:matrix.org I'm also curious about how import inputs.x works. I thought input.x is an attribute set referring to the outputs of the flake you've imported. But it's also an import path referring to the source of what you've imported?! flakes are attribute sets with _type = "flake", but when coerced to a string (builtins.toString) or a path (builtins.toPath) they resolve to the flake's store path | 10:08:18 |
npc_projection | uhh my nixpkgs needs to inherit system arch... | 10:09:37 |
Aldwin | In reply to @petrichor:envs.net flakes are attribute sets with _type = "flake", but when coerced to a string (builtins.toString) or a path (builtins.toPath) they resolve to the flake's store path Ah, okay! Clear! | 10:10:40 |
Aldwin | In reply to @petrichor:envs.net i think your overlay could look like final: prev: { unstable = import inputs.unstable { inherit (prev) system config; } but you might get away with omitting system That's working! My system builds! :D | 10:14:50 |
Aldwin | Jez (he/him) ♾️: Deployed and booted the flake system. Thanks for the help :) | 11:14:10 |
Aldwin | * Jez (he/him) ♾️: Deployed and booted the flake systems. Thanks for the help :) | 11:14:27 |
| 8 Dec 2023 |
| Shane joined the room. | 15:25:50 |
| dadada (they/them) removed their profile picture. | 19:18:59 |
| 9 Dec 2023 |
| softinio changed their profile picture. | 05:18:46 |
| 10 Dec 2023 |
@janik0:matrix.org | In reply to @janik0:matrix.org of course, how else would I get people to do free qa :D As promised, even so it took some time but here it is: https://discourse.nixos.org/t/announcing-nixos-dns/36702 | 21:47:19 |
| 11 Dec 2023 |
| @ryoschin:matrix.org joined the room. | 12:49:14 |