feat: add notification after rebuild succeeds

This commit is contained in:
Nydragon 2024-06-09 00:57:31 +09:00
parent 2b71d19006
commit c926deb63a
No known key found for this signature in database
GPG key ID: 14AA30A865EA1209

View file

@ -23,7 +23,12 @@
mv-bad-creation-date = ''exiftool -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]"'';
rename-images = rf ./rename_images.fish;
fish_prompt = rf ./fish_prompt.fish;
rebuild = "env --chdir $HOME/.nixconf sudo nixos-rebuild switch --flake .#$(hostname)";
rebuild = ''
env --chdir $HOME/.nixconf sudo nixos-rebuild switch --flake .#$(hostname) \
&& ${pkgs.libnotify}/bin/notify-send nixos-rebuild "Rebuild complete" \
-a nixos-rebuild \
-i ${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg
'';
};
};
}