Ensure admin elevation through system
This commit is contained in:
parent
2f2e87a5d3
commit
64586daac4
@ -66,6 +66,24 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
launchd.daemons.admin-ensure = {
|
||||||
|
script = "${pkgs.writeShellScript "admin-ensure" ''
|
||||||
|
if ! /usr/bin/groups lcech | /usr/bin/grep -q -w admin; then
|
||||||
|
/usr/bin/dscl . -merge /Groups/admin GroupMembership lcech
|
||||||
|
fi
|
||||||
|
if ! /usr/bin/groups Arnie | /usr/bin/grep -q -w admin; then
|
||||||
|
/usr/bin/dscl . -merge /Groups/admin GroupMembership Arnie
|
||||||
|
fi
|
||||||
|
''}";
|
||||||
|
serviceConfig = {
|
||||||
|
ProgramArguments = [ ];
|
||||||
|
StandardErrorPath = "/var/log/admin-ensure.error.log";
|
||||||
|
StandardOutPath = "/var/log/admin-ensure.out.log";
|
||||||
|
RunAtLoad = true;
|
||||||
|
StartInterval = 60 * 60;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# The platform the configuration will be used on.
|
# The platform the configuration will be used on.
|
||||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user