[NixOS] More syncthing

This commit is contained in:
Ivan Malison 2023-08-03 22:01:56 -06:00
parent 37a415952d
commit 6f88c0ae28
2 changed files with 15 additions and 2 deletions

View File

@ -1,11 +1,18 @@
{ pkgs, ... }:
{
system.activationScripts.syncthingPermissions = {
text = ''
chown -R syncthing:syncthing /var/lib/syncthing
chmod -R 2770 /var/lib/syncthing
mkdir -p /var/lib/syncthing/sync
'';
};
services.syncthing = {
enable = true;
settings = {
folders = {
sync = {
path = "~/";
path = "~/sync";
};
};
devices = {

View File

@ -1,7 +1,7 @@
{ pkgs, inputs, ... }:
{
security.sudo.wheelNeedsPassword = false;
users.extraUsers = let
users.users = let
extraGroups = [
"audio"
"adbusers"
@ -10,6 +10,7 @@
"networkmanager"
"openrazer"
"plugdev"
"syncthing"
"systemd-journal"
"video"
"wheel"
@ -35,6 +36,11 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3tlMePru6ZlSuf8yUii3N1dy3WwJnSQAt3EgETkctK kat@jay-lenovo.local"
];
in {
syncthing = {
extraGroups = [ "syncthing" ];
home = "/var/lib/syncthing";
createHome = true;
};
imalison = userDefaults // {
name = "imalison";
shell = pkgs.zsh;