services/syncthing: use tmpfile rules to create data directories
This commit is contained in:
parent
f957be17d0
commit
cc2adb3aa8
1 changed files with 11 additions and 12 deletions
|
|
@ -1,4 +1,14 @@
|
||||||
{ ... }: {
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
dir = "/persist/shared/.syncthing";
|
||||||
|
uid = toString config.users.users.rin.uid;
|
||||||
|
gid = toString config.users.groups.users.gid;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${dir}/config 700 ${uid} ${gid}"
|
||||||
|
"d ${dir}/data 700 ${uid} ${gid}"
|
||||||
|
];
|
||||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -7,16 +17,5 @@
|
||||||
group = "users";
|
group = "users";
|
||||||
dataDir = "/persist/shared/.syncthing/data";
|
dataDir = "/persist/shared/.syncthing/data";
|
||||||
configDir = "/persist/shared/.syncthing/config";
|
configDir = "/persist/shared/.syncthing/config";
|
||||||
settings = {
|
|
||||||
devices = {
|
|
||||||
#"anemone".id = "";
|
|
||||||
};
|
|
||||||
# folders = {
|
|
||||||
# "Obby" = {
|
|
||||||
# path = "/home/rin/Documents/Obby/Obby";
|
|
||||||
# devices = [];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue