tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
rsync service: allow running as not root
Nadrieril
8 years ago
a4d07290
94fc613c
+23
-2
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
network-filesystems
rsyncd.nix
+23
-2
nixos/modules/services/network-filesystems/rsyncd.nix
···
83
};
84
};
85
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
86
};
87
};
88
···
96
description = "Rsync daemon";
97
wantedBy = [ "multi-user.target" ];
98
restartTriggers = [ config.environment.etc."rsyncd.conf".source ];
99
-
serviceConfig.ExecStart = "${pkgs.rsync}/bin/rsync --daemon --no-detach";
0
0
0
0
100
};
101
-
102
};
103
}
···
83
};
84
};
85
86
+
user = mkOption {
87
+
type = types.str;
88
+
default = "root";
89
+
description = ''
90
+
The user to run the daemon as.
91
+
By default the daemon runs as root.
92
+
'';
93
+
};
94
+
95
+
group = mkOption {
96
+
type = types.str;
97
+
default = "root";
98
+
description = ''
99
+
The group to run the daemon as.
100
+
By default the daemon runs as root.
101
+
'';
102
+
};
103
+
104
};
105
};
106
···
114
description = "Rsync daemon";
115
wantedBy = [ "multi-user.target" ];
116
restartTriggers = [ config.environment.etc."rsyncd.conf".source ];
117
+
serviceConfig = {
118
+
ExecStart = "${pkgs.rsync}/bin/rsync --daemon --no-detach";
119
+
User = cfg.user;
120
+
Group = cfg.group;
121
+
};
122
};
0
123
};
124
}