aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/matplotlib.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/programs/matplotlib.nix')
-rw-r--r--home-manager/modules/programs/matplotlib.nix25
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";
};
}