Tweak download script

This commit is contained in:
Greg Hellings
2024-06-21 13:00:22 -05:00
parent 91c56299ec
commit fc1d419506
4 changed files with 16 additions and 22 deletions
+8 -15
View File
@@ -35,30 +35,23 @@
devshells.default = {
# These commands will be shown in the motd that users read
# upon entering the shell
commands = [
];
commands = [ {
package = self'.packages.cache;
category = "utils";
help = "Downloads ISO files and adds them to the S3 bucket";
} ];
};
# This is not special, this is just flakes
packages = let
src = ./.;
in {
packages = {
cache = pkgs.writeShellApplication {
name = "cache-isos";
runtimeInputs = with pkgs; [
curl
minio-client
packer
];
text = let
#getIso = t: pkgs.runCommand "t.txt" {
#nativeInputs = [ pkgs.packer ];
#} "echo var.iso.url | ${pkgs.packer}/bin/packer console -var-file=\"${t}\" -config-type=hcl2 ${src}/sources/";
#isos = lib.attrsets.mapAttrsToList (t: builtins.readFile (getIso t)) templates;
#processIsos = builtins.concatStringsSep "\n" (builtins.map (i: "echo ${i}") isos);
in ''
packer init sources/
rm -f cache/*latest* cache/*Rawhide*
'';
text = builtins.readFile ./cache.sh;
};
};