diff options
| author | makefu <github@syntax-fehler.de> | 2023-09-28 23:22:59 +0200 |
|---|---|---|
| committer | makefu <github@syntax-fehler.de> | 2023-09-28 23:22:59 +0200 |
| commit | 2db6777b7caa37477c5ffddd99d69b2f2c6d9d7f (patch) | |
| tree | a72905fad73089b7ab295a948eda837bad013362 /tv/3modules/org.freedesktop.machine1.host-shell.nix | |
| parent | 29d72c898d674d2c18fc0f4a76b5e623de0c3dfe (diff) | |
| parent | 0215fbddccf206801d94f52518cbfec91ccc3cc5 (diff) | |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'tv/3modules/org.freedesktop.machine1.host-shell.nix')
| -rw-r--r-- | tv/3modules/org.freedesktop.machine1.host-shell.nix | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tv/3modules/org.freedesktop.machine1.host-shell.nix b/tv/3modules/org.freedesktop.machine1.host-shell.nix deleted file mode 100644 index 7d31edf9d..000000000 --- a/tv/3modules/org.freedesktop.machine1.host-shell.nix +++ /dev/null @@ -1,29 +0,0 @@ -with import ./lib; -{ config, ... }: { - options.org.freedesktop.machine1.host-shell.access = lib.mkOption { - default = {}; - type = - lib.types.addCheck - (lib.types.attrsOf (lib.types.attrsOf lib.types.bool)) - (x: - lib.all - lib.types.username.check - (lib.concatLists - (lib.mapAttrsToList - (name: value: [name] ++ lib.attrNames value) - x))); - }; - config.security.polkit.extraConfig = let - cfg = config.org.freedesktop.machine1.host-shell; - enable = cfg.access != {}; - in lib.optionalString enable /* js */ '' - polkit.addRule(function () { - var access = ${lib.toJSON cfg.access}; - return function(action, subject) { - if (action.id === "org.freedesktop.machine1.host-shell" - && (access[subject.user]||{})[action.lookup("user")]) - return polkit.Result.YES; - } - }()); - ''; -} |
