diff --git a/bins/default.nix b/bins/default.nix index 432b2dd..623fc87 100644 --- a/bins/default.nix +++ b/bins/default.nix @@ -6,15 +6,21 @@ let checkRestart = pkgs.writeScriptBin "check-restart" (import ./check-restart.nix { inherit (pkgs) perl; }); - sfetch = pkgs.writeScriptBin "sfetch" - (import ./sfetch.nix { inherit gosignify; inherit (pkgs) curl; }); + sfetch = pkgs.writeScriptBin "sfetch" (import ./sfetch.nix { + inherit gosignify; + inherit (pkgs) curl; + }); in { environment.systemPackages = with pkgs; [ ix sfetch xclip checkRestart ]; environment.etc = { - "signify/openbsd-72-base.pub".text = builtins.readFile ./pubs/openbsd-72-base.pub; - "signify/openbsd-72-fw.pub".text = builtins.readFile ./pubs/openbsd-72-fw.pub; - "signify/openbsd-72-pkg.pub".text = builtins.readFile ./pubs/openbsd-72-pkg.pub; - "signify/openbsd-72-syspatch.pub".text = builtins.readFile ./pubs/openbsd-72-syspatch.pub; + "signify/openbsd-72-base.pub".text = + builtins.readFile ./pubs/openbsd-72-base.pub; + "signify/openbsd-72-fw.pub".text = + builtins.readFile ./pubs/openbsd-72-fw.pub; + "signify/openbsd-72-pkg.pub".text = + builtins.readFile ./pubs/openbsd-72-pkg.pub; + "signify/openbsd-72-syspatch.pub".text = + builtins.readFile ./pubs/openbsd-72-syspatch.pub; }; } diff --git a/bins/sfetch.nix b/bins/sfetch.nix index 07f5c88..6517c86 100644 --- a/bins/sfetch.nix +++ b/bins/sfetch.nix @@ -1,18 +1,18 @@ { curl, gosignify }: '' - #!/usr/bin/env sh + #!/usr/bin/env sh - set -e + set -e - SERVER=cdn.openbsd.org - ITEM=$1 - MACHINE=amd64 - V=$(echo $ITEM | sed 's/[^0-9]//g') - [[ ! -z $2 ]] && MACHINE=$2 - ${curl}/bin/curl -s -o "$PWD/$ITEM" "https://$SERVER/pub/OpenBSD/snapshots/$MACHINE/$ITEM" && \ - ${curl}/bin/curl -s -o "$PWD/SHA256.sig" "https://$SERVER/pub/OpenBSD/snapshots/$MACHINE/SHA256.sig" + SERVER=cdn.openbsd.org + ITEM=$1 + MACHINE=amd64 + V=$(echo $ITEM | sed 's/[^0-9]//g') + [[ ! -z $2 ]] && MACHINE=$2 + ${curl}/bin/curl -s -o "$PWD/$ITEM" "https://$SERVER/pub/OpenBSD/snapshots/$MACHINE/$ITEM" && \ + ${curl}/bin/curl -s -o "$PWD/SHA256.sig" "https://$SERVER/pub/OpenBSD/snapshots/$MACHINE/SHA256.sig" - ${gosignify}/bin/gosignify -C -p "/etc/signify/openbsd-$V-base.pub" -x SHA256.sig "$ITEM" + ${gosignify}/bin/gosignify -C -p "/etc/signify/openbsd-$V-base.pub" -x SHA256.sig "$ITEM" '' diff --git a/flake.nix b/flake.nix index f6bf11f..1f6970e 100644 --- a/flake.nix +++ b/flake.nix @@ -189,9 +189,7 @@ inherit pkgs; isUnstable = true; }; - gosignify = pkgs.callPackage ./pkgs/gosignify.nix { - inherit pkgs; - }; + gosignify = pkgs.callPackage ./pkgs/gosignify.nix { inherit pkgs; }; zutty = pkgs.callPackage ./pkgs/zutty.nix { inherit pkgs; isUnstable = true;