Compare commits
28 commits
05af1a15f1
...
606edf4794
| Author | SHA1 | Date | |
|---|---|---|---|
| 606edf4794 | |||
| b9498fefd5 | |||
| b158f155aa | |||
| 9407917da8 | |||
| ed33e038a7 | |||
| 6d22222568 | |||
| 3f00007a1f | |||
| 8901f583b4 | |||
| 30cec2b836 | |||
| a2420c650f | |||
| 1473b3dfe9 | |||
| 88d424e8f1 | |||
| d47e9c7817 | |||
| 10d41e635d | |||
| 15c363d07b | |||
| 719383c098 | |||
| b50ee232bb | |||
| 5163585282 | |||
| fb62d9d804 | |||
| 66b069b50d | |||
| c63baacd9c | |||
| 1bfe1d1f00 | |||
| 08c76f13db | |||
| 362bec5bab | |||
| 7a25a807d7 | |||
| eb926f2bd0 | |||
| aafec37783 | |||
| dbd99ddcca |
2 changed files with 51 additions and 6 deletions
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
|
|
@ -21,14 +21,13 @@ jobs:
|
||||||
|| matrix.system == 'aarch64-linux' && 'ubuntu-24.04-arm'
|
|| matrix.system == 'aarch64-linux' && 'ubuntu-24.04-arm'
|
||||||
|| matrix.system == 'x86_64-darwin' && 'macos-latest' }}
|
|| matrix.system == 'x86_64-darwin' && 'macos-latest' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: setup nix
|
- name: setup nix
|
||||||
uses: ./.github/actions/setup-nix
|
uses: ./.github/actions/setup-nix
|
||||||
with:
|
with:
|
||||||
system: ${{ matrix.system }}
|
system: ${{ matrix.system }}
|
||||||
|
|
||||||
- name: Login to tailscale
|
- name: Login to tailscale
|
||||||
uses: tailscale/github-action@v3.2.3
|
uses: tailscale/github-action@v3.2.3
|
||||||
with:
|
with:
|
||||||
|
|
@ -39,15 +38,44 @@ jobs:
|
||||||
|| matrix.system == 'x86_64-darwin' && 'github-actions-x86-64-darwin' }}
|
|| matrix.system == 'x86_64-darwin' && 'github-actions-x86-64-darwin' }}
|
||||||
tags: tag:ci
|
tags: tag:ci
|
||||||
|
|
||||||
|
# - name: Install and start Tailscale
|
||||||
|
# run: |
|
||||||
|
# # Start tailscaled daemon in background using nix shell
|
||||||
|
# nix profile add nixpkgs#tailscale
|
||||||
|
# sudo tailscaled --state=mem: &
|
||||||
|
|
||||||
|
# # Wait for daemon to be ready
|
||||||
|
# sleep 10
|
||||||
|
|
||||||
|
# # Connect using OAuth
|
||||||
|
# HOSTNAME="${{ matrix.system == 'x86_64-linux' && 'github-actions-x86-64-linux'
|
||||||
|
# || matrix.system == 'aarch64-linux' && 'github-actions-aarch64-linux'
|
||||||
|
# || matrix.system == 'x86_64-darwin' && 'github-actions-x86-64-darwin' }}"
|
||||||
|
|
||||||
|
# tailscale up \
|
||||||
|
# --authkey="${{ secrets.TS_OAUTH_SECRET }}?preauthorized=true&ephemeral=true" \
|
||||||
|
# --hostname="$HOSTNAME" \
|
||||||
|
# --advertise-tags="tag:ci" \
|
||||||
|
# --accept-routes
|
||||||
|
|
||||||
|
- name: Tailscale status
|
||||||
|
run: tailscale status || true
|
||||||
|
|
||||||
- name: Check if Attic endpoint is reachable
|
- name: Check if Attic endpoint is reachable
|
||||||
id: check_attic
|
id: check_attic
|
||||||
run: |
|
run: |
|
||||||
if curl --connect-timeout 5 --silent --head http://wallfacer.curl-boga.ts.net:7080 | grep "200 OK"; then
|
if curl --connect-timeout 20 --silent --head http://wallfacer.curl-boga.ts.net:7080 | grep "200 OK"; then
|
||||||
|
echo "Attic endpoint is reachable"
|
||||||
echo "reachable=true" >> $GITHUB_OUTPUT
|
echo "reachable=true" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
|
echo "Attic endpoint is not reachable"
|
||||||
echo "reachable=false" >> $GITHUB_OUTPUT
|
echo "reachable=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Curl the cache
|
||||||
|
run: |
|
||||||
|
curl --connect-timeout 20 --silent http://wallfacer.curl-boga.ts.net:7080/main/nix-cache-info || echo "Cache endpoint not reachable"
|
||||||
|
|
||||||
- name: Setup Attic cache
|
- name: Setup Attic cache
|
||||||
if: steps.check_attic.outputs.reachable == 'true'
|
if: steps.check_attic.outputs.reachable == 'true'
|
||||||
uses: ryanccn/attic-action@v0.3.1
|
uses: ryanccn/attic-action@v0.3.1
|
||||||
|
|
@ -60,24 +88,29 @@ jobs:
|
||||||
run: nix flake check --accept-flake-config
|
run: nix flake check --accept-flake-config
|
||||||
|
|
||||||
|
|
||||||
- name: Pre-build the system configuration
|
- name: Build the Neovim Configuration
|
||||||
run: nix build --accept-flake-config .
|
run: nix build --accept-flake-config . -j3
|
||||||
|
timeout-minutes: 300
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Print out the size of /nix/store
|
- name: Print out the size of /nix/store
|
||||||
run: du -sh /nix/store
|
run: du -sh /nix/store
|
||||||
|
|
||||||
- name: Get the init.lua path
|
- name: Get the init.lua path
|
||||||
|
if: matrix.system == 'x86_64-linux'
|
||||||
run: |
|
run: |
|
||||||
init_path=$(grep "init=" result/bin/nixvim-print-init | awk -F'=' '{print $2}')
|
init_path=$(grep "init=" result/bin/nixvim-print-init | awk -F'=' '{print $2}')
|
||||||
cp $init_path init.lua
|
cp $init_path init.lua
|
||||||
|
|
||||||
- name: Upload the artifact
|
- name: Upload the artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
if: matrix.system == 'x86_64-linux'
|
||||||
with:
|
with:
|
||||||
name: neovim-configuration
|
name: neovim-configuration
|
||||||
path: init.lua
|
path: init.lua
|
||||||
|
|
||||||
- name: Publish the init.lua to an orphan github branch
|
- name: Publish the init.lua to an orphan github branch
|
||||||
|
if: matrix.system == 'x86_64-linux'
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name github-actions
|
git config --global user.name github-actions
|
||||||
git config --global user.email github-actions@github.com
|
git config --global user.email github-actions@github.com
|
||||||
|
|
@ -86,6 +119,7 @@ jobs:
|
||||||
git add init.lua
|
git add init.lua
|
||||||
git commit -m "Publish init.lua"
|
git commit -m "Publish init.lua"
|
||||||
git push --force origin init-lua
|
git push --force origin init-lua
|
||||||
|
git checkout main # switch back to main branch for graceful job ending
|
||||||
|
|
||||||
check-formatting:
|
check-formatting:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
|
||||||
11
flake.nix
11
flake.nix
|
|
@ -1,6 +1,17 @@
|
||||||
{
|
{
|
||||||
description = "My custom neovim configuration that has been mixed and matched from various sources";
|
description = "My custom neovim configuration that has been mixed and matched from various sources";
|
||||||
|
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = [
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"http://wallfacer.curl-boga.ts.net:7080/main"
|
||||||
|
];
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"main:2AjPdIsbKyoTGuw+4x2ZXMUT/353CXosW9pdbTQtjqw="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
# https://gerschtli.github.io/nix-formatter-pack/nix-formatter-pack-options.html
|
# https://gerschtli.github.io/nix-formatter-pack/nix-formatter-pack-options.html
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue