diff --git a/users/buffet/default.nix b/users/buffet/default.nix index 6a2450b..4856419 100644 --- a/users/buffet/default.nix +++ b/users/buffet/default.nix @@ -14,6 +14,7 @@ ./gpg.nix ./ime.nix ./mako.nix + ./nvd.nix ./sway.nix ]; @@ -42,6 +43,7 @@ packages = with pkgs; [ unstable.anki + unstable.logseq alejandra python3 diff --git a/users/buffet/nvd.nix b/users/buffet/nvd.nix new file mode 100644 index 0000000..aaf4f84 --- /dev/null +++ b/users/buffet/nvd.nix @@ -0,0 +1,21 @@ +{pkgs, ...}: { + home-manager.users.buffet = { + home.packages = [ + (pkgs.writeScriptBin "nrb" '' + #!/usr/bin/env bash + + [[ $UID == 0 ]] || { + echo need to run as root + exit 1 + } + + nixos-rebuild build --flake ~buffet/rice#alice || exit 1 + diff="$(${pkgs.nvd}/bin/nvd diff /run/current-system result)" + rm result + nixos-rebuild switch --flake ~buffet/rice#alice + echo '***' + printf '%s' "$diff" + '') + ]; + }; +}