Skip to content

Commit

Permalink
try simple initial config
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Aug 18, 2023
1 parent b058ca0 commit 3bc9a52
Show file tree
Hide file tree
Showing 196 changed files with 4,023 additions and 8,102 deletions.
9 changes: 0 additions & 9 deletions .github/dependabot.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/build-and-cache.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Build Nix envs

on:
pull_request:
paths:
- '**'
- '!**.md'
push:
paths:
- '**'
- '!**.md'
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight UTC

jobs:

build-macos-env:
name: Build/cache macOS Nix env
runs-on: macos-latest

steps:

- name: Checkout repository
uses: actions/checkout@v3

- name: Install Nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: malo
signingKey: ${{ secrets.CACHIX_SIGNING_KEY }}

- name: If scheduled, update inputs
if: ${{ github.event_name == 'schedule' && success() }}
run: |
nix flake update
- name: Build and switch to nix-darwin env
run: |
# Create /run directory
echo -e "run\tprivate/var/run" | sudo tee -a /etc/synthetic.conf >/dev/null
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t &>/dev/null || true
# Prevent conflict between Cachix installed by workflow and the one installed in the config
nix-env --set-flag priority 1 cachix
# Build and switch to config
nix build .#darwinConfigurations.githubCI.system
./result/sw/bin/darwin-rebuild switch --flake .#githubCI
- name: If scheduled, push commit with updated inputs
if: ${{ github.event_name == 'schedule' && success() }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git aa
git cm "Update inputs"
git push
build-linux-env:
name: Build/cache Linux Nix env
runs-on: ubuntu-latest

steps:

- name: Checkout repository
uses: actions/checkout@v3

- name: Install Nix
uses: cachix/install-nix-action@v22
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Setup Cachix
uses: cachix/cachix-action@v12
with:
name: malo
signingKey: ${{ secrets.CACHIX_SIGNING_KEY }}

- name: Build and switch to home-manager env
run: |
# Prevent conflict between Cachix installed by workflow and the one installed in the config
nix-env --set-flag priority 1 cachix
# Build and switch to home-manager env
nix build .#homeConfigurations.runner.activationPackage; ./result/activate
56 changes: 0 additions & 56 deletions .github/workflows/update-flakes.yml

This file was deleted.

12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pkgs/ruby-gems/vendor
pkgs/ruby-gems/.bundle
pkgs/python-packages/requirements_frozen.txt

private.nix
private.nix

result
result-*
*.qcow2
.direnv/
# Looks like a temporary file, but not sure
doom-emacs/flycheck_config.el
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Thiago Kenji Okada
Copyright (c) 2020 Malo Bourgon

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
103 changes: 0 additions & 103 deletions README.md

This file was deleted.

35 changes: 0 additions & 35 deletions actions/build-and-cache.nix

This file was deleted.

Loading

0 comments on commit 3bc9a52

Please sign in to comment.