All checks were successful
Check meta / check_meta (pull_request) Successful in 16s
Check meta / check_dns (pull_request) Successful in 16s
Check workflows / check_workflows (pull_request) Successful in 17s
Build all the nodes / netcore02 (pull_request) Successful in 21s
Build all the nodes / ap01 (pull_request) Successful in 30s
Build all the nodes / hypervisor02 (pull_request) Successful in 1m55s
Build all the nodes / bridge01 (pull_request) Successful in 1m55s
Build all the nodes / hypervisor01 (pull_request) Successful in 2m8s
Build all the nodes / geo02 (pull_request) Successful in 2m22s
Build all the nodes / tower01 (pull_request) Successful in 2m6s
Build the shell / build-shell (pull_request) Successful in 23s
Build all the nodes / rescue01 (pull_request) Successful in 2m23s
Run pre-commit on all files / pre-commit (pull_request) Successful in 23s
Build all the nodes / hypervisor03 (pull_request) Successful in 2m46s
Build all the nodes / build01 (pull_request) Successful in 2m48s
Build all the nodes / geo01 (pull_request) Successful in 2m48s
Build all the nodes / storage01 (pull_request) Successful in 2m41s
Build all the nodes / vault01 (pull_request) Successful in 2m39s
Build all the nodes / compute01 (pull_request) Successful in 3m18s
Build all the nodes / web01 (pull_request) Successful in 2m56s
Build all the nodes / web02 (pull_request) Successful in 1m43s
Build all the nodes / web03 (pull_request) Successful in 1m54s
Build all the nodes / netcore02 (push) Successful in 23s
Build all the nodes / ap01 (push) Successful in 1m9s
Build all the nodes / hypervisor01 (push) Successful in 1m28s
Build the shell / build-shell (push) Successful in 32s
Build all the nodes / hypervisor03 (push) Successful in 1m44s
Build all the nodes / geo01 (push) Successful in 1m46s
Build all the nodes / web02 (push) Successful in 1m45s
Build all the nodes / build01 (push) Successful in 1m51s
Build all the nodes / bridge01 (push) Successful in 1m53s
Build all the nodes / hypervisor02 (push) Successful in 1m57s
Build all the nodes / geo02 (push) Successful in 2m0s
Run pre-commit on all files / pre-commit (push) Successful in 30s
Build all the nodes / rescue01 (push) Successful in 2m10s
Build all the nodes / tower01 (push) Successful in 2m14s
Build all the nodes / compute01 (push) Successful in 2m19s
Build all the nodes / storage01 (push) Successful in 2m19s
Build all the nodes / web03 (push) Successful in 1m57s
Build all the nodes / vault01 (push) Successful in 2m20s
Build all the nodes / web01 (push) Successful in 2m55s
132 lines
3.3 KiB
Nix
132 lines
3.3 KiB
Nix
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
|
#
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
inherit (lib) listToAttrs nameValuePair;
|
|
in
|
|
|
|
{
|
|
services.django-apps.sites.gestiocof = {
|
|
source = "https://git.dgnum.eu/DGNum/gestioCOF";
|
|
branch = "cof-staging";
|
|
domain = "gestiocof.webapps.dgnum.eu";
|
|
|
|
nginx = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
|
|
locations =
|
|
{
|
|
"/ws/" = {
|
|
proxyPass = "http://unix:/run/django-apps/gestiocof/socket";
|
|
proxyWebsockets = true;
|
|
};
|
|
}
|
|
// (listToAttrs (
|
|
builtins.map (folder: nameValuePair "~ ^/${folder}/" { root = "/users/guests/cof/www/"; }) [
|
|
"arcanoid"
|
|
"cirque"
|
|
"pompom"
|
|
"trouveres"
|
|
]
|
|
));
|
|
|
|
extraConfig = ''
|
|
rewrite ^/$ /news;
|
|
'';
|
|
};
|
|
|
|
webHookSecret = config.age.secrets."webhook-gestiocof_token".path;
|
|
|
|
overlays = {
|
|
kat-pkgs = [
|
|
"django-djconfig"
|
|
"django-hCaptcha"
|
|
"wagtail-modeltranslation"
|
|
"wagtailmenus"
|
|
"django-cogwheels"
|
|
];
|
|
|
|
nix-pkgs = [
|
|
# Required packages
|
|
"authens"
|
|
"django-bootstrap-form"
|
|
"django-cas-ng"
|
|
"loadcredential"
|
|
|
|
# Dependencies
|
|
"python-cas"
|
|
];
|
|
};
|
|
|
|
dependencies = ps: [
|
|
ps.authens
|
|
ps.channels
|
|
ps.channels-redis
|
|
ps.configparser
|
|
ps.django
|
|
ps.django-autocomplete-light
|
|
ps.django-bootstrap-form
|
|
ps.django-cas-ng
|
|
ps.django-cors-headers
|
|
ps.django-djconfig
|
|
ps.django-hCaptcha
|
|
ps.django-js-reverse
|
|
ps.django-widget-tweaks
|
|
ps.icalendar
|
|
ps.loadcredential
|
|
ps.pillow
|
|
ps.python-dateutil
|
|
ps.redis
|
|
ps.statistics
|
|
ps.wagtail
|
|
ps.wagtail-modeltranslation
|
|
ps.wagtailmenus
|
|
];
|
|
|
|
application = {
|
|
module = "gestioasso";
|
|
type = "daphne";
|
|
settingsModule = "gestioasso.settings_cof";
|
|
};
|
|
|
|
credentials = {
|
|
SECRET_KEY = config.age.secrets."dj_gestiocof-secret_key_file".path;
|
|
HCAPTCHA_SECRET = config.age.secrets."dj_gestiocof-hcaptcha_secret_file".path;
|
|
HCAPTCHA_SITEKEY = config.age.secrets."dj_gestiocof-hcaptcha_sitekey_file".path;
|
|
KFETOPEN_TOKEN = config.age.secrets."dj_gestiocof-kfetopen_token_file".path;
|
|
};
|
|
|
|
environment = {
|
|
GESTIOCOF_CHANNEL_LAYERS.default = {
|
|
BACKEND = "shared.channels.ChannelLayer";
|
|
CONFIG.hosts = [ "unix://${config.services.redis.servers.gestiocof.unixSocket}" ];
|
|
};
|
|
GESTIOCOF_CACHES.default = {
|
|
BACKEND = "django.core.cache.backends.redis.RedisCache";
|
|
LOCATION = "unix://${config.services.redis.servers.gestiocof.unixSocket}";
|
|
};
|
|
GESTIOCOF_CORS_ALLOWED_ORIGINS = [
|
|
"https://${config.services.django-apps.sites.gestiocof.domain}"
|
|
];
|
|
};
|
|
|
|
extraServices.worker = {
|
|
script = "python3 manage.py runworker default";
|
|
|
|
serviceConfig = {
|
|
WorkingDirectory = "/var/lib/django-apps/gestiocof/source";
|
|
SupplementaryGroups = [ "redis-gestiocof" ];
|
|
};
|
|
};
|
|
};
|
|
|
|
services.redis.servers.gestiocof = {
|
|
enable = true;
|
|
};
|
|
|
|
systemd.services.dj-gestiocof.serviceConfig.SupplementaryGroups = [ "redis-gestiocof" ];
|
|
}
|