Move glitchtip to big disk and clean up its temp files

This commit is contained in:
Eli Ribble 2025-09-30 22:57:00 +00:00
parent fd032b72cb
commit a2c37bac70
2 changed files with 16 additions and 0 deletions

View file

@ -13,11 +13,15 @@ with lib;
'';
services.glitchtip = {
enable = true;
environment = [
"TMPDIR=/tmp/glitchtip"
];
environmentFiles = [
"/var/run/secrets/glitchtip-env"
];
port = 10060;
settings.GLITCHTIP_DOMAIN = "https://glitchtip.gleipnir.technology";
workingDirectory = "/mnt/bigdisk/glitchtip";
};
sops.secrets.glitchtip-env = {
format = "dotenv";
@ -27,5 +31,8 @@ with lib;
restartUnits = ["glitchtip.service"];
sopsFile = ../../../secrets/glitchtip.env;
};
systemd.tmpfiles.rules = [
"d /tmp/glitchtip 0755 glitchtip glitchtip 1d"
];
};
}

View file

@ -118,6 +118,14 @@ in
};
};
environment = lib.mkOption {
type = lib.types.listOf lib.types.string;
default = [ ];
example = [ "TMPDIR=/tmp/glitchtip" ];
description = ''
Additional environment variables to set
'';
};
environmentFiles = lib.mkOption {
type = lib.types.listOf lib.types.path;
default = [ ];
@ -194,6 +202,7 @@ in
Group = cfg.group;
RuntimeDirectory = "glitchtip";
StateDirectory = "glitchtip";
Environment = ''${lib.concatStringsSep " " cfg.environment}'';
EnvironmentFile = cfg.environmentFiles;
WorkingDirectory = cfg.workingDirectory;