mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-25 02:03:51 -08:00
feat: add update-nixos command
This commit is contained in:
parent
20247f6621
commit
379e7dc6e9
1 changed files with 10 additions and 0 deletions
10
home.nix
10
home.nix
|
@ -240,6 +240,16 @@
|
||||||
rebuild = "sudo nixos-rebuild switch";
|
rebuild = "sudo nixos-rebuild switch";
|
||||||
ls = "eza -l --icons=auto";
|
ls = "eza -l --icons=auto";
|
||||||
};
|
};
|
||||||
|
functions = {
|
||||||
|
update-nixos = {
|
||||||
|
description =
|
||||||
|
"Update the system flake and attempt to build and switch to the new configuration.";
|
||||||
|
body = ''
|
||||||
|
nix flake update /etc/nixos
|
||||||
|
sudo nixos-rebuild switch
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
set -g fish_greeting
|
set -g fish_greeting
|
||||||
|
|
Loading…
Reference in a new issue