diff --git a/hosts/demeter/default.nix b/hosts/demeter/default.nix index 53d1faf..c38ef0c 100644 --- a/hosts/demeter/default.nix +++ b/hosts/demeter/default.nix @@ -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 = [ diff --git a/users/youwen/linux/home.nix b/users/youwen/linux/home.nix index 9e976f5..192d778 100755 --- a/users/youwen/linux/home.nix +++ b/users/youwen/linux/home.nix @@ -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 + ''; + }; }