From 30ca62b838f2f4d236d16857d5075649555a3fdc Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Mon, 16 Nov 2026 12:28:09 -0500 Subject: [PATCH] simplify nh config --- modules/common/nh.nix | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/modules/common/nh.nix b/modules/common/nh.nix index 1267cc9..b161d99 100644 --- a/modules/common/nh.nix +++ b/modules/common/nh.nix @@ -16,22 +16,28 @@ in system.tools.nixos-rebuild.enable = false; - # e.g. `server rebuild` or `phone boot`: the aliases, for another host over SSH - environment.systemPackages = lib.mapAttrsToList ( - command: host: - pkgs.writeShellScriptBin command '' - ${lib.concatMapAttrsStringSep "\n" ( - name: cmd: ''${name}() { ${cmd} -H ${host} --target-host ${command} --diff never "$@"; }'' - ) aliases} + environment = { + # e.g. `server rebuild` or `phone boot`: the aliases, for another host over SSH + systemPackages = + lib.mapAttrsToList + ( + command: host: + pkgs.writeShellScriptBin command '' + ${lib.concatMapAttrsStringSep "\n" ( + name: cmd: ''${name}() { ${cmd} -H ${host} --target-host ${command} --diff never "$@"; }'' + ) aliases} - "$@" - '' - ) { - server = "quadraticserver"; - phone = "quadphone"; + "$@" + '' + ) + { + server = "quadraticserver"; + phone = "quadphone"; + }; + + shellAliases = aliases // { + clean = "nh clean all"; + }; }; - environment.shellAliases = aliases // { - clean = "nh clean all"; - }; }