37 Commits
Author SHA1 Message Date
Austin Horstman fea021792d treefmt: format Python with ruff
Add ruff to the tree formatter so Python sources are kept consistently
formatted by 'nix fmt' and the CI format check. Test fixtures under
tests/modules are excluded since some are intentionally invalid Python.
Reformats the existing lib/python and tests scripts accordingly.
2026-06-19 10:00:25 -05:00
Ben BaldwinandAustin Horstman ddb7082625 lib: separate eval config file
Move the `homeManagerConfiguration` function into its own file to allow
importing without passing an unused `lib` argument.
2026-06-07 21:04:30 -05:00
Austin Horstman 01ea51d706 treewide: use inherit for attribute assignments
This change converts redundant attribute assignments of the form `a =
a;` or `a = someSet.a;` into cleaner `inherit` statements. This reduces
verbosity and follows common Nix style for bringing attributes into
scope.

Statix Codes: W03 (manual_inherit), W04 (manual_inherit_from)

Also include statix and the rule in our configuration.
2026-04-08 14:47:48 -05:00
Austin Horstman c59483f8dc ci: improve robustness of maintainer extraction 2026-04-07 23:14:48 -05:00
Austin Horstman 41f55c248a ci: limit number of automated reviewer requests 2026-04-07 22:58:13 -05:00
Austin Horstman 2590268ca7 ci: extract maintainers searches for main module
Some modules are broken up into multiple files. Search for primary
import file that will contain the meta information needed, when missing.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-01-25 16:56:02 -06:00
Austin Horstman 950704d781 ci: fix extract-maintainers, pass options to eval
Module eval was silently failing check... include options so that eval
works again with modules that require argument.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-01-25 16:01:03 -06:00
Austin Horstman 94597e670f ci: fix validate-maintainers flake reference
Wasn't actually grabbing from the correct flake.lock revision of
maintainers in nixpkgs. Update to use the revision from the flake.lock
since the nix_path wasn't working.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-01-12 14:08:01 -06:00
Eman ResuandAustin Horstman 44931fdc5d modules: add minimal entrypoint to only enable core modules 2025-11-22 21:50:04 -06:00
Benedikt M. RipsandGitHub f2f1076c1f treewide: remove no-ops (#8061) 2025-10-26 15:43:53 -05:00
Austin Horstman 1ed730a977 ci: manage reviewers doesn't re-add manually removed reviewers
We dont want to try re-adding people that get removed manually.
Otherwise you start fighting CI.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-29 10:21:56 -05:00
Austin Horstman 2c8306e506 ci: manage reviewers add dry run option
Accidentally affected a real PR testing a change, add dry run to prevent
it.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-29 10:21:56 -05:00
Austin HorstmanandGitHub 37fec70bd5 ci: extract maintainers with single file eval (#7548)
Currently, we send all files as a list but it can be problematic with
files that can't be evaluated properly. Instead of crashing the entire
extraction process, we will send a file at a time for eval so we can
just bypass files causing issues.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-26 13:26:14 -05:00
Austin Horstman defabc11ab ci: move validate maintainers logic to lib
Allow easily running the individual checks outside of GHA for easier
testing/modification.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-17 15:15:39 -05:00
Austin Horstman 30533223ee ci: generate-all-maintainers remove unused function
Leftover from refactor that was supposed to be removed.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-15 13:08:23 -05:00
Austin HorstmanandGitHub 1e54837569 ci: extract-maintainers handle non-existent files (#7469)
Since we're checking out the `pull_request_target` and not the
`pull_request` branch. We can't evaluate the files from the PR branch.
We can skip the files for evaluation without crashing the entire
extraction.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-13 23:32:19 -05:00
Austin HorstmanandGitHub f2795aa053 ci: tag-maintainers further refactoring (#7446)
cleaning up more after further testing and work in nixvim version

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-12 18:07:51 -05:00
Austin HorstmanandGitHub 6d8ed2b4fc ci: tag-maintainer workflow refactor (#7436)
Break the workflow into multiple scripts to make it easier to test /
maintain. Also fix the remove reviewer process to not review reviews
from people that were manually requested.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-11 15:20:37 -05:00
Austin HorstmanandGitHub b8b7e5ec35 ci: extract-maintainers-meta tweaks (#7434)
Simplify extraction and generation of file. We dont need the comments
and can leverage the appropriate lib.generator function.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-11 12:47:42 -05:00
Austin Horstman 7d9e3c35f0 all-maintainers: regenerate with latest changes
Should remove maintainers that existed, but weren't assigned to modules.
Will add maintainers that we missed during last refactoring.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-04 09:20:48 -05:00
Austin Horstman 412c545bb6 extract-maintainers-meta: simplify
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-04 09:20:48 -05:00
Austin Horstman f6d1104665 extract-maintainers-meta: include non module system files
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-04 09:20:48 -05:00
Austin Horstman d03fa2d84c ci: generate-all-maintainers use nix eval update
Previously, we had to hack together some string matching to identify and
retrieve the maintainers in the repo. We can just eval the modules to
retrieve the list of maintainers more accurately.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-03 15:23:58 -05:00
Austin Horstman b46c693797 lib: add extract-maintainers-meta
Used to eval home-manager and fetch meta.maintainers to accurately
retrieve maintainers for the master list.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-03 15:23:58 -05:00
Austin Horstman 44a2308db9 scripts/generate-all-maintainers.py: add script
Create a script for generating the master maintainer list we will use
for inviting / pinging on changed files.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-01 16:30:06 -05:00
Graham ChristensenandGitHub 76e9c6e14a lib/default.nix: remove inefficient second copy (#7221)
Using ./. forces Nix to copy the flake to the store a second time.
Using bulitins.path like this, forcing the name to be "source", reduces the extraneous copy.
2025-06-06 09:07:34 -05:00
Austin Horstman 6587238e40 lib: remove 22.11 deprecations
Several years since deprecation and removal.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-05-31 00:01:48 -05:00
awwpotatoandGitHub 5da6eafceb treewide: remove unused code (#6985) 2025-05-07 10:03:21 -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
JanikandGitHub 78576b817f home-manager: add lib support for non-flake users (#5429) 2025-02-04 22:29:41 +01:00
VandRobert Helgesson b3a9fb9d05 treewide: stop run from discarding error messages
In most cases where this function is used, suppressing only the standard
output is more appropriate. Culling diagnostic output hides error
messages and makes debugging more difficult and confusing.

`$DRY_RUN_NULL`, which the `--silence` flag replaced, was used both for
suppressing standard output on its own, and for doing so along with
diagnostic output; however, when the `run` function was added this
distinction was lost, and both outputs would be discarded.

This reintroduces the needed functionality, and changes usages of
`--silence` to `--quiet` where previously only standard output was
suppressed, or where this should have probably been the case anyway.

Change-Id: Ifb1b52a1d1eea0117261c782d686ad7c71b43162
2024-03-08 23:54:42 +01:00
Robert Helgesson 4d54c29bce home-manager: remove the export of run
Fixes #4950
2024-01-28 10:53:09 +01:00
Robert Helgesson e84811035d treewide: deprecate VERBOSE_ECHO
The shell function `verboseEcho` can be used in its stead.
2024-01-24 13:36:05 +01:00
Robert Helgesson 4256729006 treewide: deprecate DRY_RUN_CMD and DRY_RUN_NULL
As a replacement, this adds the `run` helper function.
2024-01-24 13:36:05 +01:00
Robert Helgesson 8cbc6500df lib/bash: make call to tput more robust
Specifically, if `tput colors` fails with an error we treat that as if
the terminal does not support colors.

Fixes #423

Suggested-by: PhotonQuantum <self@lightquantum.me>
2022-10-13 11:56:47 +02:00
Robert Helgesson 8eaa3ba56e lib/bash: remove unused Bash library files
The color echo functions are provided by `lib/bash/home-manager.sh`.
2022-10-13 11:56:46 +02:00
Robert Helgesson 9bcad20013 home-manager: add basic i18n support
The support for translated strings is, for now, limited to strings
generated in Bash code.
2021-12-13 21:47:28 +01:00