nixos: btsync - switch to using systemd user services

Signed-off-by: Austin Seipp <aseipp@pobox.com>

+12 -13
+12 -13
nixos/modules/services/networking/btsync.nix
··· 83 83 type = types.bool; 84 84 default = false; 85 85 description = '' 86 - If enabled, start the Bittorrent Sync daemon. Once enabled, 87 - you can interact with the service through the Web UI, or 88 - configure it in your NixOS configuration. Enabling the 89 - <literal>btsync</literal> service also installs a 90 - multi-instance systemd unit which can be used to start 91 - user-specific copies of the daemon. Once installed, you can 92 - use <literal>systemctl start btsync@user</literal> to start 93 - the daemon only for user <literal>user</literal>, using the 94 - configuration file located at 86 + If enabled, start the Bittorrent Sync daemon. Once enabled, you can 87 + interact with the service through the Web UI, or configure it in your 88 + NixOS configuration. Enabling the <literal>btsync</literal> service 89 + also installs a systemd user unit which can be used to start 90 + user-specific copies of the daemon. Once installed, you can use 91 + <literal>systemctl --user start btsync</literal> as your user to start 92 + the daemon using the configuration file located at 95 93 <literal>$HOME/.config/btsync.conf</literal>. 96 94 ''; 97 95 }; ··· 212 210 default = "/var/lib/btsync/"; 213 211 example = "/var/lib/btsync/"; 214 212 description = '' 215 - Where to store the bittorrent sync files. 213 + Where BitTorrent Sync will store it's database files (containing 214 + things like username info and licenses). Generally, you should not 215 + need to ever change this. 216 216 ''; 217 217 }; 218 218 ··· 311 311 }; 312 312 }; 313 313 314 - systemd.services."btsync@" = with pkgs; { 315 - description = "Bittorrent Sync Service for %i"; 314 + systemd.user.services.btsync = with pkgs; { 315 + description = "Bittorrent Sync user service"; 316 316 after = [ "network.target" "local-fs.target" ]; 317 317 serviceConfig = { 318 318 Restart = "on-abort"; 319 - User = "%i"; 320 319 ExecStart = 321 320 "${bittorrentSync}/bin/btsync --nodaemon --config %h/.config/btsync.conf"; 322 321 };