quadshell/package.nix
2026-11-18 10:09:53 -05:00

52 lines
925 B
Nix

{
lib,
quickshell,
writeShellApplication,
gjs,
glib,
networkmanager,
modemmanager,
pipewire,
nmgui,
coreutils,
gawk,
gnugrep,
procps,
}:
let
config = lib.fileset.toSource {
root = ./src;
fileset = ./src;
};
locationAgent = writeShellApplication {
name = "quadshell-location-agent";
runtimeInputs = [ gjs ];
text = ''
exec gjs -m ${./location-agent.js} "$@"
'';
};
in
writeShellApplication {
name = "quadshell";
runtimeInputs = [
networkmanager
modemmanager
pipewire # pw-dump, for which outputs are plugged in
nmgui
coreutils
gawk
gnugrep
glib # gdbus, for logind's lock signal
procps # pgrep, for the wallpaper swaybg is showing
locationAgent
];
text = ''
exec ${lib.getExe quickshell} --path ${config} "$@"
'';
# For nix run .#phone, which only copies src
passthru = { inherit locationAgent; };
}