This commit is contained in:
Aaron Bieber 2022-10-17 11:12:01 -06:00
parent f8647cdcde
commit b9b9289d9f
No known key found for this signature in database
3 changed files with 23 additions and 19 deletions

View File

@ -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;
};
}

View File

@ -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"
''

View File

@ -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;