From b620dbdf8747e888c86e25237fbd736e7f443069 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 15 Nov 2024 01:26:50 +0100 Subject: Factor out base images and postgres images with fixed hashes Signed-off-by: Mel --- services/akkoma/default.nix | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'services/akkoma') diff --git a/services/akkoma/default.nix b/services/akkoma/default.nix index 84c1bff..4cd4022 100644 --- a/services/akkoma/default.nix +++ b/services/akkoma/default.nix @@ -1,7 +1,8 @@ -{ lib, pkgs, unstablePkgs, ... }: +{ lib, pkgs, unstablePkgs, auxiliaryPkgs, ... }: let inherit (pkgs) dockerTools; + inherit (auxiliaryPkgs) common; akkomaLocalPort = "1111"; akkomaDir = "/srv/akkoma"; @@ -13,20 +14,10 @@ let ''; }; - baseImageArm = dockerTools.pullImage { - imageName = "alpine"; - imageDigest = "sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a"; - sha256 = "06c0q5kk60i89y1d83a28wk282ymp806xjcsmlca4cwwqp590j0q"; - finalImageName = "alpine"; - finalImageTag = "3.20.3"; - os = "linux"; - arch = "arm64"; - }; - akkomaImage = dockerTools.buildLayeredImage { name = "akkoma"; tag = akkoma.version; - fromImage = baseImageArm; + fromImage = common.alpine.base; contents = with unstablePkgs; [ exiftool imagemagick ffmpeg_7-headless postgresql elixir @@ -73,8 +64,8 @@ in }; akkoma-db = { - # TODO: pull through `dockerTools`. - image = "postgres:14-alpine"; + inherit (common.postgres14) image imageFile; + volumes = [ "${akkomaDir}/pgdata:/var/lib/postgresql/data" ]; environment = { -- cgit 1.4.1