| 1 Oct 2023 |
| Mikael Fangel joined the room. | 09:33:44 |
| @ThorHop:matrix.org changed their display name from hopland (negative nancy) to hopland (positive pete). | 17:20:12 |
| @ThorHop:matrix.org changed their display name from hopland (positive pete) to hopland (ambivalent andy). | 17:44:01 |
| 3 Oct 2023 |
| pbsds changed their profile picture. | 21:04:21 |
| 4 Oct 2023 |
| pbsds changed their profile picture. | 22:20:26 |
| @ThorHop:matrix.org changed their display name from hopland (ambivalent andy) to hopland (glib gary). | 23:15:46 |
| 9 Oct 2023 |
| TooManyTomatoes joined the room. | 05:48:16 |
@ronnypfannschmidt:matrix.org | is there an common way to register new outputs - i'd like to register pre-commit hooks as a flake output in a sane way (new app type) | 08:02:40 |
| dunxen joined the room. | 14:25:33 |
| 10 Oct 2023 |
| sylvance_theone joined the room. | 06:02:23 |
| woobilicious joined the room. | 07:21:01 |
woobilicious | In reply to @ronnypfannschmidt:matrix.org is there an common way to register new outputs - i'd like to register pre-commit hooks as a flake output in a sane way (new app type) The wiki says there's no spec and it's all defined by what tools use it (i.e. nix build), I would say just edit the wiki page with your output, maybe an RFC should be opened for that...or even just nixpkgs thread. | 07:26:07 |
woobilicious | what's the correct way to pin nixpkgs via the registry declarively in NixOS conf? I notice I have a system and global nixpkgs that dont match, and I wonder what I did wrong. | 07:29:23 |
@petrichor:envs.net | nix.registry.nixpkgs.flake = inputs.nixpkgs; or similar ought to do the trick | 08:23:33 |
@petrichor:envs.net | if you do nix registry list you should see that the nixpkgs registry entry points to a path in the nix store so you know its pinned | 08:25:07 |
@petrichor:envs.net | other flakes will still use whatever is specified in their own flake.lock of course | 08:26:39 |
woobilicious | Jez (he/him) ♾️: system looks correct, is it just impossible to switch out the global one to stable?
❯ nix registry list | grep flake:nixpkgs
system flake:nixpkgs path:/nix/store/splp4lqr6n115q125nhqk2qmg81hsk1r-source?lastModified=1694048570&narHash=sha256-PEQptwFCVaJ+jLFJgrZll2shQ9VI%2f7xVhrCYkJo8iIw=&rev=4f77ea639305f1de0a14d9d41eef83313360638c
global flake:nixpkgs github:NixOS/nixpkgs/nixpkgs-unstable
| 08:54:16 |
woobilicious | I also can't figure out how to get nix-channel to follow the same commit, so I'm not randomly pulling pkgs in from a different version. | 08:57:09 |
@antifuchs:asf.computer | oh, hah, I have a snippet for this that I stole from somewhere (probably the flakes channel here or on discord):
globalNix = {
nixpkgs,
hostName,
inputs,
}: let
lib = nixpkgs.lib;
in {
# Setup the registry such that the entries are pinned to the versions we pull in here.
# That should help with reproducability of disjoint projects & with compile times, too.
nix.registry =
(lib.mapAttrs' (name: _v: lib.nameValuePair name {flake = inputs.${name};}) inputs)
// {
${hostName}.flake = self;
nixpkgs.flake = nixpkgs;
};
# Also set the nix path such that pinned versions of stuff is available as channels.
nix.nixPath =
(lib.mapAttrsToList (name: _v: "${name}=${inputs.${name}}") inputs)
++ [
"nixpkgs=${nixpkgs}"
"$HOME/.nix-defexpr/channels"
];
};
| 12:52:59 |
@antifuchs:asf.computer | (that function takes a concrete nixpkgs, a host name and the attrset of flake inputs & munges them such that all the inputs are on the flake registry & registered as channels) | 12:53:39 |
@rick:matrix.ciphernetics.nl | Oh heh, I should configure that too and remove the channels that are configured on my system now | 15:18:35 |
@2xsaiko:tchncs.de | In reply to @antifuchs:asf.computer
oh, hah, I have a snippet for this that I stole from somewhere (probably the flakes channel here or on discord):
globalNix = {
nixpkgs,
hostName,
inputs,
}: let
lib = nixpkgs.lib;
in {
# Setup the registry such that the entries are pinned to the versions we pull in here.
# That should help with reproducability of disjoint projects & with compile times, too.
nix.registry =
(lib.mapAttrs' (name: _v: lib.nameValuePair name {flake = inputs.${name};}) inputs)
// {
${hostName}.flake = self;
nixpkgs.flake = nixpkgs;
};
# Also set the nix path such that pinned versions of stuff is available as channels.
nix.nixPath =
(lib.mapAttrsToList (name: _v: "${name}=${inputs.${name}}") inputs)
++ [
"nixpkgs=${nixpkgs}"
"$HOME/.nix-defexpr/channels"
];
};
it is better to set nixPath to be constant, since it's an environment variable that won't update in already open applications, so you might keep using old nixpkgs | 15:51:58 |
@2xsaiko:tchncs.de | I set it to a fixed path and link inputs there using environment.etc instead | 15:52:45 |
@2xsaiko:tchncs.de | https://git.dblsaiko.net/systems/tree/common/defaults/system-nix.nix#n67 | 15:53:32 |
@rick:matrix.ciphernetics.nl | I should probably just delete the channel and only use the registry, actually | 16:55:10 |
@antifuchs:asf.computer | 2xsaiko: didn't realize that was the case - that seems like the better solution, thanks! | 16:55:39 |
| 11 Oct 2023 |
| Madoura changed their profile picture. | 05:35:18 |
| @woshilapin:matrix.org left the room. | 19:14:34 |
| 12 Oct 2023 |
| @erremilia:matrix.org set a profile picture. | 00:13:14 |
| @erremilia:matrix.org removed their profile picture. | 00:14:44 |