diff --git a/modules/modules.nix b/modules/modules.nix
index f2f54f4e..2dc89ebc 100644
--- a/modules/modules.nix
+++ b/modules/modules.nix
@@ -84,6 +84,7 @@ let
(loadModule ./programs/opam.nix { })
(loadModule ./programs/pidgin.nix { })
(loadModule ./programs/rofi.nix { })
+ (loadModule ./programs/rtorrent.nix { })
(loadModule ./programs/skim.nix { })
(loadModule ./programs/starship.nix { })
(loadModule ./programs/ssh.nix { })
diff --git a/modules/programs/rtorrent.nix b/modules/programs/rtorrent.nix
new file mode 100644
index 00000000..6300969a
--- /dev/null
+++ b/modules/programs/rtorrent.nix
@@ -0,0 +1,37 @@
+{ 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
+ ~/.config/rtorrent/rtorrent.rc. See
+
+ for explanation about possible values.
+ '';
+ };
+
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = [ pkgs.rtorrent ];
+
+ xdg.configFile."rtorrent/rtorrent.rc" = mkIf (cfg.settings != "") {
+ text = cfg.settings;
+ };
+ };
+}