Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flakes: split sources #805

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/check-flake-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:

- name: Checking out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup
uses: ./.github/actions/common-setup
Expand All @@ -33,11 +35,13 @@ jobs:
had_error=0
for flake_group in flakes/**/*.toml
do
echo "::group::Group \"$(basename $flake_group .toml)\""
for folder in flakes/*/; do
flake_group=$(basename "$folder")
echo "::group::Group \""$flake_group"\""
nix run --accept-flake-config .#flake-info -- --json group "$flake_group" "$(basename "$flake_group" .toml)" --report
flake_toml=flakes/"$flake_group".toml
cat $(git diff --name-only HEAD~1 -- "$folder"/*.toml) > "$flake_toml"
nix run --accept-flake-config .#flake-info -- --json group "$flake_toml" "$flake_group" --report
if [[ -f "./report.txt" ]]
then
Expand All @@ -50,7 +54,7 @@ jobs:
report="${report//$'\n'/'%0A'}"
report="${report//$'\r'/'%0D'}"
echo "::error file=$flake_group::$report"
echo "::error file=$flake_toml::$report"
fi
echo ::endgroup::
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/import-to-elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:

- name: Import ${{ matrix.group }} group
run: |
cat $(find ./flakes/${{ matrix.group }}/ -type f -name '*.toml') > ./flakes/${{ matrix.group }}.toml
nix run --accept-flake-config .#flake-info -- --push --elastic-schema-version=$(< ./VERSION) group ./flakes/${{ matrix.group }}.toml ${{ matrix.group }}
if: github.repository_owner == 'NixOS'

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ application.

## Adding flakes

To add your own flakes to the search index edit [./flakes/manual.toml](./flakes/manual.toml).
To add your own flakes to the search index, add a file under `./flakes/manual`.

Possible types are `github`, `gitlab`, `sourcehut`, and `git` (which is the fallback for any kind of git repository but requires to set a revision key manually as of now).

Expand Down
19 changes: 19 additions & 0 deletions flakes/manual/ngi-nix.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[sources]]
type = "github"
owner = "ngi-nix"
repo = "offen"

[[sources]]
type = "github"
owner = "ngi-nix"
repo = "lightmeter"

[[sources]]
type = "github"
owner = "ngi-nix"
repo = "openpgp-ca"

[[sources]]
type = "github"
owner = "ngi-nix"
repo = "weblate"
9 changes: 9 additions & 0 deletions flakes/manual/nix-community.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[[sources]]
type = "github"
owner = "nix-community"
repo = "fenix"

[[sources]]
type = "github"
owner = "nix-community"
repo = "nix-vscode-extensions"
4 changes: 4 additions & 0 deletions flakes/manual/nixos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[sources]]
type = "github"
owner = "NixOS"
repo = "hydra"
35 changes: 0 additions & 35 deletions flakes/manual.toml → flakes/manual/uncategorized.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
[[sources]]
type = "github"
owner = "NixOS"
repo = "hydra"

[[sources]]
type = "github"
owner = "ngi-nix"
repo = "offen"

[[sources]]
type = "github"
owner = "ngi-nix"
repo = "lightmeter"

[[sources]]
type = "github"
owner = "ngi-nix"
repo = "openpgp-ca"

[[sources]]
type = "github"
owner = "ngi-nix"
repo = "weblate"

[[sources]]
type = "github"
owner = "nix-community"
repo = "fenix"

[[sources]]
type = "github"
owner = "fort-nix"
Expand Down Expand Up @@ -120,11 +90,6 @@ type = "github"
owner = "snowfallorg"
repo = "nixos-conf-editor"

[[sources]]
type = "github"
owner = "nix-community"
repo = "nix-vscode-extensions"

[[sources]]
type = "github"
owner = "hyprwm"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Page/Flakes.elm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ view nixosChannels model =
[ text "Search packages and options of "
, strong []
[ a
[ href "https://github.com/NixOS/nixos-search/blob/main/flakes/manual.toml" ]
[ href "https://github.com/NixOS/nixos-search/tree/main/flakes/manual" ]
[ text "public flakes" ]
]
]
Expand Down
Loading