offline rebuild in new abbr

This commit is contained in:
Noah Masur 2024-12-16 13:43:54 -05:00
parent ef03bb112d
commit e6f5649999
No known key found for this signature in database
3 changed files with 24 additions and 12 deletions

View File

@ -115,7 +115,7 @@
left = 10, left = 10,
right = 10, right = 10,
top = 10, top = 10,
bottom = 10, bottom = 12,
} }
config.font = wezterm.font('${font}', { weight = 'Bold'}) config.font = wezterm.font('${font}', { weight = 'Bold'})

View File

@ -19,8 +19,12 @@
nr = { nr = {
function = "rebuild-nixos"; function = "rebuild-nixos";
}; };
nro = "rebuild-nixos offline"; nro = {
hm = "rebuild-home"; function = "rebuild-nixos-offline";
};
hm = {
function = "rebuild-home";
};
}; };
functions = { functions = {
nix-shell-run = { nix-shell-run = {
@ -44,11 +48,14 @@
}; };
rebuild-nixos = { rebuild-nixos = {
body = '' body = ''
if test "$argv[1]" = "offline"
set option "--option substitute false "
end
git -C ${config.dotfilesPath} add --intent-to-add --all git -C ${config.dotfilesPath} add --intent-to-add --all
echo "doas nixos-rebuild switch $option--flake ${config.dotfilesPath}#${config.networking.hostName}" echo "doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName}"
'';
};
rebuild-nixos-offline = {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
echo "doas nixos-rebuild switch --option substitute false --flake ${config.dotfilesPath}#${config.networking.hostName}"
''; '';
}; };
rebuild-home = { rebuild-home = {

View File

@ -13,16 +13,21 @@
nr = { nr = {
function = lib.mkForce "rebuild-darwin"; function = lib.mkForce "rebuild-darwin";
}; };
nro = lib.mkForce "rebuild-darwin offline"; nro = {
function = lib.mkForce "rebuild-darwin-offline";
};
}; };
functions = { functions = {
rebuild-darwin = { rebuild-darwin = {
body = '' body = ''
if test "$argv[1]" = "offline"
set option "--option substitute false"
end
git -C ${config.dotfilesPath} add --intent-to-add --all git -C ${config.dotfilesPath} add --intent-to-add --all
echo "darwin-rebuild switch $option--flake ${config.dotfilesPath}#lookingglass" echo "darwin-rebuild switch --flake ${config.dotfilesPath}#lookingglass"
'';
};
rebuild-darwin-offline = {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
echo "darwin-rebuild switch --option substitute false --flake ${config.dotfilesPath}#lookingglass"
''; '';
}; };
rebuild-home = lib.mkForce { rebuild-home = lib.mkForce {