setuid: properly adapt module to work with 23.11

This commit is contained in:
tv 2023-12-06 22:30:12 +01:00
parent 31f86bf819
commit adcb10a4e3
1 changed files with 19 additions and 7 deletions

View File

@ -80,13 +80,25 @@ let
}; };
imp = { imp = {
system.activationScripts."krebs.setuid" = stringAfter [ "usrbinenv" ] systemd.services."krebs.setuid" = {
(concatMapStringsSep "\n" wantedBy = [ "suid-sgid-wrappers.service" ];
(cfg: /* sh */ '' after = [ "suid-sgid-wrappers.service" ];
${cfg.activate} path = [
rm -f ${cfg.wrapperDir}/${cfg.name}.real pkgs.coreutils
'') ];
(attrValues config.krebs.setuid)); serviceConfig = {
Type = "oneshot";
ExecStart = pkgs.writeDash "krebs.setuid.sh" ''
${concatMapStringsSep "\n"
(getAttr "activate")
(attrValues config.krebs.setuid)
}
'';
};
unitConfig = {
DefaultDependencies = false;
};
};
}; };
in out in out