diff --git a/nix/configurations/tungsten/home/programs.nix b/nix/configurations/tungsten/home/programs.nix index 15c164ff..c74f53fc 100644 --- a/nix/configurations/tungsten/home/programs.nix +++ b/nix/configurations/tungsten/home/programs.nix @@ -44,7 +44,6 @@ in { pkgs.nurl pkgs.nvd pkgs.niv - # myPkgs.nd ]; programs = { neovim.enable = true; diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index c5ac4522..b3178b13 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -37,7 +37,6 @@ in { pkgs.nurl pkgs.nvd pkgs.niv - myPkgs.nd ]; programs = { neovim.enable = true; diff --git a/nix/packages/default.nix b/nix/packages/default.nix index 85008c64..6261bded 100644 --- a/nix/packages/default.nix +++ b/nix/packages/default.nix @@ -47,7 +47,6 @@ in rec { typst-mutilate = pkgs.callPackage ./typst-mutilate.nix {}; webtoon_downloader = pkgs.callPackage ./webtoon_downloader.nix {}; - nd = pkgs.callPackage ./nd {}; xbrightness = pkgs.callPackage ./xbrightness.nix {}; ffgun = pkgs.callPackage ./ffgun.nix {}; easyscan = pkgs.callPackage ./easyscan.nix {}; diff --git a/nix/packages/nd/default.nix b/nix/packages/nd/default.nix deleted file mode 100644 index 719a7640..00000000 --- a/nix/packages/nd/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - writeShellApplication, - nix-output-monitor, - nvd, -}: -writeShellApplication { - name = "nd"; - runtimeInputs = [ - nix-output-monitor - nvd - ]; - text = builtins.readFile ./nd.sh; -} diff --git a/nix/packages/nd/nd.sh b/nix/packages/nd/nd.sh deleted file mode 100755 index 9b5ed043..00000000 --- a/nix/packages/nd/nd.sh +++ /dev/null @@ -1,65 +0,0 @@ -bold=$(tput bold) -normal=$(tput sgr0) - -this_hash="latest" -while [ $# -gt 0 ]; do - case "$1" in - --clean*) - shopt -s nullglob - for link in nix-diff*; do - set -x - unlink "$link" - set +x - done - exit - ;; - --last*) - if [[ "$1" != *=* ]]; then shift; fi - last_hash=$(git rev-parse "${1#*=}") - ;; - --this*) - if [[ "$1" != *=* ]]; then shift; fi - this_hash=$(git rev-parse "${1#*=}") - ;; - --hostname* | --host*) - if [[ "$1" != *=* ]]; then shift; fi - hostname="${1#*=}" - ;; - *) - echo "Error: unknown argument $1" - exit 1 - ;; - esac - shift -done - -build_config() { - hash="$1" - link="nix-diff-${hostname}-${hash:0:7}" - - if [ "$hash" = latest ]; then - # build the dirty worktree configuration - ref=".#nixosConfigurations.${hostname}.config.system.build.toplevel" - else - ref=".?ref=${hash}#nixosConfigurations.${hostname}.config.system.build.toplevel" - fi - - if [ -L "$link" ]; then - echo "Found link ${bold}$link${normal}" - else - echo "Starting configuration build at ${bold}$hash${normal}" - nix build "$ref" --out-link "$link" --log-format internal-json --verbose |& nom --json - fi -} - -echo "Comparing ${bold}$hostname${normal}'s configuration of ${bold}${last_hash:0:7}${normal} and ${bold}${this_hash:0:7}${normal}" -build_config "$last_hash" -build_config "$this_hash" - -echo "Diffing..." -nvd diff "nix-diff-${hostname}-${last_hash:0:7}" "nix-diff-${hostname}-${this_hash:0:7}" - -# Always unlink if diffing with current dirty ref -if [ "$this_hash" = latest ]; then - unlink "nix-diff-${hostname}-${this_hash:0:7}" -fi