simplify nh config
This commit is contained in:
parent
85465b47c8
commit
30ca62b838
1 changed files with 21 additions and 15 deletions
|
|
@ -16,8 +16,11 @@ in
|
||||||
|
|
||||||
system.tools.nixos-rebuild.enable = false;
|
system.tools.nixos-rebuild.enable = false;
|
||||||
|
|
||||||
|
environment = {
|
||||||
# e.g. `server rebuild` or `phone boot`: the aliases, for another host over SSH
|
# e.g. `server rebuild` or `phone boot`: the aliases, for another host over SSH
|
||||||
environment.systemPackages = lib.mapAttrsToList (
|
systemPackages =
|
||||||
|
lib.mapAttrsToList
|
||||||
|
(
|
||||||
command: host:
|
command: host:
|
||||||
pkgs.writeShellScriptBin command ''
|
pkgs.writeShellScriptBin command ''
|
||||||
${lib.concatMapAttrsStringSep "\n" (
|
${lib.concatMapAttrsStringSep "\n" (
|
||||||
|
|
@ -26,12 +29,15 @@ in
|
||||||
|
|
||||||
"$@"
|
"$@"
|
||||||
''
|
''
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
server = "quadraticserver";
|
server = "quadraticserver";
|
||||||
phone = "quadphone";
|
phone = "quadphone";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.shellAliases = aliases // {
|
shellAliases = aliases // {
|
||||||
clean = "nh clean all";
|
clean = "nh clean all";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue