Skip to content

Update Flake Input

Update Flake Input #16

name: "Update Flake Input"
on:
workflow_dispatch:
inputs:
input_name:
description: 'Flake input to update'
required: true
input_uri:
description: 'URI to update to. (e.g. github:NixOS/nixpkgs/c128e44a249d)'
required: true
jobs:
update-inputs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: "actions/checkout@v4"
- uses: "DeterminateSystems/nix-installer-action@main"
- uses: cachix/cachix-action@v14
with:
name: luke-channings
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Update flake
run: |
export NIXPKGS_ALLOW_UNFREE=1
export NIX_CONFIG="extra-substituters = true"
nix flake update --option accept-flake-config true --override-input ${{ inputs.input_name }} ${{ inputs.input_uri }}
git config --global user.name 'Luke Channings'
git config --global user.email 'lukechannings@users.noreply.github.com'
git commit flake.lock -m "Update flake"
git push
- name: Build packages
run: |
export NIXPKGS_ALLOW_UNFREE=1
nix run --accept-flake-config --impure .#home-manager -- build --impure --flake .#luke
- name: Build dev shell
run: |
export NIXPKGS_ALLOW_UNFREE=1
nix develop --impure --accept-flake-config --accept-flake-config --build