This commit is contained in:
Lucy Hochkamp 2024-02-24 16:25:59 +01:00
parent 70c5effc5c
commit c0d89b3a05
No known key found for this signature in database
4 changed files with 37 additions and 0 deletions

35
hosts/picard/calcom.nix Normal file
View file

@ -0,0 +1,35 @@
{ config, pkgs, lib, ... }:
{
users.users.calcom = {
group = "calcom";
shell = "${pkgs.bash}/bin/bash";
uid = 592;
};
users.groups.calcom = {
gid = config.users.users.calcom.uid;
};
virtualisation.oci-containers.containers."calcom" = {
image = "calcom/cal.com:latest";
ports = [ "127.0.0.1:8009:8008" ];
user = "${toString config.users.users.calcom.uid}:${toString config.users.groups.calcom.gid}";
volumes = [
"/run/postgresql:/run/postgresql"
];
environmentFiles = [ config.age.secrets.picardCalCom.path ];
environment = {
DATABASE_URL = "postgresql://calcom:calcom@/run/postgresql";
NEXT_PUBLIC_WEBAPP_URL = "https://cal.xyno.systems";
CALCOM_TELEMETRY_DISABLED = 1;
};
};
services.postgresql = {
ensureDatabases = [ "calcom" ];
ensureUsers = [
{
name = "calcom";
ensureDBOwnership = true;
}
];
};
}

View file

@ -11,6 +11,7 @@
./hardware-configuration.nix
./xynospace-matrix.nix
./plausible.nix
./calcom.nix
];
documentation.enable = false;

BIN
secrets/picardCalCom.age Normal file

Binary file not shown.

View file

@ -36,6 +36,7 @@ in
"nextcloudAdminPass.age".publicKeys = pubkeys.ragon.host "picard";
"picardResticSSHKey.age".publicKeys = pubkeys.ragon.host "picard";
"picardSlidingSyncSecret.age".publicKeys = pubkeys.ragon.host "picard";
"picardCalCom.age".publicKeys = pubkeys.ragon.host "picard";
"picardResticPassword.age".publicKeys = pubkeys.ragon.host "picard";
"picardResticHealthCheckUrl.age".publicKeys = pubkeys.ragon.host "picard";
"desec.age".publicKeys = pubkeys.ragon.host "picard";