1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +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:
AndersonTorres 2022-08-09 01:22:46 -03:00 committed by Robert Helgesson
parent ebd7830814
commit 6745da6dce
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -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 = ''
@ -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; };
};
}