diff --git a/nix-darwin/services/nix-daemon.nix b/nix-darwin/services/nix-daemon.nix index 9c8f2bb..4341137 100644 --- a/nix-darwin/services/nix-daemon.nix +++ b/nix-darwin/services/nix-daemon.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let - fullScriptPath = "/opt/nix-daemon.sh"; + fullScriptPath = ".scripts/nix-daemon.sh"; in { home.file."Library/LaunchAgents/org.nixos.autostart.plist" = { diff --git a/nix-darwin/services/skhd.nix b/nix-darwin/services/skhd.nix index 3f37fe3..8785476 100644 --- a/nix-darwin/services/skhd.nix +++ b/nix-darwin/services/skhd.nix @@ -1,34 +1,36 @@ { config, pkgs, ... }: +let + fullScriptPath = ".scripts/skhd-daemon.sh"; +in { - # service - home.file."Library/LaunchAgents/org.nixos.skhd.plist" = { + home.file."Library/LaunchAgents/org.skhdos.autostart.plist" = { text = '' Label - org.nixos.skhd + org.skhdos.autostart ProgramArguments - ${pkgs.skhd}/bin/skhd + ${pkgs.bash}/bin/bash + ${fullScriptPath} - EnvironmentVariables - - PATH - ${pkgs.skhd}/bin:${pkgs.bash}/bin:/usr/bin:/bin:/usr/sbin:/sbin - RunAtLoad KeepAlive - - StandardOutPath - ${config.home.homeDirectory}/.skhd.out.log - StandardErrorPath - ${config.home.homeDirectory}/.skhd.err.log + ''; }; + + home.file."${fullScriptPath}" = { + text = '' + skhd --start-service + ''; + executable = true; + }; } + diff --git a/nix-darwin/services/yabai.nix b/nix-darwin/services/yabai.nix index c3722b9..27100b3 100644 --- a/nix-darwin/services/yabai.nix +++ b/nix-darwin/services/yabai.nix @@ -1,34 +1,36 @@ { config, pkgs, ... }: +let + fullScriptPath = ".scripts/yabai-daemon.sh"; +in { - # service - home.file."Library/LaunchAgents/org.nixos.yabai.plist" = { + home.file."Library/LaunchAgents/org.yabaios.autostart.plist" = { text = '' Label - org.nixos.yabai + org.yabaios.autostart ProgramArguments - ${pkgs.yabai}/bin/yabai + ${pkgs.bash}/bin/bash + ${fullScriptPath} - EnvironmentVariables - - PATH - ${pkgs.yabai}/bin:${pkgs.bash}/bin:/usr/bin:/bin:/usr/sbin:/sbin - RunAtLoad KeepAlive - - StandardOutPath - ${config.home.homeDirectory}/.yabai.out.log - StandardErrorPath - ${config.home.homeDirectory}/.yabai.err.log + ''; }; + + home.file."${fullScriptPath}" = { + text = '' + yabai --start-service + ''; + executable = true; + }; } +