mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-27 09:54:53 +00:00
switch rebuild-nixos to smarter abbreviation
This commit is contained in:
parent
1b04f9a883
commit
006554f545
@ -16,7 +16,9 @@
|
|||||||
nps = "nix repl --expr 'import <nixpkgs>{}'";
|
nps = "nix repl --expr 'import <nixpkgs>{}'";
|
||||||
nixo = "man configuration.nix";
|
nixo = "man configuration.nix";
|
||||||
nixh = "man home-configuration.nix";
|
nixh = "man home-configuration.nix";
|
||||||
nr = "rebuild-nixos";
|
nr = {
|
||||||
|
function = "rebuild-nixos";
|
||||||
|
};
|
||||||
nro = "rebuild-nixos offline";
|
nro = "rebuild-nixos offline";
|
||||||
hm = "rebuild-home";
|
hm = "rebuild-home";
|
||||||
};
|
};
|
||||||
@ -43,18 +45,16 @@
|
|||||||
rebuild-nixos = {
|
rebuild-nixos = {
|
||||||
body = ''
|
body = ''
|
||||||
if test "$argv[1]" = "offline"
|
if test "$argv[1]" = "offline"
|
||||||
set option "--option substitute false"
|
set option "--option substitute false "
|
||||||
end
|
end
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
||||||
commandline -r "doas nixos-rebuild switch $option --flake ${config.dotfilesPath}#${config.networking.hostName}"
|
echo "doas nixos-rebuild switch $option--flake ${config.dotfilesPath}#${config.networking.hostName}"
|
||||||
commandline --function execute
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rebuild-home = {
|
rebuild-home = {
|
||||||
body = ''
|
body = ''
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
||||||
commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName}";
|
echo "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName}";
|
||||||
commandline --function execute
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
nr = lib.mkForce "rebuild-darwin";
|
nr = {
|
||||||
|
function = lib.mkForce "rebuild-darwin";
|
||||||
|
};
|
||||||
nro = lib.mkForce "rebuild-darwin offline";
|
nro = lib.mkForce "rebuild-darwin offline";
|
||||||
};
|
};
|
||||||
functions = {
|
functions = {
|
||||||
@ -20,15 +22,13 @@
|
|||||||
set option "--option substitute false"
|
set option "--option substitute false"
|
||||||
end
|
end
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
||||||
commandline -r "darwin-rebuild switch $option --flake ${config.dotfilesPath}#lookingglass"
|
echo "darwin-rebuild switch $option--flake ${config.dotfilesPath}#lookingglass"
|
||||||
commandline --function execute
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rebuild-home = lib.mkForce {
|
rebuild-home = lib.mkForce {
|
||||||
body = ''
|
body = ''
|
||||||
git -C ${config.dotfilesPath} add --intent-to-add --all
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
||||||
commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#lookingglass";
|
echo "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#lookingglass";
|
||||||
commandline --function execute
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user