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" checkRestart = pkgs.writeScriptBin "check-restart"
(import ./check-restart.nix { inherit (pkgs) perl; }); (import ./check-restart.nix { inherit (pkgs) perl; });
sfetch = pkgs.writeScriptBin "sfetch" sfetch = pkgs.writeScriptBin "sfetch" (import ./sfetch.nix {
(import ./sfetch.nix { inherit gosignify; inherit (pkgs) curl; }); inherit gosignify;
inherit (pkgs) curl;
});
in { in {
environment.systemPackages = with pkgs; [ ix sfetch xclip checkRestart ]; environment.systemPackages = with pkgs; [ ix sfetch xclip checkRestart ];
environment.etc = { environment.etc = {
"signify/openbsd-72-base.pub".text = builtins.readFile ./pubs/openbsd-72-base.pub; "signify/openbsd-72-base.pub".text =
"signify/openbsd-72-fw.pub".text = builtins.readFile ./pubs/openbsd-72-fw.pub; builtins.readFile ./pubs/openbsd-72-base.pub;
"signify/openbsd-72-pkg.pub".text = builtins.readFile ./pubs/openbsd-72-pkg.pub; "signify/openbsd-72-fw.pub".text =
"signify/openbsd-72-syspatch.pub".text = builtins.readFile ./pubs/openbsd-72-syspatch.pub; 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 }: { curl, gosignify }:
'' ''
#!/usr/bin/env sh #!/usr/bin/env sh
set -e set -e
SERVER=cdn.openbsd.org SERVER=cdn.openbsd.org
ITEM=$1 ITEM=$1
MACHINE=amd64 MACHINE=amd64
V=$(echo $ITEM | sed 's/[^0-9]//g') V=$(echo $ITEM | sed 's/[^0-9]//g')
[[ ! -z $2 ]] && MACHINE=$2 [[ ! -z $2 ]] && MACHINE=$2
${curl}/bin/curl -s -o "$PWD/$ITEM" "https://$SERVER/pub/OpenBSD/snapshots/$MACHINE/$ITEM" && \ ${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" ${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; inherit pkgs;
isUnstable = true; isUnstable = true;
}; };
gosignify = pkgs.callPackage ./pkgs/gosignify.nix { gosignify = pkgs.callPackage ./pkgs/gosignify.nix { inherit pkgs; };
inherit pkgs;
};
zutty = pkgs.callPackage ./pkgs/zutty.nix { zutty = pkgs.callPackage ./pkgs/zutty.nix {
inherit pkgs; inherit pkgs;
isUnstable = true; isUnstable = true;