From e6f564999980ce94477141fee8aa1683f26d2b35 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:43:54 -0500 Subject: [PATCH] offline rebuild in new abbr --- modules/common/applications/wezterm.nix | 2 +- modules/common/shell/nixpkgs.nix | 19 +++++++++++++------ modules/darwin/nixpkgs.nix | 15 ++++++++++----- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/modules/common/applications/wezterm.nix b/modules/common/applications/wezterm.nix index 6d2273b..051f1e5 100644 --- a/modules/common/applications/wezterm.nix +++ b/modules/common/applications/wezterm.nix @@ -115,7 +115,7 @@ left = 10, right = 10, top = 10, - bottom = 10, + bottom = 12, } config.font = wezterm.font('${font}', { weight = 'Bold'}) diff --git a/modules/common/shell/nixpkgs.nix b/modules/common/shell/nixpkgs.nix index 9597703..c450a16 100644 --- a/modules/common/shell/nixpkgs.nix +++ b/modules/common/shell/nixpkgs.nix @@ -19,8 +19,12 @@ nr = { function = "rebuild-nixos"; }; - nro = "rebuild-nixos offline"; - hm = "rebuild-home"; + nro = { + function = "rebuild-nixos-offline"; + }; + hm = { + function = "rebuild-home"; + }; }; functions = { nix-shell-run = { @@ -44,11 +48,14 @@ }; rebuild-nixos = { body = '' - if test "$argv[1]" = "offline" - set option "--option substitute false " - end 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 = { diff --git a/modules/darwin/nixpkgs.nix b/modules/darwin/nixpkgs.nix index c439942..d02aaef 100644 --- a/modules/darwin/nixpkgs.nix +++ b/modules/darwin/nixpkgs.nix @@ -13,16 +13,21 @@ nr = { function = lib.mkForce "rebuild-darwin"; }; - nro = lib.mkForce "rebuild-darwin offline"; + nro = { + function = lib.mkForce "rebuild-darwin-offline"; + }; }; functions = { rebuild-darwin = { body = '' - if test "$argv[1]" = "offline" - set option "--option substitute false" - end 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 {