Skip to content

Commit

Permalink
Improve Nix "stuff" (#3894)
Browse files Browse the repository at this point in the history
* Update github actions on a daily basis. 
* New github workflow that updates flake inputs weekly. 
* Use upstream [flake-utils](https://github.com/numtide/flake-utils) (no need to use the fork)
* Use [gitignore.nix](https://github.com/hercules-ci/gitignore.nix) to filter out not needed source files. That
* Use [direnv](https://direnv.net/) to automatically enter the nix development environment.
* Use [pre-commit.nix](https://github.com/cachix/pre-commit-hooks.nix/) to force rust and nix formatter.
* Use [rust-overlay](https://github.com/oxalica/rust-overlay) to follow latest stable rust compiler.
* Use [naersk](https://github.com/nix-community/naersk) to load cargo dependencies from Cargo.lock file.
  • Loading branch information
garbas authored Mar 22, 2022
1 parent 09eac92 commit baa81f2
Show file tree
Hide file tree
Showing 6 changed files with 372 additions and 127 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
version: 2
updates:

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: '00:00'
timezone: UTC
open-pull-requests-limit: 10
commit-message:
prefix: "chore"
include: "scope"

- package-ecosystem: cargo
directory: '/'
schedule:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00

jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v16
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v8
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
book
/target
/vendor
.idea/
.vscode/
/result
/.idea/
/.vscode/
/.direnv/
/.pre-commit-config.yaml
115 changes: 103 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit baa81f2

Please sign in to comment.