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
|
||||
GlobalKnownHostsFile ${sshKnownHostsTxt}
|
||||
${hostSshConfigs}
|
||||
Host *
|
||||
User root
|
||||
'';
|
||||
|
||||
livecd-deploy = pkgs.writeShellScript "livecd-deploy" ''
|
||||
|
@ -53,7 +51,6 @@ let
|
|||
|
||||
check-updates = pkgs.writeShellScript "check-updates" ''
|
||||
set -eu
|
||||
export SSH_CONFIG_FILE=${sshConfig}
|
||||
c="${pkgs.colmena}/bin/colmena"
|
||||
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)" ]'
|
||||
|
@ -61,7 +58,6 @@ let
|
|||
|
||||
check-reboots = pkgs.writeShellScript "check-reboots" ''
|
||||
set -eu
|
||||
export SSH_CONFIG_FILE=${sshConfig}
|
||||
c="${pkgs.colmena}/bin/colmena"
|
||||
$c exec -- '[ "$(readlink /run/booted-system/kernel)" = "$(readlink /run/current-system/kernel)" ]'
|
||||
'';
|
||||
|
@ -71,19 +67,15 @@ let
|
|||
|
||||
in
|
||||
{
|
||||
devShell = system: with helpers system;
|
||||
pkgs.mkShell {
|
||||
buildInputs = [ pkgs.colmena ];
|
||||
shellHook = ''
|
||||
defaultPackage = system: with helpers system;
|
||||
pkgs.writeShellScript "deploy-init" ''
|
||||
export SSH_CONFIG_FILE=${sshConfig}
|
||||
alias ssh='ssh -F${sshConfig}'
|
||||
alias check-updates=${check-updates}
|
||||
alias check-reboots=${check-reboots}
|
||||
alias livecd-deploy=${livecd-deploy}
|
||||
alias c=colmena
|
||||
alias c=${pkgs.colmena}/bin/colmena
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
colmena =
|
||||
{ meta.nixpkgs = nixpkgs.legacyPackages."x86_64-linux"; } //
|
||||
|
|
Loading…
Reference in a new issue