blob: 613ce2b4482a8fc2d244b586c47e3a777bd0b9ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/env nix-shell
#!nix-shell -i zsh --packages nvd zsh
cd /etc/nixos && \
nix flake update && \
nixos-rebuild switch --upgrade --show-trace ${@} && \
echo && \
nixos-rebuild list-generations | cat && \
echo && \
res=$(find /nix/var/nix/profiles -iname system-\* -type l -exec ls -ltr \{\} + | awk '{print $9}' | tail -2)
if [[ ${?} -eq 0 && $(echo -E "${res}" | wc -l) -eq 2 ]]; then
nvd diff $(echo -E "${res}" | xargs)
fi
|