mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
morph: move check-updates command
This commit is contained in:
parent
9de962a802
commit
9a49b9b392
1 changed files with 11 additions and 7 deletions
|
@ -50,8 +50,17 @@ let
|
||||||
exec ssh -oForwardAgent=yes -F"${sshConfig}" "root@$ip" -t "cd ${self}; nix develop"
|
exec ssh -oForwardAgent=yes -F"${sshConfig}" "root@$ip" -t "cd ${self}; nix develop"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
check-updates = pkgs.writeShellScript "check-updates" ''
|
||||||
|
set -eu
|
||||||
|
export SSH_CONFIG_FILE=${sshConfig}
|
||||||
|
res="$(morph build morph.nix)"
|
||||||
|
diff \
|
||||||
|
<(find $res -type l | xargs readlink | sort) \
|
||||||
|
<(morph exec morph.nix 'readlink /run/current-system' |& grep '^/nix/store/' | sort)
|
||||||
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
{ inherit jump pkgs sh sshConfig; };
|
{ inherit check-updates jump pkgs sh sshConfig; };
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -62,6 +71,7 @@ in
|
||||||
export SSH_CONFIG_FILE=${sshConfig}
|
export SSH_CONFIG_FILE=${sshConfig}
|
||||||
alias ssh='ssh -F${sshConfig}'
|
alias ssh='ssh -F${sshConfig}'
|
||||||
alias jump=${jump}
|
alias jump=${jump}
|
||||||
|
alias check-updates=${check-updates}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,12 +104,6 @@ in
|
||||||
|
|
||||||
packages = system: with helpers system;
|
packages = system: with helpers system;
|
||||||
{
|
{
|
||||||
check-updates = sh ''
|
|
||||||
res="$(morph build morph.nix)"
|
|
||||||
diff \
|
|
||||||
<(find $res -type l | xargs readlink | sort) \
|
|
||||||
<(morph exec morph.nix 'readlink /run/current-system' |& grep '^/nix/store/' | sort)
|
|
||||||
'';
|
|
||||||
livecd-deploy = sh ''
|
livecd-deploy = sh ''
|
||||||
config=".#nixosConfigurations.\"$1\".config"
|
config=".#nixosConfigurations.\"$1\".config"
|
||||||
ip="$(nix eval --raw "$config.sconfig.morph.deployment.targetHost")"
|
ip="$(nix eval --raw "$config.sconfig.morph.deployment.targetHost")"
|
||||||
|
|
Loading…
Reference in a new issue