diff options
| author | Kumar Damani <me@kumardamani.net> | 2026-07-01 04:09:21 +0000 |
|---|---|---|
| committer | Kumar Damani <me@kumardamani.net> | 2026-07-01 04:12:25 +0000 |
| commit | 02926f70770ceb90cf382da2b54f888ba969f423 (patch) | |
| tree | 0a7cc1fc1c68ae91ae49070bea5cd3708b875819 /nix/per-host/torrents-2/configuration.nix | |
| parent | bc1ad567d2eac46088285ed7d2d688fffc91a82f (diff) | |
nix based config
Diffstat (limited to 'nix/per-host/torrents-2/configuration.nix')
| -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"; + }; + }; +} |
