Commit 251bf83c71b5

Vincent Demeester <vincent@sbr.pm>
2026-01-12 17:08:21
fix(microshift): use setuid sudo wrapper from /run/wrappers/bin
CRC requires sudo with the setuid bit set. In NixOS, this is provided by the wrapper in /run/wrappers/bin, not the nix store package. Error: sudo must be owned by uid 0 and have the setuid bit set
1 parent 5b5afe9
Changed files (1)
modules
microshift
modules/microshift/default.nix
@@ -90,10 +90,11 @@ in
         WorkingDirectory = "/home/${cfg.user}";
       };
 
-      path = with pkgs; [
-        sudo
-        crc
-      ];
+      path = with pkgs; [ crc ];
+
+      environment = {
+        PATH = lib.mkForce "/run/wrappers/bin:/run/current-system/sw/bin";
+      };
 
       script = ''
         # Setup CRC with MicroShift preset