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.
This commit is contained in:
@@ -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}
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user