sxmo: add missing deps to custom hooks
This commit is contained in:
parent
3ab943ab0b
commit
e5d843b21f
|
@ -66,6 +66,23 @@ let
|
|||
echo "launching ${identifier}..." | ${systemd-cat} --identifier=${identifier}
|
||||
${cmd} 2>&1 | ${systemd-cat} --identifier=${identifier}
|
||||
'';
|
||||
|
||||
hookPkgs = {
|
||||
inputhandler = pkgs.static-nix-shell.mkBash {
|
||||
pname = "sxmo_hook_inputhandler.sh";
|
||||
src = ./hooks;
|
||||
pkgs = [ "coreutils" ];
|
||||
};
|
||||
start = pkgs.static-nix-shell.mkBash {
|
||||
pname = "sxmo_hook_start.sh";
|
||||
src = ./hooks;
|
||||
pkgs = [ "superd" "xdg-user-dirs" ];
|
||||
};
|
||||
postwake = pkgs.static-nix-shell.mkBash {
|
||||
pname = "sxmo_hook_postwake.sh";
|
||||
src = ./hooks;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options = with lib; {
|
||||
|
@ -106,9 +123,9 @@ in
|
|||
sane.gui.sxmo.hooks = mkOption {
|
||||
type = types.attrsOf types.path;
|
||||
default = {
|
||||
"sxmo_hook_start.sh" = ./hooks/sxmo_hook_start.sh;
|
||||
"sxmo_hook_inputhandler.sh" = ./hooks/sxmo_hook_inputhandler.sh;
|
||||
"sxmo_hook_postwake.sh" = ./hooks/sxmo_hook_postwake.sh;
|
||||
"sxmo_hook_start.sh" = "${hookPkgs.start}/bin/sxmo_hook_start.sh";
|
||||
"sxmo_hook_inputhandler.sh" = "${hookPkgs.inputhandler}/sxmo_hook_inputhandler.sh";
|
||||
"sxmo_hook_postwake.sh" = "${hookPkgs.postwake}/sxmo_hook_postwake.sh";
|
||||
};
|
||||
description = ''
|
||||
extra hooks to add with higher priority than the builtins
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p coreutils
|
||||
|
||||
# increments to use for volume adjustment
|
||||
VOL_INCR_1=5
|
||||
|
|
3
hosts/modules/gui/sxmo/hooks/sxmo_hook_postwake.sh
Normal file → Executable file
3
hosts/modules/gui/sxmo/hooks/sxmo_hook_postwake.sh
Normal file → Executable file
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash
|
||||
|
||||
# the default sxmo_postwake handler checks if the modem is offline
|
||||
# and if so installs a wakelock to block suspend for 30s.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p superd -p xdg-user-dirs
|
||||
# this is based on upstream sxmo-utils sxmo_hook_start.sh
|
||||
# but modified for nixos integration and specialize a bit to my needs
|
||||
. sxmo_common.sh
|
||||
|
|
Loading…
Reference in New Issue
Block a user