File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 123123 config ,
124124 ...
125125 } :
126+ let
127+ cfg = config . security . run0-sudo-shim ;
128+ in
126129 {
127130 options . security = {
128131 polkit . persistentAuthentication = lib . mkEnableOption "patch polkit to allow persistent authentication and add rules" ;
129- run0-sudo-shim . enable = lib . mkEnableOption "enable run0-sudo-shim instead of sudo" ;
132+ run0-sudo-shim = {
133+ enable = lib . mkEnableOption "enable run0-sudo-shim instead of sudo" ;
134+ package = lib . mkPackageOption pkgs "run0-sudo-shim" { } // {
135+ # should be removed when upstreaming to nixpkgs
136+ default = pkgs . run0-sudo-shim or build-pkg pkgs ;
137+ } ;
138+ } ;
130139 } ;
131140
132141 config = lib . mkMerge [
133- {
134- nixpkgs . overlays = [ self . overlays . default ] ;
135- }
136- ( lib . mkIf config . security . run0-sudo-shim . enable {
137- environment . systemPackages = [ pkgs . run0-sudo-shim ] ;
142+ ( lib . mkIf cfg . enable {
143+ environment . systemPackages = [ cfg . package ] ;
138144 security . sudo . enable = false ;
139145 security . polkit . enable = true ;
140146
You can’t perform that action at this time.
0 commit comments