Skip to content

Commit 3fb4128

Browse files
authored
Merge pull request #1 from DeterminateSystems/flakehub-publish
Publish to FlakeHub
2 parents b84a154 + ff36ef2 commit 3fb4128

File tree

5 files changed

+117
-0
lines changed

5 files changed

+117
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
pull_request:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v?[0-9]+.[0-9]+.[0-9]+*
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
checks:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- uses: DeterminateSystems/determinate-nix-action@main
21+
22+
- uses: DeterminateSystems/flakehub-cache-action@main
23+
24+
- name: Ensure flake is properly structured
25+
run: |
26+
nix flake show
27+
28+
- name: Ensure that all templates evaluate
29+
run: |
30+
for dir in $(ls -d */); do
31+
(
32+
echo "Checking the template in directory ${dir}"
33+
cd $dir
34+
nix flake check --all-systems
35+
echo "Successfully checked the template in ${dir}"
36+
)
37+
done
38+
39+
- name: Check Nix formatting
40+
run: |
41+
git ls-files "*.nix" | \
42+
xargs nix run "https://flakehub.com/f/NixOS/nixpkgs/0.2505.808723#nixfmt-rfc-style" -- --check
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish every Git push to main to FlakeHub
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
flakehub-publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v5
16+
with:
17+
persist-credentials: false
18+
- uses: DeterminateSystems/determinate-nix-action@v3
19+
- uses: DeterminateSystems/flakehub-push@main
20+
with:
21+
name: DeterminateSystems/flake-templates
22+
rolling: true
23+
visibility: public
24+
include-output-paths: true

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Determinate Systems
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Determinate Systems flake templates
2+
3+
This repo houses the default flake templates for [Determinate Nix][det-nix].
4+
5+
[det-nix]: https://docs.determinate.systems/determinate-nix

default/flake.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)