13 Oct 2025 |
Blastboom Strice | Yo thanks! | 21:13:07 |
Raj | https://martinfowler.com/bliki/TwoHardThings.html
Reminded me of this
| 22:22:31 |
David Lee | so hey, I've got a nice flake setup for nixos. buut if I wanted to have a "not flake but not channels" setup, maybe like https://jade.fyi/blog/pinning-nixos-with-npins/ says .. is there anything else to show how to actually go about it? | 22:28:07 |
14 Oct 2025 |
ekler | what are you stuck on?
| 00:41:20 |
David Lee | actually not stuck at all: https://github.com/davidlee/nix-config/blob/main/nix-config/PORTING-NOTES.md
rebuilds without drama. Pleasantly surprised to find I can just symlink to my flakes so I can port them one at a time if I decide to commit
just gotta try an actual switch now | 04:36:52 |
David Lee | well, damn. worked without a hitch. fast, too. | 04:42:10 |
piegames | In reply to @pktls:matrix.org so hey, I've got a nice flake setup for nixos. buut if I wanted to have a "not flake but not channels" setup, maybe like https://jade.fyi/blog/pinning-nixos-with-npins/ says .. is there anything else to show how to actually go about it? https://piegames.de/dumps/pinning-nixos-with-npins-revisited/ | 06:04:41 |
FireFly | nice, that's pretty much what I arrived at as well (although I called my symlink /etc/current-nixpkgs ) | 08:38:35 |
FireFly | actually, one question about this: I ended up resorting to setting enviornment.sessionVariables.NIX_PATH since as far as I could tell the nix.nixPath is provided by the channels module and disabled if you set nix.channel.enable = false; .. unsure why it seems you didn't run into that? | 08:43:51 |
aloisw | Interesting how many possibilities people have figured out to do that thing. There's also setting the nix-path config option. | 08:43:59 |
piegames | My home config says I must have run into at least some issues here https://git.darmstadt.ccc.de/piegames/home-config/-/blob/master/modules/generic.nix?ref_type=heads#L54-57 But it somehow works in the current configuration | 08:46:32 |
piegames | Be aware of nix.settings.nixPath vs nix.nixPath | 08:46:42 |
Coca | At least when I was doing this change myself I didn't have any difficulties with nix.nixPath and nix.channel.enable = false; together | 08:48:04 |
FireFly | 🤷 | 08:49:48 |
piegames | IIRC that option works, but nix.settings.nixPath doesn't, because the former is a NixOS option that does the right things while the other merely sets the Nix config and Nix config is garbage as usual | 08:50:32 |
piegames | https://github.com/NixOS/nixpkgs/blob/nixos-25.05/nixos/modules/config/nix-channel.nix#L42-L52 https://github.com/NixOS/nixpkgs/blob/nixos-25.05/nixos/modules/config/nix-channel.nix#L94-L96
nix.nixPath does the right thing, the channels thingie is only about its default value | 08:51:34 |
FireFly | hm, no I was trying to set nix.nixPath , and looking at configuration.nix/the source it seems to be coming from nix-channel.nix and gated behind mkIf cfg.enable ... but really it doesn't matter tbh, I'm fine with just setting environment.sessionVariables.NIX_PATH directly | 08:51:46 |
piegames | (Also hence me using mkForce to make sure no other module happens to sneak in some other bullshit) | 08:51:57 |
FireFly | https://github.com/NixOS/nixpkgs/blob/nixos-25.05/nixos/modules/config/nix-channel.nix#L80 hm this is the check I'm looking at | 08:52:24 |
piegames | oh wait you're right the entire block is gated on channel.enable | 08:52:41 |
piegames | https://github.com/NixOS/nixpkgs/blob/nixos-25.05/nixos/modules/config/nix-channel.nix#L19 oh wait cfg.enable refers to nix.enable and not nix.channel.enable | 08:55:33 |
piegames | so what I said earlier is true and that's why it works regardless of channels | 08:55:50 |
FireFly | ohh | 08:55:54 |
piegames | * oh wait you're right the entire block is gated on channel.enable | 08:56:01 |
piegames | gosh this language | 08:56:12 |
FireFly | so then it should be working fine, maybe I just somehow convinced myself it didn't when I was testing different approaches | 08:56:29 |
piegames | or you didn't reboot strong enough after switching | 08:57:54 |
piegames | environment variables don't propagate changes well | 08:58:07 |
FireFly | yeah could be, I don't remember | 08:58:17 |
FireFly | thanks for the second pair of eyes/I think I'll just update it to match as well now ^^ | 08:59:33 |