fixed nix-env not upgrading generations

This commit is contained in:
Rouven Seifert 2023-05-16 11:49:31 +02:00
parent db5f67d529
commit 3a5c757b01
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09

View file

@ -17,7 +17,8 @@
ll = "ls -la"; ll = "ls -la";
la = "ls -a"; la = "ls -a";
less = "bat"; less = "bat";
update = "cd /etc/nixos && nix flake update && cat ${../images/another-cat.sixel}"; # update = "cd /etc/nixos && nix flake update && cat ${../images/another-cat.sixel}";
update = "cd /etc/nixos && nix flake update";
garbage = "sudo nix-collect-garbage -d && cat ${../images/cat-garbage.sixel}"; garbage = "sudo nix-collect-garbage -d && cat ${../images/cat-garbage.sixel}";
}; };
histSize = 100000; histSize = 100000;
@ -54,6 +55,7 @@
switch() { switch() {
OUT_PATH=/tmp/nixos-rebuild-nom-$(date +%s) OUT_PATH=/tmp/nixos-rebuild-nom-$(date +%s)
${pkgs.nix-output-monitor}/bin/nom build /etc/nixos#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH ${pkgs.nix-output-monitor}/bin/nom build /etc/nixos#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH
sudo ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $OUT_PATH
sudo $OUT_PATH/bin/switch-to-configuration switch sudo $OUT_PATH/bin/switch-to-configuration switch
unlink $OUT_PATH unlink $OUT_PATH
} }