stylix: add generated all-maintainers file#1654
Conversation
c003b7b to
9e0b8f3
Compare
ecdf2e2 to
f7eb6ef
Compare
|
The stylix committers and maintainers teams were created previously, maintainers has triage permissions. https://github.com/orgs/nix-community/teams/stylix-committers For requesting reviews from members https://github.com/apps/stylix-automation will need new permissions, "Organization permissions" -> "Members" -> "Read-only", I can't do that myself as the app is external to the org but once the new permission is requested the org owners will need to approve it for it to take effect. |
This comment has been minimized.
This comment has been minimized.
a801f19 to
109914d
Compare
6240740 to
a015609
Compare
595f206 to
b3b5e8a
Compare
trueNAHO
left a comment
There was a problem hiding this comment.
LGTM after resolving the nitpicks and renaming /stylix/generated/all-maintainers.nix to /generated/maintainers-index.nix. Make sure to update the code with the renamed file, including derivation names.
2e22bf9 to
90c3785
Compare
trueNAHO
left a comment
There was a problem hiding this comment.
From 84864d76229d4a0dd3b0f0037fea7b8c0afb0b9a Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Thu, 17 Jul 2025 15:41:31 +0200
Subject: [PATCH 1/8] doc/src/modules: wrap text at 80 characters
---
doc/src/modules.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/doc/src/modules.md b/doc/src/modules.md
index 9330720..afb9a17 100644
--- a/doc/src/modules.md
+++ b/doc/src/modules.md
@@ -248,8 +248,9 @@ modules.
> [!NOTE]
> If this is the first time you're adding yourself as a maintainer in stylix,
> the `/generated/all-maintainers.nix` file will need to be updated by running
-> `nix run .#all-maintainers` ([pre-commit](./development_environment.md#pre-commit)
-> will also automatically regenerate it).
+> `nix run .#all-maintainers`
+> ([pre-commit](./development_environment.md#pre-commit) will also automatically
+> regenerate it).
## Documentation
--
2.49.0
From c47a0b2c3a0a097d8313539ea3a0942666910427 Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Thu, 17 Jul 2025 15:41:32 +0200
Subject: [PATCH 2/8] doc: modules: fix 'Stylix' typo
---
doc/src/modules.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/modules.md b/doc/src/modules.md
index afb9a17..a5b2f6b 100644
--- a/doc/src/modules.md
+++ b/doc/src/modules.md
@@ -246,7 +246,7 @@ The main responsibility of module maintainers is to update and fix their
modules.
> [!NOTE]
-> If this is the first time you're adding yourself as a maintainer in stylix,
+> If this is the first time you're adding yourself as a maintainer in Stylix,
> the `/generated/all-maintainers.nix` file will need to be updated by running
> `nix run .#all-maintainers`
> ([pre-commit](./development_environment.md#pre-commit) will also automatically
--
2.49.0
From aa88d618606d9a3c457c3fd03c831d49a13ff475 Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Thu, 17 Jul 2025 15:41:32 +0200
Subject: [PATCH 3/8] ci: update-flake: replace -m with --message
---
.github/workflows/update-flake.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml
index e020d74..7152f2c 100644
--- a/.github/workflows/update-flake.yml
+++ b/.github/workflows/update-flake.yml
@@ -65,7 +65,7 @@ jobs:
nix run .#all-maintainers
git add stylix/generated/all-maintainers.nix
- git commit -m "stylix: update all-maintainers list" ||
+ git commit --message "stylix: update all-maintainers list" ||
echo "all-maintainers has no changes"
- name: create pull request
--
2.49.0
From 093ea2d7766002e930a16605fe3ccb561ed88bbd Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Thu, 17 Jul 2025 15:41:33 +0200
Subject: [PATCH 4/8] treewide: use generated/all-maintainers.nix path in
messages
---
.github/workflows/update-flake.yml | 2 +-
flake/dev/all-maintainers.nix | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml
index 7152f2c..521ebb2 100644
--- a/.github/workflows/update-flake.yml
+++ b/.github/workflows/update-flake.yml
@@ -66,7 +66,7 @@ jobs:
git add stylix/generated/all-maintainers.nix
git commit --message "stylix: update all-maintainers list" ||
- echo "all-maintainers has no changes"
+ echo "generated/all-maintainers.nix has no changes"
- name: create pull request
env:
diff --git a/flake/dev/all-maintainers.nix b/flake/dev/all-maintainers.nix
index 17370d0..aef0d49 100644
--- a/flake/dev/all-maintainers.nix
+++ b/flake/dev/all-maintainers.nix
@@ -14,7 +14,7 @@
"$root/generated/all-maintainers.nix"
'';
};
- meta.description = "update all-maintainers.nix";
+ meta.description = "Update generated/all-maintainers.nix.";
};
packages.all-maintainers =
--
2.49.0
From 9e1cfd7efa30a9fb9679e3dc93181cd9ddd8549c Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Thu, 17 Jul 2025 15:41:33 +0200
Subject: [PATCH 5/8] flake/dev/pre-commit: fix /generated/all-maintainers.nix
path
---
flake/dev/pre-commit.nix | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flake/dev/pre-commit.nix b/flake/dev/pre-commit.nix
index b56797d..97bd56c 100644
--- a/flake/dev/pre-commit.nix
+++ b/flake/dev/pre-commit.nix
@@ -15,7 +15,7 @@
all-maintainers = {
enable = true;
entry = config.apps.all-maintainers.program;
- files = ''flake\.lock|modules\/.*\/meta\.nix|stylix\/generated\/all-maintainers.nix|stylix\/maintainers\.nix'';
+ files = ''flake\.lock|generated\/all-maintainers.nix|modules\/.*\/meta\.nix|stylix\/maintainers\.nix'';
};
deadnix = {
enable = true;
--
2.49.0
From b1d4ba427afa16adc0a99ea177a94c0b81a86091 Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Thu, 17 Jul 2025 15:41:33 +0200
Subject: [PATCH 6/8] flake/dev/pre-commit: make file pattern more restrictive
---
flake/dev/pre-commit.nix | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flake/dev/pre-commit.nix b/flake/dev/pre-commit.nix
index 97bd56c..cd9cce6 100644
--- a/flake/dev/pre-commit.nix
+++ b/flake/dev/pre-commit.nix
@@ -15,7 +15,7 @@
all-maintainers = {
enable = true;
entry = config.apps.all-maintainers.program;
- files = ''flake\.lock|generated\/all-maintainers.nix|modules\/.*\/meta\.nix|stylix\/maintainers\.nix'';
+ files = ''^(flake\.lock|generated\/all-maintainers.nix|modules\/.*\/meta\.nix|stylix\/maintainers\.nix)$'';
};
deadnix = {
enable = true;
--
2.49.0
From 332ca74d1602ca293c33707711e40e6444cd0b7d Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Thu, 17 Jul 2025 15:41:34 +0200
Subject: [PATCH 7/8] flake/dev/all-maintainers: replace result.nix with
all-maintainers.nix
---
flake/dev/all-maintainers.nix | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/flake/dev/all-maintainers.nix b/flake/dev/all-maintainers.nix
index aef0d49..9aecf4b 100644
--- a/flake/dev/all-maintainers.nix
+++ b/flake/dev/all-maintainers.nix
@@ -20,8 +20,8 @@
packages.all-maintainers =
pkgs.runCommand "all-maintainers"
{
- passAsFile = [ "maintainers" ];
- maintainers = ''
+ passAsFile = [ "allMaintainers" ];
+ allMaintainers = ''
# DO NOT EDIT THIS GENERATED FILE.
#
# This file lists Stylix module maintainers for GitHub review
@@ -44,9 +44,9 @@
}
''
touch "$projectRootFile"
- cp "$maintainersPath" result.nix
- treefmt --no-cache result.nix
- install -m 644 -T result.nix "$out"
+ cp "$allMaintainersPath" all-maintainers.nix
+ treefmt --no-cache all-maintainers.nix
+ install -m 644 -T all-maintainers.nix "$out"
'';
};
}
--
2.49.0
From c3cc28dbc925fcdf014dc0bd53899900b2c620a4 Mon Sep 17 00:00:00 2001
From: NAHO <90870942+trueNAHO@users.noreply.github.com>
Date: Thu, 17 Jul 2025 15:41:34 +0200
Subject: [PATCH 8/8] treewide: rename all-maintainers to maintainers-index
Link: https://github.com/nix-community/stylix/pull/1654#discussion_r2210519343
---
.github/workflows/update-flake.yml | 10 +++++-----
doc/src/modules.md | 4 ++--
flake/dev/default.nix | 2 +-
...all-maintainers.nix => maintainers-index.nix} | 16 ++++++++--------
flake/dev/pre-commit.nix | 10 +++++-----
flake/propagated-packages.nix | 4 ++--
...all-maintainers.nix => maintainers-index.nix} | 2 +-
7 files changed, 24 insertions(+), 24 deletions(-)
rename flake/dev/{all-maintainers.nix => maintainers-index.nix} (78%)
rename generated/{all-maintainers.nix => maintainers-index.nix} (99%)
diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml
index 521ebb2..1ee9c01 100644
--- a/.github/workflows/update-flake.yml
+++ b/.github/workflows/update-flake.yml
@@ -60,13 +60,13 @@ jobs:
--flake ./flake/dev \
--option commit-lock-file-summary "flake: update dev inputs"
- # The nixpkgs maintainers may have changed, so keep all-maintainers
+ # The nixpkgs maintainers may have changed, so keep maintainers-index
# in sync
- nix run .#all-maintainers
+ nix run .#maintainers-index
- git add stylix/generated/all-maintainers.nix
- git commit --message "stylix: update all-maintainers list" ||
- echo "generated/all-maintainers.nix has no changes"
+ git add stylix/generated/maintainers-index.nix
+ git commit --message "stylix: update maintainers-index list" ||
+ echo "generated/maintainers-index.nix has no changes"
- name: create pull request
env:
diff --git a/doc/src/modules.md b/doc/src/modules.md
index a5b2f6b..0d67f37 100644
--- a/doc/src/modules.md
+++ b/doc/src/modules.md
@@ -247,8 +247,8 @@ modules.
> [!NOTE]
> If this is the first time you're adding yourself as a maintainer in Stylix,
-> the `/generated/all-maintainers.nix` file will need to be updated by running
-> `nix run .#all-maintainers`
+> the `/generated/maintainers-index.nix` file will need to be updated by running
+> `nix run .#maintainers-index`
> ([pre-commit](./development_environment.md#pre-commit) will also automatically
> regenerate it).
diff --git a/flake/dev/default.nix b/flake/dev/default.nix
index 953bcdd..6c0864a 100644
--- a/flake/dev/default.nix
+++ b/flake/dev/default.nix
@@ -1,7 +1,7 @@
{
imports = [
- ./all-maintainers.nix
./dev-shell.nix
+ ./maintainers-index.nix
./packages.nix
./pre-commit.nix
./treefmt.nix
diff --git a/flake/dev/all-maintainers.nix b/flake/dev/maintainers-index.nix
similarity index 78%
rename from flake/dev/all-maintainers.nix
rename to flake/dev/maintainers-index.nix
index 9aecf4b..1069c5e 100644
--- a/flake/dev/all-maintainers.nix
+++ b/flake/dev/maintainers-index.nix
@@ -3,22 +3,22 @@
perSystem =
{ pkgs, config, ... }:
{
- apps.all-maintainers = {
+ apps.maintainers-index = {
program = pkgs.writeShellApplication {
- name = "update-all-maintainers";
+ name = "update-maintainers-index";
runtimeInputs = [ pkgs.gitMinimal ];
text = ''
root="$(git rev-parse --show-toplevel)"
cp --force \
- ${config.packages.all-maintainers} \
- "$root/generated/all-maintainers.nix"
+ ${config.packages.maintainers-index} \
+ "$root/generated/maintainers-index.nix"
'';
};
- meta.description = "Update generated/all-maintainers.nix.";
+ meta.description = "Update generated/maintainers-index.nix.";
};
- packages.all-maintainers =
- pkgs.runCommand "all-maintainers"
+ packages.maintainers-index =
+ pkgs.runCommand "maintainers-index"
{
passAsFile = [ "allMaintainers" ];
allMaintainers = ''
@@ -29,7 +29,7 @@
#
# To generate this file, run:
#
- # nix run .#all-maintainers
+ # nix run .#maintainers-index
${lib.pipe ../../stylix/meta.nix [
(p: pkgs.callPackage p { })
builtins.attrValues
diff --git a/flake/dev/pre-commit.nix b/flake/dev/pre-commit.nix
index cd9cce6..4e2f1f7 100644
--- a/flake/dev/pre-commit.nix
+++ b/flake/dev/pre-commit.nix
@@ -12,17 +12,17 @@
settings.hooks = {
# keep-sorted start block=yes
- all-maintainers = {
- enable = true;
- entry = config.apps.all-maintainers.program;
- files = ''^(flake\.lock|generated\/all-maintainers.nix|modules\/.*\/meta\.nix|stylix\/maintainers\.nix)$'';
- };
deadnix = {
enable = true;
settings.noUnderscore = true;
};
editorconfig-checker.enable = true;
hlint.enable = true;
+ maintainers-index = {
+ enable = true;
+ entry = config.apps.maintainers-index.program;
+ files = ''^(flake\.lock|generated\/maintainers-index.nix|modules\/.*\/meta\.nix|stylix\/maintainers\.nix)$'';
+ };
statix.enable = true;
treefmt = {
enable = true;
diff --git a/flake/propagated-packages.nix b/flake/propagated-packages.nix
index 215458d..2605b3d 100644
--- a/flake/propagated-packages.nix
+++ b/flake/propagated-packages.nix
@@ -17,13 +17,13 @@
lib.optionalAttrs (partitionStack == [ ]) {
apps = {
inherit (config.partitions.dev.module.flake.apps.${system})
- all-maintainers
+ maintainers-index
;
};
packages = lib.mkMerge [
{
inherit (config.partitions.dev.module.flake.packages.${system})
- all-maintainers
+ maintainers-index
;
}
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux (
diff --git a/generated/all-maintainers.nix b/generated/maintainers-index.nix
similarity index 99%
rename from generated/all-maintainers.nix
rename to generated/maintainers-index.nix
index 040cdff..26ec6bf 100644
--- a/generated/all-maintainers.nix
+++ b/generated/maintainers-index.nix
@@ -5,7 +5,7 @@
#
# To generate this file, run:
#
-# nix run .#all-maintainers
+# nix run .#maintainers-index
{
"0x5a4" = {
email = "bej86nug@hhu.de";
--
2.49.0
trueNAHO
left a comment
There was a problem hiding this comment.
LGTM after resolving the nitpicks. Feel free to merge afterwards.
I think we may have had a miscommunication. what I meant to communicate was I'm against using the name
maintainers-indexand would prefer/stylix/maintainers.nixand/generated/all-maintainers.nix(the current solution).
Yes, since I was not entirely sure I understood, I placed [PATCH 8/8] treewide: rename all-maintainers to maintainers-index as the last patch. I am also fine with /generated/all-maintainers.nix.
It seems you missed the following patches:
From 84864d76229d4a0dd3b0f0037fea7b8c0afb0b9a Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 17 Jul 2025 15:41:31 +0200 Subject: [PATCH 1/8] doc/src/modules: wrap text at 80 characters --- doc/src/modules.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/modules.md b/doc/src/modules.md index 9330720..afb9a17 100644 --- a/doc/src/modules.md +++ b/doc/src/modules.md @@ -248,8 +248,9 @@ modules. > [!NOTE] > If this is the first time you're adding yourself as a maintainer in stylix, > the `/generated/all-maintainers.nix` file will need to be updated by running -> `nix run .#all-maintainers` ([pre-commit](./development_environment.md#pre-commit) -> will also automatically regenerate it). +> `nix run .#all-maintainers` +> ([pre-commit](./development_environment.md#pre-commit) will also automatically +> regenerate it). ## Documentation -- 2.49.0 From c47a0b2c3a0a097d8313539ea3a0942666910427 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 17 Jul 2025 15:41:32 +0200 Subject: [PATCH 2/8] doc: modules: fix 'Stylix' typo --- doc/src/modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/modules.md b/doc/src/modules.md index afb9a17..a5b2f6b 100644 --- a/doc/src/modules.md +++ b/doc/src/modules.md @@ -246,7 +246,7 @@ The main responsibility of module maintainers is to update and fix their modules. > [!NOTE] -> If this is the first time you're adding yourself as a maintainer in stylix, +> If this is the first time you're adding yourself as a maintainer in Stylix, > the `/generated/all-maintainers.nix` file will need to be updated by running > `nix run .#all-maintainers` > ([pre-commit](./development_environment.md#pre-commit) will also automatically -- 2.49.0
In case you are manually applying patches, consider taking a look at:
man git amman git apply
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
can't merge due to your review being stale (and I would prefer not to bypass rules) |
Link: #1654 Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk> Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit f826d32)
|
Successfully created backport PR for |
@danth could you do this |
Link: #1654 Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk> Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit f826d32)
Link: #1654 Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk> Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit f826d32)
Fixes: f826d32 ("stylix: add generated all-maintainers file (nix-community#1654)")
Fixes: f826d32 ("stylix: add generated all-maintainers file (nix-community#1654)") Link: nix-community#1814 Reviewed-by: awwpotato <awwpotato@voidq.com>
required for #1053, similar to what home-manager and nixvim have done except we don't need a python script or anything because of our project's structure.
cc @MattSturgeon @trueNAHO @danth
Things done
Notify maintainers