add phone alias to nh
This commit is contained in:
parent
6c22579e6f
commit
2c4fb39aa1
1 changed files with 10 additions and 5 deletions
|
|
@ -16,15 +16,20 @@ in
|
||||||
|
|
||||||
system.tools.nixos-rebuild.enable = false;
|
system.tools.nixos-rebuild.enable = false;
|
||||||
|
|
||||||
environment.systemPackages = [
|
# e.g. `server rebuild` or `phone boot`: the aliases, for another host over SSH
|
||||||
(pkgs.writeShellScriptBin "server" ''
|
environment.systemPackages = lib.mapAttrsToList (
|
||||||
|
command: host:
|
||||||
|
pkgs.writeShellScriptBin command ''
|
||||||
${lib.concatMapAttrsStringSep "\n" (
|
${lib.concatMapAttrsStringSep "\n" (
|
||||||
name: cmd: ''${name}() { ${cmd} -H quadraticserver --target-host server --diff never "$@"; }''
|
name: cmd: ''${name}() { ${cmd} -H ${host} --target-host ${command} --diff never "$@"; }''
|
||||||
) aliases}
|
) aliases}
|
||||||
|
|
||||||
"$@"
|
"$@"
|
||||||
'')
|
''
|
||||||
];
|
) {
|
||||||
|
server = "quadraticserver";
|
||||||
|
phone = "quadphone";
|
||||||
|
};
|
||||||
|
|
||||||
environment.shellAliases = aliases // {
|
environment.shellAliases = aliases // {
|
||||||
clean = "nh clean all";
|
clean = "nh clean all";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue