diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000..e5e927a --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,39 @@ +name: Nix qmk env +on: + workflow_dispatch: + push: + branches: + - main + paths: + - "**.nix" + - "flake.lock" + - "firmware/*" + +jobs: + build: + strategy: + fail-fast: false + matrix: + - os: ubunto-latest + target: x86_64-linux + - os: macos-latest + target: x86_64-darwin + runs-on: ${{ matrix.os }} + steps: + - name: Setup | Checkout + uses: actions/checkout@v4 + + - name: Setup | Install nix + uses: cachix/install-nix-actions@23 + with: + extra_nix_config: | + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + + - name: Setup | Install cachix + uses: cachix/cachix-action@12 + with: + name: edeneast + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + + - name: Build | Environment + run: nix build .#devShells.${{ matrix.target }}.default diff --git a/.gitignore b/.gitignore index f9884a6..597f9cc 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ firmware/ external/ result/ +result wiki/ diff --git a/flake.nix b/flake.nix index dae2bc4..cdd2cb3 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,15 @@ }; }; + nixConfig = { + extra-substituters = [ + "https://edeneast-qmk-firmware.cachix.org" + ]; + extra-trusted-public-keys = [ + "edeneast-qmk-firmware.cachix.org-1:lZ1aALkZD5qlipgrCqrJbYUAmwm6ED04fAnG23QqQaQ=" + ]; + }; + outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let