fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . rtorrent ; 8 9in { 10meta . maintainers = [ ]; 11 12imports = [ 13( mkRenamedOptionModule # \ 14[ "programs" "rtorrent" "settings" ] # \ 15[ "programs" "rtorrent" "extraConfig" ]) 16]; 17 18options . programs . rtorrent = { 19enable = mkEnableOption "rTorrent" ; 20 21extraConfig = mkOption { 22type = types . lines ; 23default = "" ; 24description = '' 25Configuration written to 26{file}`$XDG_CONFIG_HOME/rtorrent/rtorrent.rc`. See 27<https://github.com/rakshasa/rtorrent/wiki/Config-Guide> 28for explanation about possible values. 29'' ; 30}; 31 32}; 33 34config = mkIf cfg . enable { 35home . packages = [ pkgs . rtorrent ]; 36 37xdg . configFile . "rtorrent/rtorrent.rc" = 38mkIf ( cfg . extraConfig != "" ) { text = cfg . extraConfig ; }; 39}; 40}