mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31: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
|
|
@ -9,7 +9,6 @@ in {
|
|||
./starship.nix
|
||||
./direnv.nix
|
||||
./enhancement.nix
|
||||
./nixAliases.nix
|
||||
];
|
||||
|
||||
options.myConfig.shell = {
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.shell.nixAliases;
|
||||
in {
|
||||
options.myConfig.shell.nixAliases = {
|
||||
enable = lib.mkEnableOption "";
|
||||
nh.enable = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
config.home.shellAliases = let
|
||||
rebuild =
|
||||
if cfg.nh.enable
|
||||
then "nh os"
|
||||
else "nixos-rebuild --flake $FLAKE --use-remote-sudo";
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
nr = "sudo -v && ${rebuild}";
|
||||
nrs = "nr switch";
|
||||
nrt = "nr test";
|
||||
nrb = "nr boot";
|
||||
nrrb = "nrb && reboot";
|
||||
nu = "nix flake update";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue