Migrate packages
This commit is contained in:
30
pkgs/sos/default.nix
Normal file
30
pkgs/sos/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
nix-output-monitor,
|
||||
jq,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
name = "sos";
|
||||
|
||||
runtimeInputs = [
|
||||
nix-output-monitor
|
||||
jq
|
||||
];
|
||||
|
||||
# TODO: somehow avoid --no-check-sigs??
|
||||
text = ''
|
||||
#!/usr/bin/env sh
|
||||
# This script performs a nixos system update using the remote builder as remote store.
|
||||
# This should improve the system update performance drastically
|
||||
|
||||
echo "########## building... ##########"
|
||||
OUT=$(nom build "$FLAKE#nixosConfigurations.$(hostname).config.system.build.toplevel" --store ssh-ng://nix@builder.julian-mutter.de --eval-store auto --json | jq -r '.[0].outputs.out')
|
||||
echo "########## output is: $OUT ##########"
|
||||
echo "########## downloading... ##########"
|
||||
nix copy --no-check-sigs --from ssh-ng://nix@builder.julian-mutter.de "$OUT"
|
||||
|
||||
echo "########## activating... ##########"
|
||||
sudo "$OUT"/bin/switch-to-configuration switch
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user