refactoring

This commit is contained in:
2026-08-10 03:36:19 +03:00
parent e66bbef553
commit cc12ab5bba
16 changed files with 144 additions and 183 deletions
+18 -14
View File
@@ -7,31 +7,35 @@
...
}:
let
configDir = "${xlib.dirs.services-mnt-folder}/n8n";
varDir = "/var/lib/n8n";
sourceDir = "${xlib.dirs.services-mnt-folder}/n8n";
targetDir = "/var/lib/n8n";
in
{
services.n8n = {
enable = false;
environment = {
# N8N_USER_FOLDER = lib.mkForce "${configDir}";
# N8N_USER_FOLDER = lib.mkForce "${sourceDir}";
N8N_SECURE_COOKIE = "false";
N8N_PORT = 5678;
};
openFirewall = true;
};
systemd.tmpfiles.rules = [
"d ${configDir} 0755 nobody nogroup -"
"z ${configDir} 0755 nobody nogroup -"
];
fileSystems.${varDir} = {
device = "${configDir}";
fsType = "none";
options = [
"bind"
"nofail"
systemd = {
tmpfiles.rules = [
"d ${sourceDir} 0755 nobody nogroup -"
"z ${sourceDir} 0755 nobody nogroup -"
];
mounts = [
{
enable = true;
options = "bind,x-systemd.automount,nofail";
requires = [ "local-fs.target" ];
type = "none";
wantedBy = [ "multi-user.target" ];
what = "${sourceDir}";
where = "${targetDir}";
}
];
};
}