1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 00:18:30 +02:00

rtorrent: add module

This commit is contained in:
Mario Rodas 2019-05-13 01:00:00 -05:00 committed by Robert Helgesson
parent 7205d3b2d2
commit bdb4cf6c59
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
2 changed files with 38 additions and 0 deletions

View File

@ -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 { })

View File

@ -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
<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;
};
};
}