From 3a52632639bc8abc7172d8fcf8b29df3febd0c4a Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Mon, 7 Oct 2024 09:42:17 -0500 Subject: [PATCH] update coder to 2.16, added error handling for nvd diff when only one configuration is present. --- nixos/home/jahanson/workstation.nix | 6 ++++-- nixos/overlays/coder/default.nix | 22 +++++++++++----------- nixos/profiles/global/system.nix | 8 +++++++- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/nixos/home/jahanson/workstation.nix b/nixos/home/jahanson/workstation.nix index 9e34ce9..efb673a 100644 --- a/nixos/home/jahanson/workstation.nix +++ b/nixos/home/jahanson/workstation.nix @@ -1,4 +1,7 @@ { pkgs, config, inputs, ... }: +let + coderMainline = pkgs.coder.override { channel = "mainline"; }; +in with config; { imports = [ @@ -69,8 +72,7 @@ with config; unstable.act # run GitHub actions locally unstable.nodePackages_latest.prettier # code formatter unstable.tailspin # logfile highlighter - coder - + coderMainline # VSCode in the browser -- has overlay ]; }; } diff --git a/nixos/overlays/coder/default.nix b/nixos/overlays/coder/default.nix index 81312e8..904f39f 100644 --- a/nixos/overlays/coder/default.nix +++ b/nixos/overlays/coder/default.nix @@ -1,5 +1,5 @@ { lib -, channel ? "mainline" +, channel ? "stable" , fetchurl , installShellFiles , makeBinaryWrapper @@ -14,21 +14,21 @@ let channels = { stable = { - version = "2.14.3"; + version = "2.15.1"; hash = { - x86_64-linux = "sha256-CDQmixywYDLj3ABqTEnaUftITSFGA/wGAfe0IFoU64g="; - x86_64-darwin = "sha256-TDpoby2lBw8W6zJrHgF/AQFQL+j9dv3d21VLsiSd1sk="; - aarch64-linux = "sha256-L+2YOMgH1cCl4o1VFZk1dC258/XStgiH9lr9PEQOPSo="; - aarch64-darwin = "sha256-hG3HsJ+DIjwB5ehT+Hd3EZduvjNXYTZLYbAYCRWWiQ8="; + x86_64-linux = "sha256-DB/3iUkgWzAI+3DEQB8heYkG6apUARDulQ4lKDAPN1I="; + x86_64-darwin = "sha256-62tjAC3WtWC8eIkh9dPi2Exksp2gDHyXEU2tCavKZ4Q="; + aarch64-linux = "sha256-957GdH5sDjbjxEt8LXKPBM7vht7T6JizVwYYhbitdpw="; + aarch64-darwin = "sha256-ckcd1u9dgg9LKhr47Yw8dJKkR7hawPie4QNyySH8vyM="; }; }; mainline = { - version = "2.15.0"; + version = "2.16.0"; hash = { - x86_64-linux = "sha256-zM5l3vkLKuDdZHTgVTYfvfYTGLCpDnA2GZDh5PLQ9rs="; - x86_64-darwin = "sha256-AbW92RMaPfusve5DxRaT3npeN2zVzrBOBL3XGN8235I="; - aarch64-linux = "sha256-13FZc1zMmaxfDp0bXBFzf2gcO6wkiA932C5m9oon2GQ="; - aarch64-darwin = "sha256-UP08DncRvM1NjtMOfanDnXGySK1RrCUta5lbIvJ7vto="; + x86_64-linux = "sha256-Uk9oGiLSHBCINAzQg88tlHyMw/OGfdmCw2/NXJs5wbQ="; + x86_64-darwin = "sha256-Bbayv00NDJGUA4M4KyG4XCXIiaQSf4JSgy5VvLSVmAM="; + aarch64-linux = "sha256-nV02uO+UkNNvQDIkh2G+9H8gvk9DOSYyIu4O3nwkYXk="; + aarch64-darwin = "sha256-C9Nm8dW3V25D7J/3ABO5oLGL4wcSCsAXtQNZABwVpWs="; }; }; }; diff --git a/nixos/profiles/global/system.nix b/nixos/profiles/global/system.nix index 671d43e..3bedf7a 100644 --- a/nixos/profiles/global/system.nix +++ b/nixos/profiles/global/system.nix @@ -4,7 +4,13 @@ # Enable printing changes on nix build etc with nvd activationScripts.report-changes = '' PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]} - nvd diff $(${pkgs.coreutils}/bin/ls -dv /nix/var/nix/profiles/system-*-link | tail -2) + profiles=$(${pkgs.coreutils}/bin/ls -dv /nix/var/nix/profiles/system-*-link | tail -2) + profile_count=$(echo "$profiles" | ${pkgs.coreutils}/bin/wc -l) + if [ $profile_count -gt 1 ]; then + nvd diff $profiles + else + echo "Not enough system configurations to compare. Found only $profile_count profile." + fi ''; # Do not change unless you know what you are doing