Move images to separate repo
This commit is contained in:
+3
-59
@@ -3,12 +3,11 @@ stages:
|
|||||||
- build
|
- build
|
||||||
- push
|
- push
|
||||||
|
|
||||||
default:
|
|
||||||
tags:
|
|
||||||
- nix
|
|
||||||
|
|
||||||
"Evaluate for builds":
|
"Evaluate for builds":
|
||||||
stage: eval
|
stage: eval
|
||||||
|
tags:
|
||||||
|
- kubernetes
|
||||||
|
image: "$CI_REGISTRY/greg/ci-image/builder:latest"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- gitlab-ci-continue.yml
|
- gitlab-ci-continue.yml
|
||||||
@@ -22,58 +21,3 @@ default:
|
|||||||
job: "Evaluate for builds"
|
job: "Evaluate for builds"
|
||||||
variables:
|
variables:
|
||||||
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
|
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
|
||||||
|
|
||||||
"Build image":
|
|
||||||
stage: build
|
|
||||||
tags:
|
|
||||||
- kubernetes
|
|
||||||
image: "$CI_REGISTRY_IMAGE/img-builder:latest"
|
|
||||||
parallel: ¶llel
|
|
||||||
matrix:
|
|
||||||
- IMG:
|
|
||||||
- img-bitwarden
|
|
||||||
- img-immich
|
|
||||||
- img-builder
|
|
||||||
script:
|
|
||||||
- nix build ".#${IMG}"
|
|
||||||
- >-
|
|
||||||
podman login
|
|
||||||
-u "$CI_REGISTRY_USER"
|
|
||||||
-p "$CI_REGISTRY_PASSWORD"
|
|
||||||
"$CI_REGISTRY"
|
|
||||||
- cp -r ~/.nix-profile/etc/containers /etc
|
|
||||||
- podman load -i result
|
|
||||||
- podman push "$CI_REGISTRY_IMAGE/${IMG}:latest"
|
|
||||||
# "Build image":
|
|
||||||
# stage: build
|
|
||||||
# tags:
|
|
||||||
# - kubernetes
|
|
||||||
# image: "nixos/nix:latest"
|
|
||||||
# parallel: ¶llel
|
|
||||||
# matrix:
|
|
||||||
# - IMG:
|
|
||||||
# - img-bitwarden
|
|
||||||
# - img-immich
|
|
||||||
# - img-builder
|
|
||||||
# script:
|
|
||||||
# - nix --extra-experimental-features "nix-command flakes" build ".#${IMG}"
|
|
||||||
# - cp -L result "${IMG}.tar.gz"
|
|
||||||
# - >-
|
|
||||||
# nix
|
|
||||||
# --extra-experimental-features "nix-command flakes"
|
|
||||||
# build "nixpkgs#podman"
|
|
||||||
# --out-link podman
|
|
||||||
# - >-
|
|
||||||
# ./podman/bin/podman login
|
|
||||||
# -u "$CI_REGISTRY_USER"
|
|
||||||
# -p "$CI_REGISTRY_PASSWORD"
|
|
||||||
# "$CI_REGISTRY"
|
|
||||||
# - mkdir -p /etc/containers/
|
|
||||||
# - |-
|
|
||||||
# cat << EOF > /etc/containers/policy.json
|
|
||||||
# {
|
|
||||||
# "default": [{"type": "insecureAcceptAnything"}]
|
|
||||||
# }
|
|
||||||
# EOF
|
|
||||||
# - ./podman/bin/podman load -i "${IMG}.tar.gz"
|
|
||||||
# - ./podman/bin/podman push "$CI_REGISTRY/greg/nixos-config/${IMG}:latest"
|
|
||||||
|
|||||||
+1
-4
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, top, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
c = pkgs.callPackage;
|
c = pkgs.callPackage;
|
||||||
@@ -15,9 +15,6 @@ in
|
|||||||
hms = c ./hms { };
|
hms = c ./hms { };
|
||||||
inject-darwin = c ./inject-darwin.nix { };
|
inject-darwin = c ./inject-darwin.nix { };
|
||||||
inject = c ./inject.nix { };
|
inject = c ./inject.nix { };
|
||||||
img-bitwarden = c ./img-bitwarden.nix { };
|
|
||||||
img-builder = c ./img-builder.nix { inherit top; };
|
|
||||||
img-immich = c ./img-immich.nix { };
|
|
||||||
qemu-hook = c ./qemu-hook.nix { };
|
qemu-hook = c ./qemu-hook.nix { };
|
||||||
setup-ssh = c ./setup-ssh { };
|
setup-ssh = c ./setup-ssh { };
|
||||||
upgrade-pg-cluster = c ./upgrade-pg-cluster.nix { };
|
upgrade-pg-cluster = c ./upgrade-pg-cluster.nix { };
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
bitwarden-cli,
|
|
||||||
cacert,
|
|
||||||
dockerTools,
|
|
||||||
lib,
|
|
||||||
wget,
|
|
||||||
writeShellApplication,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
dockerTools.buildLayeredImage {
|
|
||||||
name = "registry.thehellings.com/greg/nixos-config/img-bitwarden";
|
|
||||||
tag = "latest";
|
|
||||||
contents = [
|
|
||||||
dockerTools.binSh
|
|
||||||
dockerTools.caCertificates
|
|
||||||
wget
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
Cmd = [
|
|
||||||
(lib.getExe (writeShellApplication {
|
|
||||||
name = "bitwarden-cli-entrypoint.sh";
|
|
||||||
runtimeInputs = [ bitwarden-cli ];
|
|
||||||
text = ''
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
# Uncomment if you need to hit a custom host
|
|
||||||
#bw config server ''${BW_HOST}
|
|
||||||
|
|
||||||
echo "Using apikey to log in"
|
|
||||||
bw login --apikey --raw
|
|
||||||
BW_SESSION="$(bw unlock --passwordenv BW_PASSWORD --raw)"
|
|
||||||
export BW_SESSION
|
|
||||||
|
|
||||||
echo 'Running "bw serve" on port 8087'
|
|
||||||
bw serve --hostname all --port 8087
|
|
||||||
'';
|
|
||||||
}))
|
|
||||||
];
|
|
||||||
Env = [
|
|
||||||
"CURL_CA_BUNDLE=${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
||||||
];
|
|
||||||
ExposedPorts = {
|
|
||||||
"8087/tcp" = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
{
|
|
||||||
bashInteractive,
|
|
||||||
dockerTools,
|
|
||||||
git,
|
|
||||||
lib,
|
|
||||||
nix,
|
|
||||||
pkgs,
|
|
||||||
podman,
|
|
||||||
top,
|
|
||||||
writeShellApplication,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
policy = (
|
|
||||||
pkgs.writeTextFile {
|
|
||||||
name = "policy.json";
|
|
||||||
text = ''
|
|
||||||
{
|
|
||||||
"default": [{"type": "insecureAcceptAnything"}]
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
destination = "/etc/containers/policy.json";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
activate = writeShellApplication {
|
|
||||||
name = "activate";
|
|
||||||
runtimeInputs = [ bashInteractive ];
|
|
||||||
text = ''
|
|
||||||
mkdir -p /etc/containers
|
|
||||||
cp ${policy}/etc/containers/policy.json /etc/containers/policy.json;
|
|
||||||
bash "$@"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
(import "${nix.src.outPath}/docker.nix" {
|
|
||||||
inherit pkgs;
|
|
||||||
name = "registry.thehellings.com/greg/nixos-config/img-builder";
|
|
||||||
tag = "latest";
|
|
||||||
|
|
||||||
bundleNixpkgs = false;
|
|
||||||
Cmd = [
|
|
||||||
(lib.getExe activate)
|
|
||||||
];
|
|
||||||
extraPkgs = [
|
|
||||||
dockerTools.caCertificates
|
|
||||||
podman
|
|
||||||
policy
|
|
||||||
];
|
|
||||||
flake-registry = (pkgs.formats.json { }).generate "flake-registry.json" ({
|
|
||||||
version = 2;
|
|
||||||
flakes.nixpkgs = {
|
|
||||||
exact = true;
|
|
||||||
from = {
|
|
||||||
id = "nixpkgs";
|
|
||||||
type = "indirect";
|
|
||||||
};
|
|
||||||
to = "${top.nixunstable}";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
gitMinimal = git; # We want the full version in this
|
|
||||||
maxLayers = 111;
|
|
||||||
nixConf = {
|
|
||||||
experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
immich-go,
|
|
||||||
cacert,
|
|
||||||
dockerTools,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
dockerTools.buildLayeredImage {
|
|
||||||
name = "registry.thehellings.com/greg/nixos-config/img-immich";
|
|
||||||
tag = "latest";
|
|
||||||
contents = [
|
|
||||||
dockerTools.binSh
|
|
||||||
dockerTools.caCertificates
|
|
||||||
immich-go
|
|
||||||
];
|
|
||||||
config = {
|
|
||||||
Cmd = [
|
|
||||||
(lib.getExe immich-go)
|
|
||||||
];
|
|
||||||
Env = [
|
|
||||||
"CURL_CA_BUNDLE=${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user