2024-03-18 11:17:29 +00:00
|
|
|
{pkgs, ...}: {
|
|
|
|
home-manager.users.buffet = {
|
|
|
|
home.packages = [
|
|
|
|
(pkgs.writeScriptBin "nrb" ''
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
[[ $UID == 0 ]] || {
|
|
|
|
echo need to run as root
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2024-05-20 08:39:09 +00:00
|
|
|
flake="''${1:-https://buffets.kitchen/kitchen/rice/archive/main.tar.gz}"
|
|
|
|
|
|
|
|
nixos-rebuild build --flake "$flake" --option tarball-ttl 0|| exit 1
|
2024-03-18 11:17:29 +00:00
|
|
|
diff="$(${pkgs.nvd}/bin/nvd diff /run/current-system result)"
|
|
|
|
rm result
|
2024-05-20 08:39:09 +00:00
|
|
|
nixos-rebuild switch --flake "$flake" --option tarball-ttl 0
|
2024-03-18 11:17:29 +00:00
|
|
|
echo '***'
|
2024-03-19 21:10:38 +00:00
|
|
|
printf '%s\n' "$diff"
|
2024-03-18 11:17:29 +00:00
|
|
|
'')
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|