Skip to content

Commit

Permalink
feat: move to rke2
Browse files Browse the repository at this point in the history
  • Loading branch information
loic-roux-404 committed Sep 1, 2024
1 parent 4197b71 commit 1b90e30
Show file tree
Hide file tree
Showing 18 changed files with 300 additions and 186 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release-nixos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
tags:
- nixos-stable
- nixos-testing
paths:
- 'nixos/**.nix'
- 'nixos-options/**.nix'
Expand Down Expand Up @@ -37,14 +38,20 @@ jobs:
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size-linux: 1073741824

- name: Build
id: build
run: nix build .#nixosConfigurations.contabo-qcow
- name: Build production image
id: build-stable
if: github.ref == 'refs/tags/nixos-stable'
run: nix build .#nixosConfigurations.initial-contabo.config.formats.qcow

- name: Build testing image
id: build-testing
if: github.ref == 'refs/tags/nixos-testing'
run: nix build .#nixosConfigurations.initial.config.formats.qcow

- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: nixos-stable
tag_name: ${{ github.ref_name }}
token: "${{ secrets.GITHUB_TOKEN }}"
generate_release_notes: true
files: |
Expand Down
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ SHELL:=/usr/bin/env bash
MAKEFLAGS += --no-builtin-rules --no-builtin-variables
TF_CMD:=apply -auto-approve
VARIANT=builder
SYSTEM?=aarch64-linux

#### Nix

Expand All @@ -12,14 +13,20 @@ ifeq ($(shell uname -s),Darwin)
BUILDER_EXEC:=NIX_CONF_DIR=$(PWD)/bootstrap nix develop .\#builder --command
endif

bootstrap:
bootstrap-aarch64-linux:
@$(BUILDER_EXEC) echo "Started default build environment"

bootstrap-x86:
bootstrap-x86_64-linux:
@VARIANT=builder-x86 $(BUILDER_EXEC) echo "Started x86 environment"
@echo "Waiting builder to"
@sleep 15

nixos-local:
@$(BUILDER_EXEC) nix build .#nixosConfigurations.default --system aarch64-linux
bootstrap: bootstrap-$(SYSTEM)

nixos-local: bootstrap build

build:
@nix build .#nixosConfigurations.default --system $(SYSTEM)

TERRAGRUNT_FILES:=$(shell find terragrunt -type d -name '.*' -prune -o -name 'terragrunt.hcl' -exec dirname {} \;)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Build an image between available nixos configuration `contabo` and `qcow2` :
> Supported systems are `aarch64-linux`, `x86_64-linux`, `aarch64-darwin` and `x86_64-darwin`.
```bash
nix build .#nixosConfigurations.default --system aarch64-linux
nix build .#nixosConfigurations.default --system x86_64-linux
```

### Uninstall on Darwin:
Expand Down
115 changes: 68 additions & 47 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1b90e30

Please sign in to comment.