Skip to content

Use released unstable nixpkgs to manage rtx with nix #25

Use released unstable nixpkgs to manage rtx with nix

Use released unstable nixpkgs to manage rtx with nix #25

Workflow file for this run

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
include:
- os: ubuntu-22.04
cleanup-script: |
rm '/home/runner/.config/nix/nix.conf'
rm '/home/runner/.config/home-manager/home.nix'
rm '/home/runner/.bashrc'
rm '/home/runner/.bash_logout'
- os: macos-13
# Latest macOS sets default shell as zsh, but having .bashrc except .bash_logout
cleanup-script: |
rm '/Users/runner/.config/nix/nix.conf'
rm '/Users/runner/.config/home-manager/home.nix'
rm '/Users/runner/.bashrc'
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
- name: Clean up conflict files with applying by home-manager
run: |
${{ matrix.cleanup-script }}
- uses: actions/checkout@v3
- run: home-manager switch -f ./home/.config/home-manager/user-github-actions.nix
- name: Print shell paths
run: |
which fish
which zsh
which bash # Be non nix shell
- name: Run customized dependencies
run: |
fish --interactive --command 'starship --version'
zsh --interactive -c 'bench_shells'