Add new autorun nix file that has scripts that run on rebuild

This commit is contained in:
Tyler Kelley 2024-01-18 02:09:11 -06:00
parent 1bef8f5608
commit a86e0ea0ea
5 changed files with 14 additions and 3 deletions

View File

@ -11,6 +11,6 @@ pkgs.writeShellScriptBin "theme-selector" ''
themechange "$chosen"
else
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
themechange "$chosen"
kitty -e themechange "$chosen"
fi
''

View File

@ -6,6 +6,6 @@ pkgs.writeShellScriptBin "themechange" ''
else
replacement="$1"
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/flake.nix
kitty -e sudo nixos-rebuild switch --flake ${flakeDir} && swaync-client -R && swaync-client -rs
sudo nixos-rebuild switch --flake ${flakeDir}
fi
''

10
config/system/autorun.nix Normal file
View File

@ -0,0 +1,10 @@
{ pkgs, config, ... }:
{
system.activationScripts = {
swayncreloader.text = ''
swaync-client -R
swaync-client -rs
'';
};
}

View File

@ -10,6 +10,7 @@
./config/system/intel-opengl.nix
./config/system/amd-opengl.nix
./config/system/programs.nix
./config/system/autorun.nix
];
# Enable networking

View File

@ -20,7 +20,7 @@
gitEmail = "tylerzanekelley@gmail.com";
theLocale = "en_US.UTF-8";
theTimezone = "America/Chicago";
theme = "onedark";
theme = "gigavolt";
browser = "firefox";
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
wallpaperDir = "/home/${username}/Pictures/Wallpapers";