sxmo_suspend.sh: lift out of hosts/modules/gui/sxmo/hooks

i want to preserve this script for the future, while deleting the rest of my (unused) SXMO config
This commit is contained in:
Colin 2024-05-27 00:23:50 +00:00
parent f477604063
commit f3c3df2ca7
4 changed files with 17 additions and 7 deletions

View File

@ -95,12 +95,6 @@ let
pkgs = [ "systemd" "xdg-user-dirs" ];
srcRoot = ./hooks;
};
suspend = pkgs.static-nix-shell.mkPython3Bin {
pname = "sxmo_suspend.sh";
pkgs = [ "rtl8723cs-wowlan" "util-linux" ];
srcRoot = ./hooks;
extraMakeWrapperArgs = [ "--add-flags" "--verbose" ];
};
};
in
{
@ -174,7 +168,7 @@ in
"sxmo_hook_postwake.sh" = "${hookPkgs.postwake}/bin/sxmo_hook_postwake.sh";
"sxmo_hook_rotate.sh" = "${hookPkgs.rotate}/bin/sxmo_hook_rotate.sh";
"sxmo_hook_start.sh" = "${hookPkgs.start}/bin/sxmo_hook_start.sh";
"sxmo_suspend.sh" = "${hookPkgs.suspend}/bin/sxmo_suspend.sh";
"sxmo_suspend.sh" = "${pkgs.sxmo-suspend}/bin/sxmo_suspend.sh";
};
description = ''
extra hooks to add with higher priority than the builtins

View File

@ -0,0 +1,10 @@
{ static-nix-shell }:
static-nix-shell.mkPython3Bin {
# name is `sxmo_suspend.sh` because that's the binary this intends to replace
pname = "sxmo_suspend.sh";
srcRoot = ./.;
pkgs = [ "rtl8723cs-wowlan" "util-linux" ];
extraMakeWrapperArgs = [ "--add-flags" "--verbose" ];
}

View File

@ -1,5 +1,10 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p "python3.withPackages (ps: [ ])" -p rtl8723cs-wowlan -p util-linux
"""
replacement `sxmo_suspend.sh` hook for the [SXMO](https://sxmo.org) desktop
which integrates with [ntfy](https://ntfy.sh) in order to stay in deep sleep
until actively woken by a notification.
"""
# yeah, this isn't technically a hook, but the hook infrastructure isn't actually
# restricted to stuff that starts with sxmo_hook_ ...

View File

@ -77,6 +77,7 @@ let
swaylock-mobile = callPackage ./additional/swaylock-mobile { };
swaylock-plugin = callPackage ./additional/swaylock-plugin { };
sxmo_swaylock = callPackage ./additional/sxmo_swaylock { };
sxmo-suspend = callPackage ./additional/sxmo-suspend { };
sxmo-utils = callPackage ./additional/sxmo-utils { };
sysvol = callPackage ./additional/sysvol { };
tow-boot-pinephone = callPackage ./additional/tow-boot-pinephone { };