diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2023-10-18 13:58:34 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2023-10-18 14:01:32 +0200 |
commit | 89ec004f59141ea83a08be7c790d7a58c030bb41 (patch) | |
tree | 8ff1823a6eb71044e1b6acef5f3bcd8ed59d0648 /nixos | |
parent | 84fc1cdc922b7f029272114beee1e7a18456ecbe (diff) |
nixos/regreet: make `cage(1)` args configurable
In my case I'd like to be able to add `-m last` to `cage` to make sure that the login form from regreet isn't displayed half on my external monitor and half on my laptop screen, but on the last connected monitor only. That's basically the issue described in #226586, though it's not a proper fix since the login form is shown on one monitor only.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/programs/regreet.nix | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/nixos/modules/programs/regreet.nix b/nixos/modules/programs/regreet.nix index 640bc259573d0..0fd9cf232981c 100644 --- a/nixos/modules/programs/regreet.nix +++ b/nixos/modules/programs/regreet.nix @@ -36,6 +36,19 @@ in ''; }; + cageArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ "-s" ]; + example = lib.literalExpression + '' + [ "-s" "-m" "last" ] + ''; + description = lib.mdDoc '' + Additional arguments to be passed to + [cage](https://github.com/cage-kiosk/cage). + ''; + }; + extraCss = lib.mkOption { type = lib.types.either lib.types.path lib.types.lines; default = ""; @@ -50,7 +63,7 @@ in config = lib.mkIf cfg.enable { services.greetd = { enable = lib.mkDefault true; - settings.default_session.command = lib.mkDefault "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} -s -- ${lib.getExe cfg.package}"; + settings.default_session.command = lib.mkDefault "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package}"; }; environment.etc = { |