From c926deb63a6af3467114e406c5d3c6cd42fc9c46 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Sun, 9 Jun 2024 00:57:31 +0900 Subject: [PATCH] feat: add notification after rebuild succeeds --- home/fish/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/home/fish/default.nix b/home/fish/default.nix index 3f77e35..81b3e8c 100644 --- a/home/fish/default.nix +++ b/home/fish/default.nix @@ -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 + ''; }; }; }