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
83
};
84
84
};
85
85
86
86
+
user = mkOption {
87
87
+
type = types.str;
88
88
+
default = "root";
89
89
+
description = ''
90
90
+
The user to run the daemon as.
91
91
+
By default the daemon runs as root.
92
92
+
'';
93
93
+
};
94
94
+
95
95
+
group = mkOption {
96
96
+
type = types.str;
97
97
+
default = "root";
98
98
+
description = ''
99
99
+
The group to run the daemon as.
100
100
+
By default the daemon runs as root.
101
101
+
'';
102
102
+
};
103
103
+
86
104
};
87
105
};
88
106
···
96
114
description = "Rsync daemon";
97
115
wantedBy = [ "multi-user.target" ];
98
116
restartTriggers = [ config.environment.etc."rsyncd.conf".source ];
99
99
-
serviceConfig.ExecStart = "${pkgs.rsync}/bin/rsync --daemon --no-detach";
117
117
+
serviceConfig = {
118
118
+
ExecStart = "${pkgs.rsync}/bin/rsync --daemon --no-detach";
119
119
+
User = cfg.user;
120
120
+
Group = cfg.group;
121
121
+
};
100
122
};
101
101
-
102
123
};
103
124
}