I currently add to my system flake registry from my flake. If I make any changes to the registry, i.e. by updating my flake inputs and rebuilding the flake, my user-level registry will be reset and only contain the default global flakes until I log out of and back into my user account. However, if I run nix flake registry list as root, I see my system flakes as well as the default global flakes as expected.
Steps To Reproduce
Update my inputs
Run nixos-rebuild
Run nix registry list
Expected behavior
I expect nix registry list and sudo nix registry list to produce the same output after updating my inputs and rebuilding without having to re-login.
If I rebuild and log back in and run nix registry list or sudo nix registry list, I get:
system flake:nixpkgs path:/nix/store/1468nkcswy53zvzjzpddircb3jhry03n-source?lastModified=1625223284&narHash=sha256-jjLcDSU1rRiJb+n3uez23XAa7kbnPcGZTa6jIKh1GMQ=&rev=357d2c8f6087685fe35cb1889a005a4dd4cce7b8
system flake:self path:/nix/store/cs2fw6kv143010fr2bjbrd0vjm7dfh5v-source?lastModified=1625291669&narHash=sha256-TxXUmCrM%2fm4YDinIicNg4GGxxdvApG%2fuoDkxcjq%2ftW0=
global flake:blender-bin github:edolstra/nix-warez?dir=blender
global flake:dwarffs github:edolstra/dwarffs
global flake:hydra github:NixOS/hydra
global flake:mach-nix github:DavHau/mach-nix
global flake:nimble github:nix-community/flake-nimble
global flake:nix github:NixOS/nix
global flake:nixops github:NixOS/nixops
global flake:nixos-hardware github:NixOS/nixos-hardware
global flake:nixos-homepage github:NixOS/nixos-homepage/flake
global flake:nur github:nix-community/NUR
global flake:nixpkgs github:NixOS/nixpkgs
global flake:templates github:NixOS/templates
global flake:patchelf github:NixOS/patchelf
global flake:nix-serve github:edolstra/nix-serve
global flake:nickel github:tweag/nickel
If I change my inputs, run nixos-rebuild and run nix registry list, I get:
global flake:blender-bin github:edolstra/nix-warez?dir=blender
global flake:dwarffs github:edolstra/dwarffs
global flake:hydra github:NixOS/hydra
global flake:mach-nix github:DavHau/mach-nix
global flake:nimble github:nix-community/flake-nimble
global flake:nix github:NixOS/nix
global flake:nixops github:NixOS/nixops
global flake:nixos-hardware github:NixOS/nixos-hardware
global flake:nixos-homepage github:NixOS/nixos-homepage/flake
global flake:nur github:nix-community/NUR
global flake:nixpkgs github:NixOS/nixpkgs
global flake:templates github:NixOS/templates
global flake:patchelf github:NixOS/patchelf
global flake:nix-serve github:edolstra/nix-serve
global flake:nickel github:tweag/nickel
However, if I then run sudo nix registry list, I get the expected:
system flake:nixpkgs path:/nix/store/1468nkcswy53zvzjzpddircb3jhry03n-source?lastModified=1625223284&narHash=sha256-jjLcDSU1rRiJb+n3uez23XAa7kbnPcGZTa6jIKh1GMQ=&rev=357d2c8f6087685fe35cb1889a005a4dd4cce7b8
system flake:self path:/nix/store/cs2fw6kv143010fr2bjbrd0vjm7dfh5v-source?lastModified=1625291669&narHash=sha256-TxXUmCrM%2fm4YDinIicNg4GGxxdvApG%2fuoDkxcjq%2ftW0=
global flake:blender-bin github:edolstra/nix-warez?dir=blender
global flake:dwarffs github:edolstra/dwarffs
global flake:hydra github:NixOS/hydra
global flake:mach-nix github:DavHau/mach-nix
global flake:nimble github:nix-community/flake-nimble
global flake:nix github:NixOS/nix
global flake:nixops github:NixOS/nixops
global flake:nixos-hardware github:NixOS/nixos-hardware
global flake:nixos-homepage github:NixOS/nixos-homepage/flake
global flake:nur github:nix-community/NUR
global flake:nixpkgs github:NixOS/nixpkgs
global flake:templates github:NixOS/templates
global flake:patchelf github:NixOS/patchelf
global flake:nix-serve github:edolstra/nix-serve
global flake:nickel github:tweag/nickel
Describe the bug
I currently add to my system flake registry from my flake. If I make any changes to the registry, i.e. by updating my flake inputs and rebuilding the flake, my user-level registry will be reset and only contain the default global flakes until I log out of and back into my user account. However, if I run
nix flake registry list
as root, I see my system flakes as well as the default global flakes as expected.Steps To Reproduce
nixos-rebuild
nix registry list
Expected behavior
I expect
nix registry list
andsudo nix registry list
to produce the same output after updating my inputs and rebuilding without having to re-login.nix-env --version
outputnix-env (Nix) 2.4pre20210601_5985b8b
Additional context
Within my flake, I have:
If I rebuild and log back in and run
nix registry list
orsudo nix registry list
, I get:If I change my inputs, run
nixos-rebuild
and runnix registry list
, I get:However, if I then run
sudo nix registry list
, I get the expected: