diff options
Diffstat (limited to 'nix/per-host/torrents-2')
| -rw-r--r-- | nix/per-host/torrents-2/configuration.nix | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/nix/per-host/torrents-2/configuration.nix b/nix/per-host/torrents-2/configuration.nix new file mode 100644 index 0000000..6e7cd49 --- /dev/null +++ b/nix/per-host/torrents-2/configuration.nix @@ -0,0 +1,64 @@ +{ config, pkgs, modulesPath, lib, system, ... }: + +{ + config = { + sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + sops.defaultSopsFile = ../../secrets/torrents-2.yaml; + # sops.secrets."foo" = { + # owner = "transmission"; + # }; + + networking.hostName = "torrents-2"; + networking.firewall.allowedTCPPorts = [ 80 443 9091 ]; + + hardware.graphics = { + enable = true; + }; + + hardware.nvidia = { + modesetting.enable = true; + nvidiaPersistenced = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.legacy_580; + }; + + nixpkgs.config.allowUnfree = true; + + services.xserver.videoDrivers = [ "nvidia" ]; + + sops.templates."transmission-rpc-password.json" = { + content = '' + { + "rpc-password": "${config.sops.placeholder.foo}" + } + ''; + owner = "transmission"; + restartUnits = [ "transmission.service" ]; + }; + + services.transmission = { + enable = true; + package = pkgs.transmission_4; + credentialsFile = config.sops.templates."transmission-rpc-password.json".path; + settings = { + rpc-authentication-required = true; + rpc-username = "kdam0"; + # testpass + # rpc-password = "{b55cdbfcac290fff79d3bdb3441082dca8f278aay.bodWGn"; + # rpc-password-file = config.sops.secrets."foo".path; + rpc-bind-address = "0.0.0.0"; + # rpc-host-whitelist = "torrents2.kumardamani.net"; + rpc-whitelist-enabled = true; + rpc-whitelist = "127.0.0.1,10.10.*.*"; + }; + }; + + fileSystems."/mnt/data" = { + device = "nas.bacala:/mnt/tank/customers/kumar/media"; + fsType = "nfs"; + }; + }; +} |
