kusakabe: rsyncd

This commit is contained in:
Luke Granger-Brown 2021-01-27 13:48:29 +00:00
parent 25774139d1
commit 413c38e348

View file

@ -117,6 +117,9 @@ in {
# IPFS # IPFS
4001 4001
# rsyncd
873
]; ];
}; };
}; };
@ -310,5 +313,48 @@ in {
dataDir = "/store/ipfs"; dataDir = "/store/ipfs";
}; };
services.rsyncd = {
enable = true;
settings = {
global = {
"use chroot" = false;
"lock file" = "/run/rsync/rsyncd.lock";
"max connections" = 4;
};
winworldpc = {
path = "/store/winworldpc";
comment = "WinWorldPC archive";
"read only" = true;
exclude = "/_data /_data/**";
};
};
};
users.users.rsync = {};
systemd.services.rsyncd = {
confinement.enable = true;
serviceConfig = {
User = "rsync";
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
PrivateUsers = false;
ProtectHostname = true;
ProtectClock = true;
RestrictAddressFamilies = "AF_INET AF_INET6";
RestrictNamespaces = true;
LockPersonality = true;
NoNewPrivileges = true;
MemoryDenyWriteExecute = true;
RuntimeDirectory = "rsync";
BindReadOnlyPaths = [
"/store/winworldpc"
];
BindPaths = [
"/dev/log"
];
};
};
system.stateVersion = "20.03"; system.stateVersion = "20.03";
} }