2017-01-07 18:16:26 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
2017-09-26 21:40:31 +00:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
2017-01-07 18:16:26 +00:00
|
|
|
options = {
|
2020-02-01 23:39:17 +00:00
|
|
|
services.tahoe-lafs = { enable = mkEnableOption "Tahoe-LAFS"; };
|
2017-01-07 18:16:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.tahoe-lafs.enable {
|
2022-04-24 14:25:54 +00:00
|
|
|
assertions = [
|
|
|
|
(hm.assertions.assertPlatform "services.tahoe-lafs" pkgs platforms.linux)
|
|
|
|
];
|
|
|
|
|
2017-01-07 18:16:26 +00:00
|
|
|
systemd.user.services.tahoe-lafs = {
|
2020-02-01 23:39:17 +00:00
|
|
|
Unit = { Description = "Tahoe-LAFS"; };
|
2017-01-07 18:16:26 +00:00
|
|
|
|
2020-02-01 23:39:17 +00:00
|
|
|
Service = { ExecStart = "${pkgs.tahoelafs}/bin/tahoe run -C %h/.tahoe"; };
|
2017-01-07 18:16:26 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|