mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
statix: enable empty_list_concat
Enable statix's empty_list_concat rule and apply its auto-fixes across the affected modules.
This commit is contained in:
@@ -229,8 +229,7 @@ in
|
||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
xdg.configFile."i3status/config".text = lib.concatStringsSep "\n" (
|
||||
[ ]
|
||||
++ lib.optional (cfg.general != { }) (formatModule "general" cfg.general)
|
||||
lib.optional (cfg.general != { }) (formatModule "general" cfg.general)
|
||||
++ map formatOrder (sortAttrNamesByPosition lib.lessThan enabledModules)
|
||||
++ lib.mapAttrsToList formatModule (lib.mapAttrs (n: v: v.settings) enabledModules)
|
||||
);
|
||||
|
||||
@@ -54,8 +54,7 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
xdg.configFile."matplotlib/matplotlibrc".text =
|
||||
lib.concatStringsSep "\n" (
|
||||
[ ]
|
||||
++ lib.mapAttrsToList (formatLine "") cfg.config
|
||||
lib.mapAttrsToList (formatLine "") cfg.config
|
||||
++ lib.optional (cfg.extraConfig != "") cfg.extraConfig
|
||||
)
|
||||
+ "\n";
|
||||
|
||||
@@ -85,8 +85,7 @@ in
|
||||
|
||||
xdg.configFile."zathura/zathurarc".text =
|
||||
lib.concatStringsSep "\n" (
|
||||
[ ]
|
||||
++ lib.optional (cfg.extraConfig != "") cfg.extraConfig
|
||||
lib.optional (cfg.extraConfig != "") cfg.extraConfig
|
||||
++ lib.mapAttrsToList formatLine cfg.options
|
||||
++ lib.mapAttrsToList formatMapLine cfg.mappings
|
||||
)
|
||||
|
||||
@@ -11,8 +11,7 @@ let
|
||||
cfg = config.services.vdirsyncer;
|
||||
|
||||
vdirsyncerOptions =
|
||||
[ ]
|
||||
++ optional (cfg.verbosity != null) "--verbosity ${cfg.verbosity}"
|
||||
optional (cfg.verbosity != null) "--verbosity ${cfg.verbosity}"
|
||||
++ optional (cfg.configFile != null) "--config ${cfg.configFile}";
|
||||
|
||||
in
|
||||
|
||||
@@ -104,8 +104,7 @@ in
|
||||
home.file.${cfg.path} = {
|
||||
text =
|
||||
lib.concatStringsSep "\n" (
|
||||
[ ]
|
||||
++ lib.optional (cfg.extraConfig != "") cfg.extraConfig
|
||||
lib.optional (cfg.extraConfig != "") cfg.extraConfig
|
||||
++ lib.optionals (cfg.properties != null) (lib.mapAttrsToList formatLine cfg.properties)
|
||||
)
|
||||
+ "\n";
|
||||
|
||||
@@ -3,7 +3,6 @@ disabled = [
|
||||
"bool_simplification",
|
||||
"deprecated_is_null",
|
||||
"deprecated_to_path",
|
||||
"empty_list_concat",
|
||||
"empty_inherit",
|
||||
"empty_let_in",
|
||||
"empty_pattern",
|
||||
|
||||
Reference in New Issue
Block a user