Nix channels not working

My version of signal expired, so I did the usual:

sudo nix-channel --update
sudo nixos-rebuild switch

But nothing gets downloaded, and the rebuild finishes right away. signal-desktop is still the same version.

I changed to unstable and repeated the process (as root):

[root@BB-5520:/nix/var/nix/profiles/per-user/root/channels/nixos]# nix-channel --add https://nixos.org/channels/nixos-unstable

[root@BB-5520:/nix/var/nix/profiles/per-user/root/channels/nixos]# nix-channel --update
unpacking channels...

[root@BB-5520:/nix/var/nix/profiles/per-user/root/channels/nixos]# nix-channel --list
nixos https://nixos.org/channels/nixos-unstable

[root@BB-5520:/nix/var/nix/profiles/per-user/root/channels/nixos]# nixos-rebuild switch
building Nix...
building the system configuration...
updating GRUB 2 menu...
activating the configuration...
setting up /etc...
reloading user units for bburdette...
setting up tmpfiles

So allegedly that’s changing from 23.05 to unstable. Should download a lot of stuff and do a bunch of installation, right? But it doesn’t.

1 Like

Have a look at sudo nix-channel --list
When you added nixos-unstable ist was likely not added as the “default channel”. By default Nixos uses “nixos” as default channel.
SO if you want to switch you system to unstable, you need to use
nix-channel --add https://nixos.org/channels/nixos-unstable nixos

3 Likes

Ok, here’s doing an unstable update, followed by 23.05 update. Both are pretty much no-ops!

bburdette@BB-5520:~$ sudo nix-channel --list
[sudo] password for bburdette:
nixos https://nixos.org/channels/nixos-unstable
bburdette@BB-5520:~$ sudo nix-channel --update
unpacking channels...
bburdette@BB-5520:~$ sudo nixos-rebuild switch
building Nix...
building the system configuration...
updating GRUB 2 menu...
activating the configuration...
setting up /etc...
reloading user units for bburdette...
setting up tmpfiles
bburdette@BB-5520:~$ sudo nix-channel --remove nixos
uninstalling 'nixos'
bburdette@BB-5520:~$ sudo nix-channel --add https://nixos.org/channels/nixos-23.05 nixos
bburdette@BB-5520:~$ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-23.05
bburdette@BB-5520:~$ sudo nix-channel --update
unpacking channels...
bburdette@BB-5520:~$ sudo nixos-rebuild switch
building Nix...
building the system configuration...
updating GRUB 2 menu...
activating the configuration...
setting up /etc...
reloading user units for bburdette...
setting up tmpfiles
bburdette@BB-5520:~$

Hmm, weird. What’s the output of these commands?

sudo echo $NIX_PATH
sudo nixos-rebuild build
ls -la result
ls -la /nix/var/nix/profiles
bburdette@BB-5520:~$ sudo echo $NIX_PATH
[sudo] password for bburdette:
/home/bburdette/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
bburdette@BB-5520:~$ sudo nixos-rebuild build
building Nix...
building the system configuration...
bburdette@BB-5520:~$ ls -la result
lrwxrwxrwx 1 root root 91 Jun 18 09:06 result -> /nix/store/794i3ka8brky282s8m4bjlmfgqzywz75-nixos-system-BB-5520-23.05pre465704.1603d11595a
bburdette@BB-5520:~$ ls -la /nix/var/nix/profiles/
total 36
drwxr-xr-x  3 root root 4096 Jun 18 08:52 .
drwxr-xr-x 12 root root 4096 Jun 17 07:21 ..
drwxr-xr-x  4 root root 4096 Apr 13  2018 per-user
lrwxrwxrwx  1 root root   15 Jun 18 08:52 system -> system-382-link
lrwxrwxrwx  1 root root   91 May  8 08:32 system-377-link -> /nix/store/8p3608k1b29cbyjm0l1rb3s2lk2s609l-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 May 11 08:55 system-378-link -> /nix/store/q4fisany6pv8v6myy3kmnbf7kjajn36s-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 May 11 12:37 system-379-link -> /nix/store/ajfba3mrfrwiyyjcqsbbpp37k0k8sdvd-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 May 23 17:55 system-380-link -> /nix/store/794i3ka8brky282s8m4bjlmfgqzywz75-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 Jun 17 07:21 system-381-link -> /nix/store/v2r2ridsmqd57a15zcw2zs1ji575czn8-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 Jun 17 07:22 system-382-link -> /nix/store/794i3ka8brky282s8m4bjlmfgqzywz75-nixos-system-BB-5520-23.05pre465704.1603d11595a
bburdette@BB-5520:~$

