nixos/security.chromiumSuidSandbox: remove with lib;

This commit is contained in:
Felix Buehler
2024-12-08 13:21:48 +01:00
parent 8d0fd73946
commit 011b094cdd
@@ -1,18 +1,15 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.security.chromiumSuidSandbox;
sandbox = pkgs.chromium.sandbox;
in
{
imports = [
(mkRenamedOptionModule [ "programs" "unity3d" "enable" ] [ "security" "chromiumSuidSandbox" "enable" ])
(lib.mkRenamedOptionModule [ "programs" "unity3d" "enable" ] [ "security" "chromiumSuidSandbox" "enable" ])
];
options.security.chromiumSuidSandbox.enable = mkOption {
type = types.bool;
options.security.chromiumSuidSandbox.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to install the Chromium SUID sandbox which is an executable that
@@ -26,7 +23,7 @@ in
'';
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = [ sandbox ];
security.wrappers.${sandbox.passthru.sandboxExecutableName} =
{ setuid = true;