treewide: optionalize mkTarget's humanName and name arguments

Optionalize mkTarget's 'humanName' and 'name' arguments by inferring
'humanName' from the 'name' attribute in the /modules/<MODULE>/meta.nix
file, and 'name' from the /modules/<NAME>/ directory name.

Inferring the 'humanName' and 'name' arguments ensures consistency and
reduces boilerplate.

The 'humanName' and 'name' arguments are optionalized instead of removed
because complex modules generating target derivations need to
distinguish between them.

Closes: https://github.com/nix-community/stylix/issues/1661
(cherry picked from commit dfc859f54d)
This commit is contained in:
NAHO 2025-07-19 11:28:36 +02:00 committed by 0xda157
parent 3fb65013f7
commit 707059378b
107 changed files with 52 additions and 324 deletions

View file

@ -1,8 +1,5 @@
{ mkTarget, ... }:
mkTarget {
name = "opencode";
humanName = "OpenCode";
config =
{ colors }:
{