1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-15 17:50:53 +00:00
home-manager/modules/programs/rtorrent.nix

35 lines
731 B
Nix
Raw Normal View History

2019-05-13 06:00:00 +00:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.rtorrent;
2020-02-01 23:39:17 +00:00
in {
2019-05-13 06:00:00 +00:00
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 ];
2020-02-01 23:39:17 +00:00
xdg.configFile."rtorrent/rtorrent.rc" =
mkIf (cfg.settings != "") { text = cfg.settings; };
2019-05-13 06:00:00 +00:00
};
}