diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-02-03 10:05:30 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-02-03 10:05:30 +0100 |
commit | c488527c95c874d3b8743c915173ad7bfb05d5af (patch) | |
tree | 2b874dc5606a9dff44096a5e8557f00dc52ac2b6 /home-manager/modules/programs/matplotlib.nix | |
parent | 899a451e08f7d6d2c8214d119c2a0316849a0ed4 (diff) | |
parent | 6cc4fd6ede4909226cb81d3475834251ed1b7210 (diff) |
Merge commit '6cc4fd6ede4909226cb81d3475834251ed1b7210'
Diffstat (limited to 'home-manager/modules/programs/matplotlib.nix')
-rw-r--r-- | home-manager/modules/programs/matplotlib.nix | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/home-manager/modules/programs/matplotlib.nix b/home-manager/modules/programs/matplotlib.nix index 48ff6e60d68..da80c116770 100644 --- a/home-manager/modules/programs/matplotlib.nix +++ b/home-manager/modules/programs/matplotlib.nix @@ -9,16 +9,13 @@ let formatLine = o: n: v: let formatValue = v: - if isBool v then (if v then "True" else "False") - else toString v; - in - if isAttrs v - then concatStringsSep "\n" (mapAttrsToList (formatLine "${o}${n}.") v) - else (if v == "" then "" else "${o}${n}: ${formatValue v}"); + if isBool v then (if v then "True" else "False") else toString v; + in if isAttrs v then + concatStringsSep "\n" (mapAttrsToList (formatLine "${o}${n}.") v) + else + (if v == "" then "" else "${o}${n}: ${formatValue v}"); -in - -{ +in { meta.maintainers = [ maintainers.rprospero ]; options.programs.matplotlib = { @@ -31,7 +28,7 @@ in Add terms to the <filename>matplotlibrc</filename> file to control the default matplotlib behavior. ''; - example = literalExample '' + example = literalExample '' { backend = "Qt5Agg"; axes = { @@ -55,10 +52,8 @@ in }; config = mkIf cfg.enable { - xdg.configFile."matplotlib/matplotlibrc".text = - concatStringsSep "\n" ([] - ++ mapAttrsToList (formatLine "") cfg.config - ++ optional (cfg.extraConfig != "") cfg.extraConfig - ) + "\n"; + xdg.configFile."matplotlib/matplotlibrc".text = concatStringsSep "\n" ([ ] + ++ mapAttrsToList (formatLine "") cfg.config + ++ optional (cfg.extraConfig != "") cfg.extraConfig) + "\n"; }; } |