Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

feat: multiple systems linux/darwin #46

feat: multiple systems linux/darwin

feat: multiple systems linux/darwin #46

Workflow file for this run

name: Nix Flake
#concurrency:
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
self-care:
name: Flake self-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v5
with:
fail-mode: true
nixos-test:
name: "NixOS Nix Test"
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# when set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: false # this is erroring 2023-06-18
swap-storage: true
- name: "Create Dir for Mounting moar Disk Space ❄"
run: |
sudo mkdir /nix
- name: "Maximize Disk Space"
uses: easimon/maximize-build-space@v8
with:
build-mount-path: /nix
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
temp-reserve-mb: "100"
swap-size-mb: "4096"
root-reserve-mb: "1024"
- uses: actions/checkout@v4
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v23
with:
github_access_token: ${{ secrets.TOKEN }}
nix_path: nixpkgs=channel:nixos-unstable
- name: "Nix Cache"
uses: DeterminateSystems/magic-nix-cache-action@main
- name: "Build NixOS config ❄️"
run: |
nix --experimental-features 'nix-command flakes' build -L '.#nixosConfigurations.laptop.config.system.build.toplevel'
- name: "Print nixpkgs version ❄️"
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
- name: "Check free space"
run: |
sudo apt install neofetch
neofetch
echo "Free space:"
df -h
# FIXME: waiting for github to release Apple Silicon CI runners
# macos-test:
# name: "macOS Nix Test"
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - name: "Install Nix ❄️"
# uses: cachix/install-nix-action@v23
# with:
# github_access_token: ${{ secrets.TOKEN }}
# nix_path: nixpkgs=channel:nixos-unstable
# - name: "Nix Cache"
# uses: DeterminateSystems/magic-nix-cache-action@main
# - name: "Build NixOS config ❄️"
# run: |
# nix --experimental-features 'nix-command flakes' build -L '.#darwinConfigurations.macbook.system'