summaryrefslogtreecommitdiff
path: root/nixos/modules/misc/dm.nix
blob: 4e998822c5e8c5cf4d2b8afc0c9ef83f9bb19701 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ pkgs, ... }: {
  services.aria2 = {
    enable = true;
    rpcSecretFile = "/etc/nixos/secrets/aria2";
    settings = {
      dir = "/home/cat/downloads";
      rpc-allow-origin-all = true;
      rpc-listen-all = false;
      enable-dht = true;
      bt-enable-lpd = true;
      enable-peer-exchange = true;
    };
  };

  systemd.services.aria2.serviceConfig = {
    User = pkgs.lib.mkForce "cat";
    Group = pkgs.lib.mkForce "users";
    ProtectHome = pkgs.lib.mkForce false;
    DynamicUser = pkgs.lib.mkForce false;
  };
}