Move docker creation over to devenv
This is not ideal, since devenv is more for creating development environments, but it works
This commit is contained in:
+31
-3
@@ -1,13 +1,41 @@
|
||||
{pkgs, ...}: {
|
||||
packages = with pkgs; [
|
||||
coreutils
|
||||
curl
|
||||
fdroidserver
|
||||
sops
|
||||
git
|
||||
cacert
|
||||
jq
|
||||
];
|
||||
|
||||
scripts = {
|
||||
decrypt.exec = ''
|
||||
sops -d fdroid/encrypted-config.yml > fdroid/config.yml
|
||||
sops -d fdroid/encrypted-keystore.p12 > fdroid/keystore.p12
|
||||
deploy-docker.exec = ''
|
||||
devenv container copy processes
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
httpConfig = builtins.readFile ./hosting/nginx-http.conf;
|
||||
};
|
||||
|
||||
processes.updater.exec = ''
|
||||
while true; do
|
||||
${pkgs.writeShellScript "run-updater" (builtins.readFile ./hosting/update.sh)}
|
||||
|
||||
echo "Sleeping for 30 minutes..."
|
||||
sleep 1800
|
||||
done
|
||||
'';
|
||||
|
||||
# environment variables for sops
|
||||
# SOPS_PGP_FP
|
||||
containers."processes" = {
|
||||
name = "gitlab.julian-mutter.de/julian/fdroid-frajul";
|
||||
registry = "docker://";
|
||||
|
||||
copyToRoot = []; # avoid copying this repo
|
||||
maxLayers = 10;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user