mirror of
https://github.com/oqyude/nixos.git
synced 2026-08-10 08:33:12 +03:00
refactoring
This commit is contained in:
+18
-14
@@ -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}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user