Skip to content

Update README.md

Update README.md #34

name: Build Starter Template
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
nix-flake-build:
runs-on: ubuntu-latest
name: Build Starter Template
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v13
# Initialize a new Nix flake
- name: Initialize Nix Flake
run: |
mkdir -p my-config && cd my-config
nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter
# Apply CI user info
- name: Apply CI User Info
run: |
cd /home/runner/work/nixos-config/nixos-config/my-config
/home/runner/work/nixos-config/nixos-config/bin/apply-ci
# Build the Nix Flake with debugging
- name: Build Nix Flake
run: |
cd /home/runner/work/nixos-config/nixos-config/my-config
echo "Listing current directory:"
ls -la
git add .
echo "Building Flake..."
nix build --extra-experimental-features 'nix-command flakes' /home/runner/work/nixos-config/nixos-config/my-config#nixosConfigurations."x86_64-linux".config.system.build.toplevel
if [ $? -ne 0 ]; then
echo "Build failed, listing flake.lock for debugging:"
cat flake.lock
exit 1
fi