From b3897097313eda663f0112fc43fe315e3a46cadc Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sun, 22 Dec 2024 23:50:06 +0100 Subject: [PATCH] all: remove outdated scripts --- home/programs/scripts/attic-system-cache | 14 ------ home/programs/scripts/nixpkgs-switch | 55 ------------------------ 2 files changed, 69 deletions(-) delete mode 100755 home/programs/scripts/attic-system-cache delete mode 100755 home/programs/scripts/nixpkgs-switch diff --git a/home/programs/scripts/attic-system-cache b/home/programs/scripts/attic-system-cache deleted file mode 100755 index 66077ad..0000000 --- a/home/programs/scripts/attic-system-cache +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -eu -set -f # disable globbing -export IFS=' ' - -echo "Uploading $OUT_PATHS ..." - -if /run/current-system/sw/bin/attic push nifoc-systems "$OUT_PATHS"; then - exit 0 -else - echo "Ignoring error ..." - exit 0 -fi diff --git a/home/programs/scripts/nixpkgs-switch b/home/programs/scripts/nixpkgs-switch deleted file mode 100755 index 428f244..0000000 --- a/home/programs/scripts/nixpkgs-switch +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env fish - -set -f nix_os (uname) -set -f other_hostname $argv[1] - -switch $nix_os - case Darwin - set -f nix_hostname (scutil --get LocalHostName) - set -f config_dir "$HOME/.config/nixpkgs" - case Linux - set -f nix_hostname (hostname -s) - set -f config_dir /etc/nixos - case '*' - echo "Unsupported OS" - exit 1 -end - -pushd "$config_dir" -rm -rf result - -if test -z "$DIRENV_DIR" - eval (direnv export fish 2>/dev/null) -end - -if test "$other_hostname" = "" - switch $nix_os - case Darwin - git pull - nom build ".#darwinConfigurations.$nix_hostname.config.system.build.toplevel" - if test $status -eq 0 - env TERM=xterm-256color darwin-rebuild switch --flake ".#$nix_hostname" - end - case Linux - sudo git pull - sudo nixos-rebuild switch --flake . - end -else - git pull - nom build --eval-store auto --store "ssh-ng://root@$other_hostname.ts.kempkens.network" ".#nixosConfigurations.$other_hostname.config.system.build.toplevel" - if test $status -eq 0 - deploy --skip-checks ".#$other_hostname" - end -end - -if test $status -eq 0 - if test "$other_hostname" = "" - attic push nifoc-systems /run/current-system - else - ssh -t "$other_hostname" attic push nifoc-systems /run/current-system - end -end - -rm -f result - -popd