Use absolute Nix paths in homemade scripts #92
Workflow file for this run
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: CI - Home | |
on: | |
push: | |
branches: [main] | |
paths: | |
- '.github/workflows/ci-home.yml' | |
- '**/home-manager/**.nix' | |
- 'Makefile.toml' | |
pull_request: | |
paths: | |
- '.github/workflows/ci-home.yml' | |
- '**/home-manager/**.nix' | |
- 'Makefile.toml' | |
schedule: | |
# Every 10:42 JST | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
- cron: '42 1 * * *' | |
workflow_dispatch: | |
jobs: | |
home-manager: | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-22.04 | |
- macos-13 | |
home-manager-channel-ref: | |
- 729ab77f9e998e0989fa30140ecc91e738bc0cb1 # Pinned for current use | |
- master # unstable nixpkgs | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: DeterminateSystems/nix-installer-action@v4 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Print nixpkgs version | |
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version' | |
- name: Register Nix Channels | |
run: | | |
nix-channel --add https://releases.nixos.org/nixpkgs/nixpkgs-23.11pre509044.3acb5c4264c4/nixexprs.tar.xz nixpkgs | |
nix-channel --add https://github.com/nix-community/home-manager/archive/${{ matrix.home-manager-channel-ref }}.tar.gz home-manager | |
nix-channel --update | |
nix-channel --list | |
- name: Print nixpkgs version after updating channels | |
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version' | |
- run: nix-shell '<home-manager>' -A install | |
- uses: actions/checkout@v3 | |
- run: home-manager switch -b backup -f ./home-manager/user-github-actions.nix | |
- name: Print paths | |
run: | | |
which fish | |
which zsh | |
which bash | |
which ruby | |
which irb | |
# Do not use interactive mode here. | |
# Solutions as https://github.com/actions/runner/issues/241#issuecomment-924327172 will not fit with several problems | |
- name: Run customized dependencies | |
run: | | |
fish --command 'starship --version' | |
zsh -c 'which dprint' | |
zsh -c 'ruby --version' | |
zsh -c 'irb --version' | |
- name: Run homemade commands | |
run: zsh -c 'la' |