mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-24 01:41:12 +01:00
treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
This commit is contained in:
parent
5df48c4255
commit
cba2f9ce95
1051 changed files with 37028 additions and 26594 deletions
|
|
@ -4,16 +4,18 @@ let
|
|||
|
||||
cfg = config.programs.matplotlib;
|
||||
|
||||
formatLine = o: n: v:
|
||||
formatLine =
|
||||
o: n: v:
|
||||
let
|
||||
formatValue = v:
|
||||
if lib.isBool v then (if v then "True" else "False") else toString v;
|
||||
in if lib.isAttrs v then
|
||||
formatValue = v: if lib.isBool v then (if v then "True" else "False") else toString v;
|
||||
in
|
||||
if lib.isAttrs v then
|
||||
lib.concatStringsSep "\n" (lib.mapAttrsToList (formatLine "${o}${n}.") v)
|
||||
else
|
||||
(if v == "" then "" else "${o}${n}: ${formatValue v}");
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.rprospero ];
|
||||
|
||||
options.programs.matplotlib = {
|
||||
|
|
@ -50,8 +52,12 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
xdg.configFile."matplotlib/matplotlibrc".text = lib.concatStringsSep "\n"
|
||||
([ ] ++ lib.mapAttrsToList (formatLine "") cfg.config
|
||||
++ lib.optional (cfg.extraConfig != "") cfg.extraConfig) + "\n";
|
||||
xdg.configFile."matplotlib/matplotlibrc".text =
|
||||
lib.concatStringsSep "\n" (
|
||||
[ ]
|
||||
++ lib.mapAttrsToList (formatLine "") cfg.config
|
||||
++ lib.optional (cfg.extraConfig != "") cfg.extraConfig
|
||||
)
|
||||
+ "\n";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue