From 839278ef88280f53db08d5bbbbfec6df43b586ea Mon Sep 17 00:00:00 2001 From: ahuston-0 Date: Thu, 15 Aug 2024 23:36:45 -0400 Subject: [PATCH] refactor utils, nextcloud image, add fetch-docker script Signed-off-by: ahuston-0 --- .../{nextcloud-image.nix => nextcloud-image/default.nix} | 8 +------- .../docker/{ => nextcloud-image}/supervisord.conf | 0 systems/palatine-hill/docker/nextcloud.nix | 2 +- utils/fetch-docker.sh | 2 -- sops-mergetool.sh => utils/sops-mergetool.sh | 0 5 files changed, 2 insertions(+), 10 deletions(-) rename systems/palatine-hill/docker/{nextcloud-image.nix => nextcloud-image/default.nix} (86%) rename systems/palatine-hill/docker/{ => nextcloud-image}/supervisord.conf (100%) rename sops-mergetool.sh => utils/sops-mergetool.sh (100%) diff --git a/systems/palatine-hill/docker/nextcloud-image.nix b/systems/palatine-hill/docker/nextcloud-image/default.nix similarity index 86% rename from systems/palatine-hill/docker/nextcloud-image.nix rename to systems/palatine-hill/docker/nextcloud-image/default.nix index f48ca72..27c71b6 100644 --- a/systems/palatine-hill/docker/nextcloud-image.nix +++ b/systems/palatine-hill/docker/nextcloud-image/default.nix @@ -1,12 +1,6 @@ { pkgs, ... }: let - nextcloud-apache = pkgs.dockerTools.pullImage { - imageName = "nextcloud"; - imageDigest = "sha256:2ab0c5de2afd33c55721e69e87bd1667cad6c4550ba0fd0303cfeb7abb260750"; - sha256 = "11fh4jaz1asiihf2092sh7ma9xm35hmnkafpbjr3igkv8jicsky1"; - finalImageName = "nextcloud"; - finalImageTag = "apache"; - }; + nextcloud-apache = pkgs.dockerTools.pullImage (import ./nextcloud-apache.nix); in pkgs.dockerTools.buildImage { diff --git a/systems/palatine-hill/docker/supervisord.conf b/systems/palatine-hill/docker/nextcloud-image/supervisord.conf similarity index 100% rename from systems/palatine-hill/docker/supervisord.conf rename to systems/palatine-hill/docker/nextcloud-image/supervisord.conf diff --git a/systems/palatine-hill/docker/nextcloud.nix b/systems/palatine-hill/docker/nextcloud.nix index fc9f8da..2f18a5b 100644 --- a/systems/palatine-hill/docker/nextcloud.nix +++ b/systems/palatine-hill/docker/nextcloud.nix @@ -6,7 +6,7 @@ }: let - nextcloud-image = import ./nextcloud-image.nix { inherit pkgs; }; + nextcloud-image = import ./nextcloud-image { inherit pkgs; }; in { virtualisation.oci-containers.containers = { diff --git a/utils/fetch-docker.sh b/utils/fetch-docker.sh index f9beca9..67264bc 100755 --- a/utils/fetch-docker.sh +++ b/utils/fetch-docker.sh @@ -14,9 +14,7 @@ parent_path=$(dirname "$script_path") # relpath is the relative path to the parent_path where you want the file written # format: ,,,, images=( - # commented out until palatine-hill docker changes are live "nextcloud,apache,amd64,linux,/systems/palatine-hill/docker/nextcloud-image/nextcloud-apache.nix" - ) IFS="," while read -r name tag arch os relpath; do diff --git a/sops-mergetool.sh b/utils/sops-mergetool.sh similarity index 100% rename from sops-mergetool.sh rename to utils/sops-mergetool.sh