mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
deploy: replace devShell with defaultPackage
This commit is contained in:
parent
3c3a47244f
commit
06913e7134
1 changed files with 9 additions and 17 deletions
|
@ -31,8 +31,6 @@ let
|
||||||
StrictHostKeyChecking yes
|
StrictHostKeyChecking yes
|
||||||
GlobalKnownHostsFile ${sshKnownHostsTxt}
|
GlobalKnownHostsFile ${sshKnownHostsTxt}
|
||||||
${hostSshConfigs}
|
${hostSshConfigs}
|
||||||
Host *
|
|
||||||
User root
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
livecd-deploy = pkgs.writeShellScript "livecd-deploy" ''
|
livecd-deploy = pkgs.writeShellScript "livecd-deploy" ''
|
||||||
|
@ -53,7 +51,6 @@ let
|
||||||
|
|
||||||
check-updates = pkgs.writeShellScript "check-updates" ''
|
check-updates = pkgs.writeShellScript "check-updates" ''
|
||||||
set -eu
|
set -eu
|
||||||
export SSH_CONFIG_FILE=${sshConfig}
|
|
||||||
c="${pkgs.colmena}/bin/colmena"
|
c="${pkgs.colmena}/bin/colmena"
|
||||||
j="$($c eval -E '{nodes,...}: builtins.mapAttrs (n: v: v.config.system.build.toplevel) nodes')"
|
j="$($c eval -E '{nodes,...}: builtins.mapAttrs (n: v: v.config.system.build.toplevel) nodes')"
|
||||||
$c exec -- '[ "$(echo '"'$j'"' | jq -r .\"$(hostname)\")" = "$(readlink /run/current-system)" ]'
|
$c exec -- '[ "$(echo '"'$j'"' | jq -r .\"$(hostname)\")" = "$(readlink /run/current-system)" ]'
|
||||||
|
@ -61,7 +58,6 @@ let
|
||||||
|
|
||||||
check-reboots = pkgs.writeShellScript "check-reboots" ''
|
check-reboots = pkgs.writeShellScript "check-reboots" ''
|
||||||
set -eu
|
set -eu
|
||||||
export SSH_CONFIG_FILE=${sshConfig}
|
|
||||||
c="${pkgs.colmena}/bin/colmena"
|
c="${pkgs.colmena}/bin/colmena"
|
||||||
$c exec -- '[ "$(readlink /run/booted-system/kernel)" = "$(readlink /run/current-system/kernel)" ]'
|
$c exec -- '[ "$(readlink /run/booted-system/kernel)" = "$(readlink /run/current-system/kernel)" ]'
|
||||||
'';
|
'';
|
||||||
|
@ -71,19 +67,15 @@ let
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShell = system: with helpers system;
|
defaultPackage = system: with helpers system;
|
||||||
pkgs.mkShell {
|
pkgs.writeShellScript "deploy-init" ''
|
||||||
buildInputs = [ pkgs.colmena ];
|
|
||||||
shellHook = ''
|
|
||||||
export SSH_CONFIG_FILE=${sshConfig}
|
export SSH_CONFIG_FILE=${sshConfig}
|
||||||
alias ssh='ssh -F${sshConfig}'
|
alias ssh='ssh -F${sshConfig}'
|
||||||
alias check-updates=${check-updates}
|
alias check-updates=${check-updates}
|
||||||
alias check-reboots=${check-reboots}
|
alias check-reboots=${check-reboots}
|
||||||
alias livecd-deploy=${livecd-deploy}
|
alias livecd-deploy=${livecd-deploy}
|
||||||
alias c=colmena
|
alias c=${pkgs.colmena}/bin/colmena
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
colmena =
|
colmena =
|
||||||
{ meta.nixpkgs = nixpkgs.legacyPackages."x86_64-linux"; } //
|
{ meta.nixpkgs = nixpkgs.legacyPackages."x86_64-linux"; } //
|
||||||
|
|
Loading…
Reference in a new issue