Skip to content

Commit

Permalink
Merge pull request #16 from tsandrini/v1
Browse files Browse the repository at this point in the history
practical-flakes-template -> flake-parts-builder
  • Loading branch information
tsandrini authored Jul 28, 2024
2 parents f1b89de + ec8dacf commit 57e3d64
Show file tree
Hide file tree
Showing 252 changed files with 4,311 additions and 5,199 deletions.
7 changes: 0 additions & 7 deletions .cz.toml

This file was deleted.

4 changes: 2 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fi
watch_file flake.nix
watch_file flake.lock

if ! use flake .#dev --accept-flake-config --override-input devenv-root "file+file://"<(printf %s "$PWD")
if ! use flake .#dev --accept-flake-config
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
echo "devshell could not be built. Make sure dev.nix is a valid devshell and try again." >&2
fi
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

## Describe the bug
A clear and concise description of what the bug is.

## Steps To Reproduce
Steps to reproduce the behavior:
1. ...
2. ...
3. ...

## Expected behavior
A clear and concise description of what you expected to happen.

## Screenshots
If applicable, add screenshots to help explain your problem.

## Additional context
Add any other context about the problem here.

## Notify maintainers

<!--
Please @ people who are in the `meta.maintainers` list of the offending package or module.
If in doubt, check `git blame` for whoever last touched something.
-->

## Metadata
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.

```console
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here
```

---

Add a :+1: [reaction] to [issues you find important].
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature-request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

---

Add a :+1: [reaction] to [issues you find important].
22 changes: 9 additions & 13 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# TODO: Place a short descriptive PR name here

## Overview

<!-- Provide a brief overview of what this PR aims to accomplish. For instance,
Expand All @@ -14,10 +12,10 @@ package, test that `nix build` produces the expected binaries/libraries and that
they work as well. Or when adding new NixOS/home-manager modules that you were
able to include them in a NixOS/home-configuration build and that they work.-->

## Dependencies (flake inputs)
## Dependencies

<!-- List any new dependencies introduced by this PR, or if any existing
dependencies are updated or removed. -- >
dependencies are updated or removed. -->

## Screenshots
<!-- Provide screenshots demonstrating the changes, especially for UI-related
Expand All @@ -27,15 +25,13 @@ updates (if applicable). -->

<!-- Ensure you've gone through this checklist before submitting your PR. -->

- \[ \] I have tested the relevant changes locally.
- \[ \] I have checked that
`nix flake check --override-input devenv-root "file+file://"<(printf %s "$PWD")`
passes.
- \[ \] I have ensured my commits follow the project's conventional commits guidelines.
- \[ \] I have checked that the changes follow a linear history.
- \[ \] (If applicable) I have commented any relevant parts of my code.
- \[ \] (If applicable) I have added appropriate unit/feature tests.
- \[ \] (If applicable) I have updated the documentation accordingly (in English).
- [ ] I have tested the relevant changes locally.
- [ ] I have checked that `nix flake check` passes.
- [ ] I have ensured my commits follow the project's commits guidelines.
- [ ] I have checked that the changes follow a linear history.
- [ ] (If applicable) I have commented any relevant parts of my code.
- [ ] (If applicable) I have added appropriate unit/feature tests.
- [ ] (If applicable) I have updated the documentation accordingly (in English).

## Additional Notes

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/cachix-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Push packages and devshells to the cachix binary cache service"

on:
push:
branches:
- main

jobs:
flake-check:
if: false
runs-on: "ubuntu-latest"
steps:
- name: "Checking out repository..."
uses: actions/checkout@v4

- name: "Installing and configuring the nix package manager..."
uses: DeterminateSystems/nix-installer-action@main

- name: "Setting up magic-nix-cache..."
uses: DeterminateSystems/magic-nix-cache-action@main

- name: "Settings up cachix binary cache..."
uses: cachix/cachix-action@main
with:
name: tsandrini
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: "Building project packages..."
run: nix build

- name: "Building project devshells..."
run: nix develop --command echo OK

15 changes: 0 additions & 15 deletions .github/workflows/check-on-merge.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/flake-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Run `nix flake-check`"

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
repository_dispatch:
types: [create-pull-request]

jobs:
flake-check:
if: false
runs-on: "ubuntu-latest"
steps:
- name: "Checking out repository..."
uses: actions/checkout@v4

- name: "Installing and configuring the nix package manager..."
uses: DeterminateSystems/nix-installer-action@main

- name: "Setting up magic-nix-cache..."
uses: DeterminateSystems/magic-nix-cache-action@main

- name: "Running `nix flake check`..."
run: nix flake check --show-trace --accept-flake-config

- name: "Checking flake inputs for stale & insecure nixpkgs versions..."
uses: DeterminateSystems/flake-checker-action@main
29 changes: 29 additions & 0 deletions .github/workflows/flakehub-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Publish flake to FlakeHub"

on:
push:
branches:
- main

jobs:
flakehub-publish:
runs-on: "ubuntu-latest"
permissions:
id-token: "write"
contents: "read"
steps:
- name: "Checking out repository..."
uses: actions/checkout@v4

- name: "Installing and configuring the nix package manager..."
uses: DeterminateSystems/nix-installer-action@main

- name: "Setting up magic-nix-cache..."
uses: DeterminateSystems/magic-nix-cache-action@main

- name: "Publishing flake to FlakeHub..."
uses: DeterminateSystems/flakehub-push@main
with:
name: "tsandrini/flake-parts-builder"
rolling: true
visibility: "public"
19 changes: 0 additions & 19 deletions .github/workflows/flakehub.yml

This file was deleted.

28 changes: 18 additions & 10 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
name: update-flake-lock
name: "Periodically update flake inputs in flake.lock"

on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: "0 0 * * 0" # runs weekly on Sunday at 00:00

jobs:
lockfile:
# if: false # NOTE: Uncomment this line to disable the workflow
update-flake-lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: "Checking out repository..."
uses: actions/checkout@v4

- name: "Installing and configuring the nix package manager..."
uses: DeterminateSystems/nix-installer-action@main

- name: "Setting up magic-nix-cache..."
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Update flake.lock
- name: "Updating flake.lock..."
uses: DeterminateSystems/update-flake-lock@main
with:
pr-assignees: tsandrini
pr-title: "Automated action - Update flake.lock" # Title of PR to be created
pr-labels: | # Labels to be set on the PR
pr-title: "Automated action - Update flake.lock"
pr-labels: |
dependencies
automated
# NOTE You can use a personal access token to identify
# as a concrete user, this may be useful when you want to
# trigger additional CI actions.
#
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
Loading

0 comments on commit 57e3d64

Please sign in to comment.