diff options
author | tv <tv@krebsco.de> | 2023-09-12 12:56:39 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-09-13 16:23:38 +0200 |
commit | fbd485cd86c7e9984819357398f912a2d5510845 (patch) | |
tree | e1a9e2eedacfa25018d6b0eef3f4628a4d503ebc /tv/3modules/org.freedesktop.machine1.host-shell.nix | |
parent | 5370e0485788224126861e076110ac705013d2de (diff) |
tv: emigrate
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; - } - }()); - ''; -} |