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

View file

@ -1,6 +1,7 @@
{ {
inputs, inputs,
pkgs, pkgs,
osConfig,
... ...
}: }:
{ {
@ -71,4 +72,13 @@
# Let home Manager install and manage itself. # Let home Manager install and manage itself.
programs.home-manager.enable = true; 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
'';
};
} }