From 2f19eccf24e6b936542bbab04a435f3127c65962 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 9 Jan 2017 16:01:46 +0100 Subject: m: expose torrent-secrets --- makefu/2configs/torrent.nix | 4 ++-- makefu/3modules/default.nix | 2 ++ makefu/3modules/torrent.nix | 13 +++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 makefu/3modules/torrent.nix (limited to 'makefu') diff --git a/makefu/2configs/torrent.nix b/makefu/2configs/torrent.nix index f3bc9091b..69d40094f 100644 --- a/makefu/2configs/torrent.nix +++ b/makefu/2configs/torrent.nix @@ -8,13 +8,13 @@ let peer-port = 51412; web-port = 8112; daemon-port = 58846; - dl-dir = "/var/download"; + dl-dir = config.makefu.dl-dir; in { # prepare secrets krebs.build.source.torrent-secrets.file = if getEnv "dummy_secrets" == "true" then toString - else "/home/makefu/secrets/torrent"; + else config.makefu.torrent-secrets ; users.users = { download = { diff --git a/makefu/3modules/default.nix b/makefu/3modules/default.nix index 16215b27a..546fed109 100644 --- a/makefu/3modules/default.nix +++ b/makefu/3modules/default.nix @@ -8,9 +8,11 @@ _: ./forward-journal.nix ./opentracker.nix ./ps3netsrv.nix + ./logging-config.nix ./server-config.nix ./snapraid.nix ./taskserver.nix + ./torrent.nix ./udpt.nix ./umts.nix ]; diff --git a/makefu/3modules/torrent.nix b/makefu/3modules/torrent.nix new file mode 100644 index 000000000..9f1cf3398 --- /dev/null +++ b/makefu/3modules/torrent.nix @@ -0,0 +1,13 @@ +{config, lib, pkgs, ... }: + +{ + options.makefu.dl-dir = lib.mkOption { + type = lib.types.str; + description = "Default download directory"; + default = "/media/cryptX/torrent"; + }; + options.makefu.torrent-secrets = lib.mkOption { + type = lib.types.str; + default = "/home/makefu/secrets/torrent"; + }; +} -- cgit v1.2.3