aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/rtorrent.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/programs/rtorrent.nix')
-rw-r--r--home-manager/modules/programs/rtorrent.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/home-manager/modules/programs/rtorrent.nix b/home-manager/modules/programs/rtorrent.nix
new file mode 100644
index 00000000000..7beeb2e4221
--- /dev/null
+++ b/home-manager/modules/programs/rtorrent.nix
@@ -0,0 +1,34 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.programs.rtorrent;
+
+in {
+ meta.maintainers = [ maintainers.marsam ];
+
+ options.programs.rtorrent = {
+ enable = mkEnableOption "rTorrent";
+
+ settings = mkOption {
+ type = types.lines;
+ default = "";
+ description = ''
+ Configuration written to
+ <filename>~/.config/rtorrent/rtorrent.rc</filename>. See
+ <link xlink:href="https://github.com/rakshasa/rtorrent/wiki/Config-Guide" />
+ for explanation about possible values.
+ '';
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = [ pkgs.rtorrent ];
+
+ xdg.configFile."rtorrent/rtorrent.rc" =
+ mkIf (cfg.settings != "") { text = cfg.settings; };
+ };
+}