mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-13 04:21:08 +01:00
This commit refactors the mako module to properly handle mako INI-style configuration with sections: 1. Enhanced the `settings` option to support both global settings and nested sections 2. Update custom INI generator that: - Properly formats global settings and sections - Adds appropriate newlines between sections This change allows users to define both global settings and criteria sections in a single `settings` attribute, resulting in cleaner and more intuitive configuration.
37 lines
787 B
Nix
37 lines
787 B
Nix
{
|
|
services.mako = {
|
|
enable = true;
|
|
settings = {
|
|
actions = true;
|
|
anchor = "top-right";
|
|
background-color = "#000000";
|
|
border-color = "#FFFFFF";
|
|
border-radius = 0;
|
|
default-timeout = 0;
|
|
font = "monospace 10";
|
|
height = 100;
|
|
width = 300;
|
|
icons = true;
|
|
ignore-timeout = false;
|
|
layer = "top";
|
|
margin = 10;
|
|
markup = true;
|
|
|
|
"actionable=true" = {
|
|
anchor = "top-left";
|
|
};
|
|
"app-name=Google\\ Chrome" = {
|
|
max-visible = 5;
|
|
};
|
|
"field1=value field2=value" = {
|
|
text-alignment = "left";
|
|
};
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/mako/config
|
|
assertFileContent home-files/.config/mako/config \
|
|
${./config}
|
|
'';
|
|
}
|