mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 16:19:44 +01:00
rtorrent: change settings to extraConfig
Per NixOS RFC #42, settings should be reserved to structured settings, whereas extraConfig is used for stringly configuration.
This commit is contained in:
parent
ebd7830814
commit
6745da6dce
1 changed files with 8 additions and 2 deletions
|
@ -9,10 +9,16 @@ let
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.marsam ];
|
meta.maintainers = [ maintainers.marsam ];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
(mkRenamedOptionModule # \
|
||||||
|
[ "programs" "rtorrent" "settings" ] # \
|
||||||
|
[ "programs" "rtorrent" "extraConfig" ])
|
||||||
|
];
|
||||||
|
|
||||||
options.programs.rtorrent = {
|
options.programs.rtorrent = {
|
||||||
enable = mkEnableOption "rTorrent";
|
enable = mkEnableOption "rTorrent";
|
||||||
|
|
||||||
settings = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -29,6 +35,6 @@ in {
|
||||||
home.packages = [ pkgs.rtorrent ];
|
home.packages = [ pkgs.rtorrent ];
|
||||||
|
|
||||||
xdg.configFile."rtorrent/rtorrent.rc" =
|
xdg.configFile."rtorrent/rtorrent.rc" =
|
||||||
mkIf (cfg.settings != "") { text = cfg.settings; };
|
mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue