But tbh it’s rare I run rebuild directly anymore. Most of my machines are set up for automatic rebuilds from my remote. Otherwise I use shell app shortcuts that cache the URI to disk so I only need to pass my flake remote or local folderpath once, then all subsequent cmds use it; nup to update the flake lock, nboot or nswitch, and hswitch for home-manager.
(most of my machines use HM nixos module but my main uses standalone for easier tweaking; switching between module and sa is a one-line host change in my config)
I also have ns and nr scripts for aliasing nix shell and run using the flake’s lock. e.g. nr u.yt-dlp runs the yt-dlp program from the unstable nixpkgs my host is pinned to; s. for stable. If I need a specific revision then I fall back to the regular nix command.
Using shell apps as cross-shell shortcuts/commands has really changed how I use my terminal.
We’re a sudo nixos-rebuild boot household here
You forgot to update the flake. Also, who uses sudo in this day and age?
I’m ignorant here, what’s the alternative, just su to root for admin?
I use run0 c:
security.run0.enableSudoAliasandsudois powered byrun0and polkit, but still takes the same parameters as the originalsudo.I assume paru -Syu
Just
Doesn’t
parujust callsudo pacmanto install the built package?Often doas tho I personally prefer sudo-rs rewrite because it solves 99% of the compatibility edgecases
and breaks Ansible
Well I use sudo-rs, and my CI does that for me :p
But tbh it’s rare I run rebuild directly anymore. Most of my machines are set up for automatic rebuilds from my remote. Otherwise I use shell app shortcuts that cache the URI to disk so I only need to pass my flake remote or local folderpath once, then all subsequent cmds use it;
nupto update the flake lock,nbootornswitch, andhswitchfor home-manager.(most of my machines use HM nixos module but my main uses standalone for easier tweaking; switching between module and sa is a one-line host change in my config)
I also have
nsandnrscripts for aliasing nix shell and run using the flake’s lock. e.g.nr u.yt-dlpruns the yt-dlp program from the unstable nixpkgs my host is pinned to;s.for stable. If I need a specific revision then I fall back to the regular nix command.Using shell apps as cross-shell shortcuts/commands has really changed how I use my terminal.
Came here to say the same!! sudo nixos-rebuild switch if I’m feeling frisky.