So clearly the channel is not being updated, you are on nixpkgs commit 1603d11595a which is from March 18.

What’s the output of sudo nix-channel --update -vvvvv ?

1 Like

Here you go! Just reading through it now.

bburdette@BB-5520:~/result/sw/bin$ sudo nix-channel --update -vvvvv
[sudo] password for bburdette:
acquiring write lock on '/nix/var/nix/temproots/22506'
using cache entry '{"name":"nixos-23.05","type":"file","url":"https://nixos.org/channels/nixos-23.05"}' -> '{"etag":"\"cda1495b8783764a27350931e31957c7\"","url":"https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956"}', '/nix/store/ljjhpyvl928v5kkrdkxc8kfddcxay3vg-nixos-23.05'
downloading 'https://nixos.org/channels/nixos-23.05'...
download thread waiting for 10000 ms
starting download of https://nixos.org/channels/nixos-23.05
curl: Couldn't find host nixos.org in the /etc/nix/netrc file; using defaults
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
curl:   Trying [2600:1f1c:471:9d00::c8]:443...
download thread waiting for 100 ms
curl: Connected to nixos.org (2600:1f1c:471:9d00::c8) port 443 (#0)
curl: ALPN: offers h2,http/1.1
curl: TLSv1.3 (OUT), TLS handshake, Client hello (1):
curl:  CAfile: /etc/ssl/certs/ca-certificates.crt
curl:  CApath: none
download thread waiting for 100 ms
curl: TLSv1.3 (IN), TLS handshake, Server hello (2):
curl: TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
curl: TLSv1.3 (IN), TLS handshake, Certificate (11):
curl: TLSv1.3 (IN), TLS handshake, CERT verify (15):
curl: TLSv1.3 (IN), TLS handshake, Finished (20):
curl: TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
curl: TLSv1.3 (OUT), TLS handshake, Finished (20):
curl: SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
curl: ALPN: server accepted h2
curl: Server certificate:
curl:  subject: CN=*.nixos.org
curl:  start date: May 21 04:51:08 2023 GMT
curl:  expire date: Aug 19 04:51:07 2023 GMT
curl:  subjectAltName: host "nixos.org" matched cert's "nixos.org"
curl:  issuer: C=US; O=Let's Encrypt; CN=R3
curl:  SSL certificate verify ok.
curl: using HTTP/2
curl: h2h3 [:method: GET]
curl: h2h3 [:path: /channels/nixos-23.05]
curl: h2h3 [:scheme: https]
curl: h2h3 [:authority: nixos.org]
curl: h2h3 [user-agent: curl/7.88.1 Nix/2.14.1]
curl: h2h3 [accept: */*]
curl: h2h3 [accept-encoding: zstd, br, gzip, deflate, bzip2, xz]
curl: h2h3 [if-none-match: "cda1495b8783764a27350931e31957c7"]
curl: Using Stream ID: 1 (easy handle 0x7fa0b8001040)
curl: TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
got header for 'https://nixos.org/channels/nixos-23.05': HTTP/2 302
got header for 'https://nixos.org/channels/nixos-23.05': age: 0
got header for 'https://nixos.org/channels/nixos-23.05': content-type: text/plain
got header for 'https://nixos.org/channels/nixos-23.05': date: Sun, 18 Jun 2023 16:25:03 GMT
got header for 'https://nixos.org/channels/nixos-23.05': location: https://channels.nixos.org/nixos-23.05
got header for 'https://nixos.org/channels/nixos-23.05': server: Netlify
got header for 'https://nixos.org/channels/nixos-23.05': strict-transport-security: max-age=31536000
got header for 'https://nixos.org/channels/nixos-23.05': x-nf-request-id: 01H37N5ZXRWC4KH5PTS6WX1JDF
got header for 'https://nixos.org/channels/nixos-23.05':
curl: Ignoring the response-body
download thread waiting for 100 ms
download thread waiting for 100 ms
curl: Connection #0 to host nixos.org left intact
curl: Issue another request to this URL: 'https://channels.nixos.org/nixos-23.05'
curl: Couldn't find host channels.nixos.org in the /etc/nix/netrc file; using defaults
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
curl:   Trying [2a04:4e42:10::729]:443...
download thread waiting for 100 ms
download thread waiting for 100 ms
curl: Connected to channels.nixos.org (2a04:4e42:10::729) port 443 (#1)
curl: ALPN: offers h2,http/1.1
curl: TLSv1.3 (OUT), TLS handshake, Client hello (1):
download thread waiting for 100 ms
curl: TLSv1.3 (IN), TLS handshake, Server hello (2):
download thread waiting for 100 ms
download thread waiting for 100 ms
curl: TLSv1.2 (IN), TLS handshake, Certificate (11):
curl: TLSv1.2 (IN), TLS handshake, Server key exchange (12):
curl: TLSv1.2 (IN), TLS handshake, Server finished (14):
curl: TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
curl: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
curl: TLSv1.2 (OUT), TLS handshake, Finished (20):
download thread waiting for 100 ms
curl: TLSv1.2 (IN), TLS handshake, Finished (20):
curl: SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
curl: ALPN: server accepted h2
curl: Server certificate:
curl:  subject: CN=channels.nixos.org
curl:  start date: Mar  7 19:48:40 2023 GMT
curl:  expire date: Apr  7 19:48:39 2024 GMT
curl:  subjectAltName: host "channels.nixos.org" matched cert's "channels.nixos.org"
curl:  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Atlas R3 DV TLS CA 2023 Q1
curl:  SSL certificate verify ok.
curl: using HTTP/2
curl: h2h3 [:method: GET]
curl: h2h3 [:path: /nixos-23.05]
curl: h2h3 [:scheme: https]
curl: h2h3 [:authority: channels.nixos.org]
curl: h2h3 [user-agent: curl/7.88.1 Nix/2.14.1]
curl: h2h3 [accept: */*]
curl: h2h3 [accept-encoding: zstd, br, gzip, deflate, bzip2, xz]
curl: h2h3 [if-none-match: "cda1495b8783764a27350931e31957c7"]
curl: Using Stream ID: 1 (easy handle 0x7fa0b8001040)
download thread waiting for 100 ms
download thread waiting for 100 ms
got header for 'https://nixos.org/channels/nixos-23.05': HTTP/2 301
got header for 'https://nixos.org/channels/nixos-23.05': location: https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956
got header for 'https://nixos.org/channels/nixos-23.05': server: AmazonS3
got header for 'https://nixos.org/channels/nixos-23.05': via: 1.1 varnish, 1.1 varnish
got header for 'https://nixos.org/channels/nixos-23.05': access-control-allow-origin: *
got header for 'https://nixos.org/channels/nixos-23.05': accept-ranges: bytes
got header for 'https://nixos.org/channels/nixos-23.05': date: Sun, 18 Jun 2023 16:25:03 GMT
got header for 'https://nixos.org/channels/nixos-23.05': age: 0
got header for 'https://nixos.org/channels/nixos-23.05': x-served-by: cache-iad-kiad7000021-IAD, cache-den8248-DEN
got header for 'https://nixos.org/channels/nixos-23.05': x-cache: HIT, MISS
got header for 'https://nixos.org/channels/nixos-23.05': x-cache-hits: 9, 0
got header for 'https://nixos.org/channels/nixos-23.05': x-timer: S1687105504.620816,VS0,VE38
got header for 'https://nixos.org/channels/nixos-23.05': content-length: 0
got header for 'https://nixos.org/channels/nixos-23.05':
download thread waiting for 100 ms
curl: Connection #1 to host channels.nixos.org left intact
curl: Issue another request to this URL: 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956'
curl: Couldn't find host releases.nixos.org in the /etc/nix/netrc file; using defaults
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
curl:   Trying [2a04:4e42:10::729]:443...
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
download thread waiting for 100 ms
curl: Connected to releases.nixos.org (2a04:4e42:10::729) port 443 (#2)
curl: ALPN: offers h2,http/1.1
curl: TLSv1.3 (OUT), TLS handshake, Client hello (1):
download thread waiting for 100 ms
curl: TLSv1.3 (IN), TLS handshake, Server hello (2):
download thread waiting for 100 ms
curl: TLSv1.2 (IN), TLS handshake, Certificate (11):
curl: TLSv1.2 (IN), TLS handshake, Server key exchange (12):
curl: TLSv1.2 (IN), TLS handshake, Server finished (14):
curl: TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
curl: TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
curl: TLSv1.2 (OUT), TLS handshake, Finished (20):
download thread waiting for 100 ms
curl: TLSv1.2 (IN), TLS handshake, Finished (20):
curl: SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
curl: ALPN: server accepted h2
curl: Server certificate:
curl:  subject: CN=releases.nixos.org
curl:  start date: Mar  7 20:47:38 2023 GMT
curl:  expire date: Apr  7 20:47:37 2024 GMT
curl:  subjectAltName: host "releases.nixos.org" matched cert's "releases.nixos.org"
curl:  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Atlas R3 DV TLS CA 2023 Q1
curl:  SSL certificate verify ok.
curl: using HTTP/2
curl: h2h3 [:method: GET]
curl: h2h3 [:path: /nixos/23.05/nixos-23.05.1092.c7ff1b9b956]
curl: h2h3 [:scheme: https]
curl: h2h3 [:authority: releases.nixos.org]
curl: h2h3 [user-agent: curl/7.88.1 Nix/2.14.1]
curl: h2h3 [accept: */*]
curl: h2h3 [accept-encoding: zstd, br, gzip, deflate, bzip2, xz]
curl: h2h3 [if-none-match: "cda1495b8783764a27350931e31957c7"]
curl: Using Stream ID: 1 (easy handle 0x7fa0b8001040)
download thread waiting for 100 ms
download thread waiting for 100 ms
got header for 'https://nixos.org/channels/nixos-23.05': HTTP/2 304
got header for 'https://nixos.org/channels/nixos-23.05': date: Sun, 18 Jun 2023 16:25:03 GMT
got header for 'https://nixos.org/channels/nixos-23.05': via: 1.1 varnish
got header for 'https://nixos.org/channels/nixos-23.05': x-varnish: 1859391990
got header for 'https://nixos.org/channels/nixos-23.05': etag: "cda1495b8783764a27350931e31957c7"
got header for 'https://nixos.org/channels/nixos-23.05': age: 63767
got header for 'https://nixos.org/channels/nixos-23.05':
download thread waiting for 100 ms
curl: Connection #2 to host releases.nixos.org left intact
finished download of 'https://nixos.org/channels/nixos-23.05'; curl status = 0, HTTP status = 304, body = 0 bytes
download thread waiting for 10000 ms
using cache entry '{"name":"nixexprs.tar.xz","type":"file","url":"https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz"}' -> '{"etag":"\"d127d7140802dd306e391085804c510d\"","url":"https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz"}', '/nix/store/1hsxgs0iqjbmxyy4ak0b234miggzcm2w-nixexprs.tar.xz'
downloading 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz'...
starting download of https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz
curl: Couldn't find host releases.nixos.org in the /etc/nix/netrc file; using defaults
curl: Found bundle for host: 0x7fa0b8226ce0 [can multiplex]
curl: Re-using existing connection #2 with host releases.nixos.org
curl: h2h3 [:method: GET]
curl: h2h3 [:path: /nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz]
curl: h2h3 [:scheme: https]
curl: h2h3 [:authority: releases.nixos.org]
curl: h2h3 [user-agent: curl/7.88.1 Nix/2.14.1]
curl: h2h3 [accept: */*]
curl: h2h3 [accept-encoding: zstd, br, gzip, deflate, bzip2, xz]
curl: h2h3 [if-none-match: "d127d7140802dd306e391085804c510d"]
curl: Using Stream ID: 3 (easy handle 0x7fa0b8001040)
download thread waiting for 100 ms
got header for 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz': HTTP/2 304
got header for 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz': date: Sun, 18 Jun 2023 16:25:03 GMT
got header for 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz': via: 1.1 varnish
got header for 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz': x-varnish: 1859392115
got header for 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz': etag: "d127d7140802dd306e391085804c510d"
got header for 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz': age: 65600
got header for 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz':
download thread waiting for 100 ms
curl: Connection #2 to host releases.nixos.org left intact
finished download of 'https://releases.nixos.org/nixos/23.05/nixos-23.05.1092.c7ff1b9b956/nixexprs.tar.xz'; curl status = 0, HTTP status = 304, body = 0 bytes
download thread waiting for 10000 ms
unpacking channels...
download thread shutting down
bburdette@BB-5520:~/result/sw/bin$

Wait, so we’re back on 23.05 now? I thought you set the nix channel to unstable.

It seems to download the right channel tarball for 23.05.

What does ls -la /nix/var/nix/profiles say now? Does it show the new channel ( nixos-23.05.1092.c7ff1b9b956) ?

can you also post the output of nix-info -m?

I guess not? Here’s the output:

bburdette@BB-5520:~$ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-23.05
bburdette@BB-5520:~$ sudo nix-channel --update
unpacking channels...
bburdette@BB-5520:~$ sudo nixos-rebuild switch
building Nix...
building the system configuration...
updating GRUB 2 menu...
activating the configuration...
setting up /etc...
reloading user units for bburdette...
setting up tmpfiles
bburdette@BB-5520:~$ ls -la /nix/var/nix/profiles
total 36
drwxr-xr-x  3 root root 4096 Jun 18 15:48 .
drwxr-xr-x 12 root root 4096 Jun 17 07:21 ..
drwxr-xr-x  4 root root 4096 Apr 13  2018 per-user
lrwxrwxrwx  1 root root   15 Jun 18 15:48 system -> system-382-link
lrwxrwxrwx  1 root root   91 May  8 08:32 system-377-link -> /nix/store/8p3608k1b29cbyjm0l1rb3s2lk2s609l-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 May 11 08:55 system-378-link -> /nix/store/q4fisany6pv8v6myy3kmnbf7kjajn36s-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 May 11 12:37 system-379-link -> /nix/store/ajfba3mrfrwiyyjcqsbbpp37k0k8sdvd-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 May 23 17:55 system-380-link -> /nix/store/794i3ka8brky282s8m4bjlmfgqzywz75-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 Jun 17 07:21 system-381-link -> /nix/store/v2r2ridsmqd57a15zcw2zs1ji575czn8-nixos-system-BB-5520-23.05pre465704.1603d11595a
lrwxrwxrwx  1 root root   91 Jun 17 07:22 system-382-link -> /nix/store/794i3ka8brky282s8m4bjlmfgqzywz75-nixos-system-BB-5520-23.05pre465704.1603d11595a
bburdette@BB-5520:~$
bburdette@BB-5520:~$ sudo nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.20, NixOS, 23.05 (Stoat), 23.05pre465704.1603d11595a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.14.1`
 - channels(bburdette): `"nixos-20.09-20.09.4407.1c1f5649bb9"`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

bburdette@BB-5520:~$

Please downgrade to Nix 2.13 or upgrade to 2.16, as 2.14 and 2.15 are known to have several issues, where the described symptom with channel updates being weird is one of them…

3 Likes

Ok thanks everyone. This pushed me to finally move to a flake.nix for my system.

{
  description = "An example NixOS configuration";

  inputs = {
    nixpkgs = { url = "github:nixos/nixpkgs/nixos-23.05"; };
  };

  outputs = inputs:
  {
    nixosConfigurations = {

      BB-5520 = inputs.nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          ./configuration.nix
        ];
        specialArgs = { inherit inputs; };
      };
    };
  };
}

I rebuilt with that. Now with nix 2.15.1, I can rename the flake.nix to something else and then nixos-rebuild switch successfully. Although maybe its not actually updating, as NobbZ says?

At any rate, the solution for me is don’t use channels.

1 Like

Once you did a nix-channel --remove for all your old channels, you might also want to add Flake-programs-sqlite: fixing command-not-found for pure flake systems to your flake. :wink:

3 Likes