Skip to content

Commit

Permalink
rtorrent: change settings to extraConfig
Browse files Browse the repository at this point in the history
Per NixOS RFC nix-community#42, settings should be reserved to structured settings,
whereas extraConfig is used for stringly configuration.
  • Loading branch information
AndersonTorres authored and rycee committed Sep 15, 2022
1 parent ebd7830 commit 6745da6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/programs/rtorrent.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ let
in {
meta.maintainers = [ maintainers.marsam ];

imports = [
(mkRenamedOptionModule # \
[ "programs" "rtorrent" "settings" ] # \
[ "programs" "rtorrent" "extraConfig" ])
];

options.programs.rtorrent = {
enable = mkEnableOption "rTorrent";

settings = mkOption {
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Expand All @@ -29,6 +35,6 @@ in {
home.packages = [ pkgs.rtorrent ];

xdg.configFile."rtorrent/rtorrent.rc" =
mkIf (cfg.settings != "") { text = cfg.settings; };
mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; };
};
}

0 comments on commit 6745da6

Please sign in to comment.