feat: add nix-cleanup script and nixfied package #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nix Checks | |
on: | |
push: | |
paths: | |
- 'flake.nix' | |
- 'flake.lock' | |
- 'nix-cleanup.sh' | |
- '.github/workflows/nix-checks.yml' | |
jobs: | |
nix_checks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017 #v4 | |
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c #v26 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
extra_nix_config: | | |
sandbox = true # force sandbox for all OS (normally disabled for macOS) | |
- name: use magic nix cache | |
uses: DeterminateSystems/magic-nix-cache-action@b46e247b898aa56e6d2d2e728dc6df6c84fdb738 #v7 | |
- name: Run app | |
run: nix run --print-build-logs --show-trace '.#nix-cleanup' -- --help | |
- name: Run app with --system | |
run: nix run --print-build-logs --show-trace '.#nix-cleanup' -- --system |