mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 00:21:34 +01:00
Move rebuild aliases to the system level
This commit is contained in:
parent
2a71c29fd5
commit
ee6393aa18
7 changed files with 23 additions and 33 deletions
20
modules/system/nix-helper.nix
Normal file
20
modules/system/nix-helper.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.nix-helper.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.nix-helper.enable {
|
||||
programs.nh.enable = true;
|
||||
|
||||
environment.shellAliases = let
|
||||
rebuild = "sudo -v && nh os";
|
||||
in {
|
||||
nrs = "${rebuild} switch";
|
||||
nrt = "${rebuild} test";
|
||||
nrb = "${rebuild} boot";
|
||||
nrrb = "nrb && reboot";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue