This is closely related to #342338. Also see #342657.
Here we can discuss is sudo or --use-remote-sudo should be used with nixos-rebuild switch.
Context that triggered this issue:
https://matrix.to/#/#users:nixos.org
https://matrix.to/#/!RRerllqmbATpmbJgCn:nixos.org/$kiwUm4NtvAMvswl0Wg12Dm5upHprhzf86vHemMNrxQk
https://nixos.org/manual/nixos/stable/#sec-changing-config
TL;DR is that Emily isn't fully convinced that sudo should be avoided and --use-remote-sudo used instead. Another point that was mentioned is that the activation script probably has some stuff that does not require root and other stuff that does. So perhaps the "attack vector" can be further reduced by only using root for those stuff that actually require it. Though I'm not really aware of what polkit actually is, so I can't really comment on this one.
CC @emilazy @SigmaSquadron @Aleksanaa @cafkafk
This is closely related to #342338. Also see #342657.
Here we can discuss is
sudoor--use-remote-sudoshould be used withnixos-rebuild switch.Context that triggered this issue:
https://matrix.to/#/#users:nixos.org
https://matrix.to/#/!RRerllqmbATpmbJgCn:nixos.org/$kiwUm4NtvAMvswl0Wg12Dm5upHprhzf86vHemMNrxQk
https://nixos.org/manual/nixos/stable/#sec-changing-config
TL;DR is that Emily isn't fully convinced that
sudoshould be avoided and--use-remote-sudoused instead. Another point that was mentioned is that the activation script probably has some stuff that does not require root and other stuff that does. So perhaps the "attack vector" can be further reduced by only using root for those stuff that actually require it. Though I'm not really aware of what polkit actually is, so I can't really comment on this one.CC @emilazy @SigmaSquadron @Aleksanaa @cafkafk