Add update and upgrade commands

This commit is contained in:
Lillian Violet 2024-03-12 14:42:33 +01:00
parent 50f21e221a
commit 74eb3db41a
2 changed files with 46 additions and 0 deletions

17
pkgs/upgrade/default.nix Normal file
View file

@ -0,0 +1,17 @@
{
lib,
stdenv,
writeShellApplication,
}:
writeShellApplication
{
name = "rebuild";
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
'';
}