switch greetd wayland session manager from niri to cage fork

This commit is contained in:
ulic-youthlic 2025-05-11 12:26:25 +08:00
parent 6632dde007
commit 9eebcf7562
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
8 changed files with 100 additions and 13 deletions

41
pkgs/cage.nix Normal file
View file

@ -0,0 +1,41 @@
{
pkgs,
srcs,
...
}: let
inherit (srcs) cage;
cageWithEnvOption = pkgs.cage.overrideAttrs (final: prev: {
inherit (cage) src version;
});
in
pkgs.writeShellApplication {
name = "cage";
runtimeInputs = [cageWithEnvOption];
text = ''
args=()
output=
while [[ $# -gt 0 ]]; do
case "$1" in
-o)
if [[ $# -ge 2 ]]; then
output="$2"
shift 2
else
args+=("$1")
shift
fi
;;
*)
args+=("$1")
shift
;;
esac
done
if [[ -n "$output" ]]; then
CAGE_OUTPUT_NAME="$output" cage "''${args[@]}"
else
cage "''${args[@]}"
fi
'';
}