mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 19:45:40 +00:00
feat: refactor home-manager configuration for multi-host support
This commit is contained in:
parent
f20c875a48
commit
6d1fd47bea
47 changed files with 51 additions and 14 deletions
|
@ -1,31 +0,0 @@
|
|||
{ pkgs, actions }:
|
||||
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "run-mouse-action" ''
|
||||
STATE_FILE="$HOME/.config/mouse-actions/state"
|
||||
|
||||
if [ ! -f "$STATE_FILE" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ACTION_NAME=$(<"$STATE_FILE")
|
||||
|
||||
case "$ACTION_NAME" in
|
||||
"deafen")
|
||||
systemd-run --user ${actions.deafen.package}/bin/deafen-action
|
||||
;;
|
||||
"sober-lag")
|
||||
systemd-run --user ${actions.sober-lag.package}/bin/sober-lag-action
|
||||
;;
|
||||
"autoclick")
|
||||
systemd-run --user ${actions.autoclick.package}/bin/autoclick-action
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
in
|
||||
{
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "run-mouse-action";
|
||||
paths = [ script pkgs.systemd ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue