Skip to content

feat: additional nix settings #55

feat: additional nix settings

feat: additional nix settings #55

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check
run: |
nix flake check ./dev
build:
strategy:
matrix:
os:
- macos-14
template:
- templates/minimal
- templates/simple-macos
- templates/expose-configuration
runs-on: ${{ matrix.os }}
env:
NIX_CONFIG: extra-access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- name: Build ${{ matrix.template }}
shell: zsh {0}
run: |
cd ${{ matrix.template }}
# Substitute in the build runner's configuration.
nix run nixpkgs#sd 'nix-machine.url = "github:squirmy/nix-machine"' 'nix-machine.url = "github:squirmy/nix-machine/${{ github.sha }}"' flake.nix
nix run nixpkgs#sd 'username = "username"' 'username = "runner"' flake.nix
nix run nixpkgs#sd 'homeDirectory = "/Users/username"' 'homeDirectory = "/Users/runner"' flake.nix
sudo -i mv /etc/nix/nix.conf /etc/nix/nix.conf.before-nix-darwin
sudo -i mv /etc/shells /etc/shells.before-nix-darwin
nix run nix-darwin --extra-experimental-features "nix-command flakes" -- switch --flake .#hostname
source /etc/zshenv
fortune