NixOS-Config/pkgs/upgrade/default.nix

18 lines
355 B
Nix
Raw Normal View History

2024-03-12 14:42:33 +01:00
{
lib,
stdenv,
writeShellApplication,
}:
writeShellApplication
{
name = "upgrade";
2024-03-12 14:42:33 +01:00
runtimeInputs = [];
text = ''
# An upgrade script for nixos
sudo systemd-inhibit --who="NixOS Updater" --why="Updating flake lock" update
sudo systemd-inhibit --who="NixOS Updater" --why="Updating system configuration" rebuild-no-inhibit
'';
}