Merge pull request #5487 from luke-clifton/lc-btsync-group
btsync groups
This commit is contained in:
commit
43af22b2de
@ -273,6 +273,7 @@
|
|||||||
jenkins = 109;
|
jenkins = 109;
|
||||||
systemd-journal-gateway = 110;
|
systemd-journal-gateway = 110;
|
||||||
notbit = 111;
|
notbit = 111;
|
||||||
|
btsync = 113;
|
||||||
monetdb = 115;
|
monetdb = 115;
|
||||||
foundationdb = 118;
|
foundationdb = 118;
|
||||||
newrelic = 119;
|
newrelic = 119;
|
||||||
|
@ -88,7 +88,7 @@ in
|
|||||||
use <literal>systemctl start btsync@user</literal> to start
|
use <literal>systemctl start btsync@user</literal> to start
|
||||||
the daemon only for user <literal>user</literal>, using the
|
the daemon only for user <literal>user</literal>, using the
|
||||||
configuration file located at
|
configuration file located at
|
||||||
<literal>$HOME/.config/btsync.conf</literal>
|
<literal>$HOME/.config/btsync.conf</literal>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -223,6 +223,21 @@ in
|
|||||||
--generate-secret</literal>. Note that this secret will be
|
--generate-secret</literal>. Note that this secret will be
|
||||||
put inside the Nix store, so it is realistically not very
|
put inside the Nix store, so it is realistically not very
|
||||||
secret.
|
secret.
|
||||||
|
|
||||||
|
If you would like to be able to modify the contents of this
|
||||||
|
directories, it is recommended that you make your user a
|
||||||
|
member of the <literal>btsync</literal> group.
|
||||||
|
|
||||||
|
Directories in this list should be in the
|
||||||
|
<literal>btsync</literal> group, and that group must have
|
||||||
|
write access to the directory. It is also recommended that
|
||||||
|
<literal>chmod g+s</literal> is applied to the directory
|
||||||
|
so that any sub directories created will also belong to
|
||||||
|
the <literal>btsync</literal> group. Also,
|
||||||
|
<literal>setfacl -d -m group:btsync:rwx</literal> and
|
||||||
|
<literal>setfacl -m group:btsync:rwx</literal> should also
|
||||||
|
be applied so that the sub directories are writable by
|
||||||
|
the group.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -246,14 +261,20 @@ in
|
|||||||
home = "/var/lib/btsync";
|
home = "/var/lib/btsync";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
uid = config.ids.uids.btsync;
|
uid = config.ids.uids.btsync;
|
||||||
|
group = "btsync";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.extraGroups = [
|
||||||
|
{ name = "btsync";
|
||||||
|
}];
|
||||||
|
|
||||||
systemd.services.btsync = with pkgs; {
|
systemd.services.btsync = with pkgs; {
|
||||||
description = "Bittorrent Sync Service";
|
description = "Bittorrent Sync Service";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "on-abort";
|
Restart = "on-abort";
|
||||||
|
UMask = "0002";
|
||||||
User = "btsync";
|
User = "btsync";
|
||||||
ExecStart =
|
ExecStart =
|
||||||
"${bittorrentSync}/bin/btsync --nodaemon --config ${configFile}";
|
"${bittorrentSync}/bin/btsync --nodaemon --config ${configFile}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user