mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +01:00
rtorrent: add module
This commit is contained in:
parent
7205d3b2d2
commit
bdb4cf6c59
2 changed files with 38 additions and 0 deletions
|
@ -84,6 +84,7 @@ let
|
||||||
(loadModule ./programs/opam.nix { })
|
(loadModule ./programs/opam.nix { })
|
||||||
(loadModule ./programs/pidgin.nix { })
|
(loadModule ./programs/pidgin.nix { })
|
||||||
(loadModule ./programs/rofi.nix { })
|
(loadModule ./programs/rofi.nix { })
|
||||||
|
(loadModule ./programs/rtorrent.nix { })
|
||||||
(loadModule ./programs/skim.nix { })
|
(loadModule ./programs/skim.nix { })
|
||||||
(loadModule ./programs/starship.nix { })
|
(loadModule ./programs/starship.nix { })
|
||||||
(loadModule ./programs/ssh.nix { })
|
(loadModule ./programs/ssh.nix { })
|
||||||
|
|
37
modules/programs/rtorrent.nix
Normal file
37
modules/programs/rtorrent.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue