feat: moved ollama, tailscale, and sync into folders following the new storage pattern
This commit is contained in:
parent
b67be1472a
commit
d283f88160
11 changed files with 215 additions and 117 deletions
36
modules/nixos-modules/sync/sync.nix
Normal file
36
modules/nixos-modules/sync/sync.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
syncthingConfiguration,
|
||||
...
|
||||
}: let
|
||||
mountDir = "/mnt/sync";
|
||||
configDir = "/etc/syncthing";
|
||||
in {
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
systemd = lib.mkIf config.services.syncthing.enable {
|
||||
tmpfiles.rules = [
|
||||
"A ${mountDir} - - - - u:syncthing:rwX,g:syncthing:rwX,o::-"
|
||||
"d ${mountDir} 2755 syncthing syncthing -"
|
||||
"d ${config.services.syncthing.dataDir} 775 syncthing syncthing -"
|
||||
"d ${config.services.syncthing.configDir} 755 syncthing syncthing -"
|
||||
];
|
||||
};
|
||||
}
|
||||
(lib.mkIf config.services.syncthing.enable (lib.mkMerge [
|
||||
{
|
||||
services.syncthing = {
|
||||
user = "syncthing";
|
||||
group = "syncthing";
|
||||
dataDir = "${mountDir}/default";
|
||||
configDir = configDir;
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
configuration = syncthingConfiguration;
|
||||
deviceName = config.networking.hostName;
|
||||
};
|
||||
}
|
||||
]))
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue