Commit Graph
30 Commits
Author SHA1 Message Date
Benedikt RipsandAustin Horstman 71402c5df3 treewide: mark unused lambda arguments 2026-04-13 22:02:40 -05:00
Matthias BeyerandGitHub 080e8b48b0 mako: "settings" is an attrset, so use that as example too (#7330)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-06-26 16:36:45 -05:00
Austin Horstman 86402a17b6 treewide: flatten single file modules
Some files don't need nesting and can be root level again to reduce
conflicts with other PRs.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-23 16:20:26 -05:00
Austin Horstmanandawwpotato 4fca600cb1 treewide: implement auto importing for modules
Reduce maintenance burden and increase efficiency by automatically
importing modules following a specific convention.

Co-authored-by: awwpotato <awwpotato@voidq.com>
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-22 23:58:37 -05:00
Austin Horstman 6861cfa165 mako: remove criteria
No longer serves a purpose, was short lived and most people are either
using `settings` or will use `extraConfig`

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-01 21:10:38 -05:00
Austin Horstman 654b686536 mako: add extraConfig back
Need ordered lines for some of mako config. Don't have time to update
generator to support it.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-01 21:10:38 -05:00
Rosario PulellaandGitHub c310818dca mako: Fix missing dbus service file (#7065) 2025-05-15 13:28:43 -05:00
Austin Horstman 0be2c246e3 mako: deprecate criteria option
This commit adds proper deprecation warnings and documentation for the 'criteria' option, guiding users to use the more flexible 'settings' option with nested attributes instead.

- Added warning message when users use the deprecated option

- Updated documentation with examples showing the new approach
2025-05-13 09:41:11 -05:00
Austin Horstman dc5899978f services/mako: refactor settings to support INI sections
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.
2025-05-13 09:41:11 -05:00
Austin Horstman f78a171fe4 mako: use toKebabCase for option transformation
Update mako module to pass lib.hm.strings.toKebabCase to the
mkSettingsRenamedOptionModules
function, which ensures option names are properly converted to
kebab-case format.
2025-05-07 10:02:56 -05:00
Austin Horstman e121442b65 lib/strings: add toSnakeCase
Utility function for converting camelCase strings to snake_case
2025-05-07 10:02:56 -05:00
Aguirre MatteoandGitHub 60964ff845 mako: fix example config (#6987) 2025-05-06 21:06:15 -05:00
Austin HorstmanandGitHub 5f1f472565 mako: use ini atom type (#6977)
Fix backwards compatibility
2025-05-04 21:44:38 -05:00
awwpotatoandGitHub 8167af657c mako: fix criterias typo (#6968) 2025-05-04 09:17:09 -05:00
Aguirre MatteoandGitHub d1bbab6b04 mako: refactor (#6948)
Refactors the services.mako module to replace all its configuration options with a freeform settings option and criterias. I also added a test for the configuration.
2025-05-03 19:09:56 -05:00
Austin HorstmanandGitHub 82ee14ff60 treewide: remove with lib (#6871)
Remove from services.
2025-04-21 11:00:59 -05:00
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00
IliaandGitHub edad23ebc1 mako: add max-history option (#6009) 2025-02-17 12:10:04 -07:00
Drewry PopeandGitHub 1c8d4c8d59 mako: add center-left & center-right 2025-01-03 11:33:28 +01:00
Emily 9f9e277b60 treewide: remove now-redundant lib.mdDoc calls
These (and the `*MD` functions apart from `literalMD`) are now no-ops
in nixpkgs and serve no purpose other than to add additional noise and
potentially mislead people into thinking unmarked DocBook documentation
will still be accepted.

Note that if backporting changes including documentation to 23.05,
the `mdDoc` calls will need to be re-added.

To reproduce this commit, run:

    $ NIX_PATH=nixpkgs=flake:nixpkgs/e7e69199f0372364a6106a1e735f68604f4c5a25 \
      nix shell nixpkgs#coreutils \
      -c find . -name '*.nix' \
      -exec nix run -- github:emilazy/nix-doc-munge/98dadf1f77351c2ba5dcb709a2a171d655f15099 \
      --strip {} +
    $ ./format
2023-07-17 18:49:09 +01:00
Emily 36a53d9f26 treewide: convert all option docs to Markdown
This process was automated by [my fork of `nix-doc-munge`]. All
conversions were automatically checked to produce the same DocBook
result when converted back, modulo minor typographical/formatting
differences on the acceptable-to-desirable spectrum.

To reproduce this commit, run:

  $ NIX_PATH=nixpkgs=flake:nixpkgs/e7e69199f0372364a6106a1e735f68604f4c5a25 \
    nix shell nixpkgs#coreutils \
    -c find . -name '*.nix' \
    -exec nix run -- github:emilazy/nix-doc-munge/98dadf1f77351c2ba5dcb709a2a171d655f15099 \
    {} +
  $ ./format

[my fork of `nix-doc-munge`]: https://github.com/emilazy/nix-doc-munge/tree/home-manager
2023-07-17 18:40:56 +01:00
Rosario PulellaandGitHub db1c22626a mako: programs.mako -> services.mako (#3265) 2023-03-02 11:58:42 +01:00
Mario RodasandGitHub c59f0eac51 treewide: fix typos (#3618) 2023-01-24 11:30:04 +01:00
Mario RodasandRobert Helgesson b5c083300b treewide: fix typos 2022-12-05 12:58:02 +01:00
Sumner EvansandGitHub 273598f53e mako: add package option (#2955) 2022-05-13 08:27:23 -06:00
Naïm FavierandRobert Helgesson bd11e2c5e6 Replace usage of literalExample
Instead use the new function `literalExpression`. See

  https://github.com/NixOS/nixpkgs/pull/136909
2021-10-13 00:16:10 +02:00
Gabriel Fontes 8f1d8c2ef1 mako: add onChange configuration reload 2021-10-01 11:05:42 -03:00
Robert Helgesson 5f433eb164 Move platform check into modules
Before, loading a module would be guarded by an optional platform
condition. This made it possible to avoid loading and evaluating a
module if it did not support the host platform.

Unfortunately, this made it impossible to share a single configuration
between GNU/Linux and Darwin hosts, which some wish to do.

This removes the conditional load and instead inserts host platform
assertions in the modules that are platform specific.

Fixes #1906
2021-07-18 20:43:22 +02:00
Andrew JefferyandRobert Helgesson cb136f37c7 mako: add extraConfig option 2020-12-22 00:19:37 +01:00
Jonas HeinrichandRobert Helgesson f856da6690 mako: add module
PR #1113
2020-04-09 11:21:22 +02:00