master
Elias Almqvist 4 months ago
parent 8e1a52e29e
commit 4e45674770
No known key found for this signature in database
GPG Key ID: E31A99CE3E75A158
  1. 12
      nix-darwin/home.nix
  2. 5
      nix-darwin/modules/skhd.nix
  3. 38
      nix-darwin/services/nix-daemon.nix
  4. 36
      nix-darwin/services/skhd.nix
  5. 36
      nix-darwin/services/yabai.nix

@ -38,11 +38,6 @@
}; };
imports = [ imports = [
# Services
./services/nix-daemon.nix # NOTE: DO NOT REMOVE
./services/yabai.nix
./services/skhd.nix
# Modules # Modules
./modules/yabai.nix ./modules/yabai.nix
./modules/skhd.nix ./modules/skhd.nix
@ -156,6 +151,13 @@
enable = true; enable = true;
theme = "half-life"; theme = "half-life";
plugins = [ "git" "macos" ]; plugins = [ "git" "macos" ];
extraConfig = ''
# Homebrew
export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
# Nix
if [ -e /etc/profile.d/nix.sh ]; then . /etc/profile.d/nix.sh; fi
'';
}; };
}; };

@ -1,5 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let
termPath = "/Applications/Alacritty.app";
in
{ {
home.file.".skhdrc" = { home.file.".skhdrc" = {
executable = true; executable = true;
@ -7,7 +10,7 @@
# Mod1 is alt, Mod4 is cmd # Mod1 is alt, Mod4 is cmd
# Terminal # Terminal
cmd - return : open -n /Applications/iTerm.app cmd - return : open -n ${termPath}
# dmenu equivalent (you may want to install choose-gui or another launcher) # dmenu equivalent (you may want to install choose-gui or another launcher)
cmd - p : open -n /Applications/choose-gui.app cmd - p : open -n /Applications/choose-gui.app

@ -1,38 +0,0 @@
{ config, pkgs, ... }:
let
fullScriptPath = ".scripts/nix-daemon.sh";
in
{
home.file."Library/LaunchAgents/org.nixos.autostart.plist" = {
text = ''
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.nixos.autostart</string>
<key>ProgramArguments</key>
<array>
<string>${pkgs.bash}/bin/bash</string>
<string>${fullScriptPath}</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
'';
};
home.file."${fullScriptPath}" = {
text = ''
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
'';
executable = true;
};
}

@ -1,36 +0,0 @@
{ config, pkgs, ... }:
let
fullScriptPath = ".scripts/skhd-daemon.sh";
in
{
home.file."Library/LaunchAgents/org.skhdos.autostart.plist" = {
text = ''
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.skhdos.autostart</string>
<key>ProgramArguments</key>
<array>
<string>${pkgs.bash}/bin/bash</string>
<string>${fullScriptPath}</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
'';
};
home.file."${fullScriptPath}" = {
text = ''
skhd --start-service
'';
executable = true;
};
}

@ -1,36 +0,0 @@
{ config, pkgs, ... }:
let
fullScriptPath = ".scripts/yabai-daemon.sh";
in
{
home.file."Library/LaunchAgents/org.yabaios.autostart.plist" = {
text = ''
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.yabaios.autostart</string>
<key>ProgramArguments</key>
<array>
<string>${pkgs.bash}/bin/bash</string>
<string>${fullScriptPath}</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
'';
};
home.file."${fullScriptPath}" = {
text = ''
yabai --start-service
'';
executable = true;
};
}
Loading…
Cancel
Save