feat: add rebuild and updater scripts

This commit is contained in:
Youwen Wu 2024-10-11 15:34:57 -07:00
parent 4684c6a9d6
commit f89799649a
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 12 additions and 0 deletions

View file

@ -1,6 +1,7 @@
{
inputs,
system,
osConfig,
...
}:
{
@ -28,6 +29,7 @@
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = {
inherit inputs;
inherit osConfig;
};
home-manager.users.youwen = {
imports = [

View file

@ -1,6 +1,7 @@
{
inputs,
pkgs,
osConfig,
...
}:
{
@ -71,4 +72,13 @@
# Let home Manager install and manage itself.
programs.home-manager.enable = true;
programs.fish.functions = {
rebuild = ''doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} switch &| nom'';
nixos-update = ''
cd ~/.config/liminalOS
nix flake update --commit-lock-file
doas nixos-rebuild --flake ~/.config/liminalOS\#${osConfig.networking.hostName} switch &| nom
'';
};
}