1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

aerc: change stylesets option to reflect the structure aerc expects

Instead of placing all 'stylesets' attribute set values into the 'global'
section this places them in the specified section.
This commit is contained in:
Chris 2025-10-07 17:04:44 +02:00 committed by Austin Horstman
parent 88e62bcab2
commit b27e551270
3 changed files with 18 additions and 9 deletions

View file

@ -104,10 +104,10 @@ in
};
stylesets = mkOption {
type = with types; attrsOf (either confSection lines);
type = with types; attrsOf (sectionsOrLines);
default = { };
example = literalExpression ''
{ default = { ui = { "tab.selected.reverse" = toggle; }; }; };
{ default = { ui = { "tab.selected.reverse" = "toggle"; }; }; };
'';
description = ''
Stylesets added to {file}`$HOME/.config/aerc/stylesets/`.
@ -166,7 +166,7 @@ in
mkStyleset = attrsets.mapAttrs' (
k: v:
let
value = if lib.isString v then v else sectionsToINI { global = v; };
value = if lib.isString v then v else sectionsToINI v;
in
{
name = "${configDir}/stylesets/${k}";

View file

@ -94,8 +94,12 @@
error.fg = red
header.bold = true
title.reverse = true
[ui]
tab.selected.reverse = toggle
'';
default = {
global = {
"*.default" = "true";
"*error.bold" = "true";
"error.fg" = "red";
@ -103,6 +107,8 @@
"*.selected.reverse" = "toggle";
"title.reverse" = "true";
};
ui."tab.selected.reverse" = "toggle";
};
};
templates = rec {

View file

@ -6,3 +6,6 @@
error.fg = red
header.bold = true
title.reverse = true
[ui]
tab.selected.reverse = toggle