From d75d17e1e84f63e58a49c8db075cf28200eb2c37 Mon Sep 17 00:00:00 2001 From: Daniel Baker Date: Mon, 25 Nov 2024 09:09:00 -0800 Subject: [PATCH] nixos/cage: add package option Adds a package option so users can inject their own package. Previously the only way to change the package was to use an overlay and change the cage package everywhere. --- nixos/modules/services/wayland/cage.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/wayland/cage.nix b/nixos/modules/services/wayland/cage.nix index 870ae58f8646..c96bc5adf1cf 100644 --- a/nixos/modules/services/wayland/cage.nix +++ b/nixos/modules/services/wayland/cage.nix @@ -41,6 +41,8 @@ in { ''; }; + options.services.cage.package = mkPackageOption pkgs "cage" { }; + config = mkIf cfg.enable { # The service is partially based off of the one provided in the @@ -64,7 +66,7 @@ in { unitConfig.ConditionPathExists = "/dev/tty1"; serviceConfig = { ExecStart = '' - ${pkgs.cage}/bin/cage \ + ${cfg.package}/bin/cage \ ${escapeShellArgs cfg.extraArguments} \ -- ${cfg.program} '';