Skip to content

Commit

Permalink
feat: move to nix and terraform (#31)
Browse files Browse the repository at this point in the history
* feat: flake with nix os qcow generation

* feat: a part docker builder

* feat: added CI configs
  • Loading branch information
loic-roux-404 committed May 22, 2024
1 parent a665502 commit e7330f4
Show file tree
Hide file tree
Showing 142 changed files with 4,487 additions and 6,452 deletions.
7 changes: 5 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
insert_final_newline = true

[*.{yml,yaml,yml.*,yaml.*}]
[*.{yml,yaml,yml.*,yaml.*,xslt.*,*.xslt}]
indent_size = 2

[*.{hcl,tf,tfvars,tfvars.*}]
Expand All @@ -20,5 +20,8 @@ indent_size = 2
[*.sh]
end_of_line = lf

[*.nix]
indent_size = 2

[Makefile]
indent_style = tab
6 changes: 6 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

use flake
watch_file flake.nix

# vim: ft=bash
38 changes: 0 additions & 38 deletions .github/workflows/release-helm.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/release-nixos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release Nix image
on:
push:
branches:
- main
paths:
- 'nixos/**.nix'
- 'nixos-options/**.nix'
- flake.nix
- flake.lock
- '!**.md'
- 'packer/**'
- .github/workflows/release-nixos.yml

permissions:
contents: write
discussions: write

jobs:
gh-release-packer:
runs-on: ubuntu-latest
name: Release nix image
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
experimental-features = nix-command flakes
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Restore and cache Nix store
uses: nix-community/cache-nix-action@v5
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size-linux: 1073741824

- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Build
id: build
run: nix build .#nixosConfigurations.x86_64-linux.contabo

- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: nixos-${{ steps.vars.outputs.sha_short }}
token: "${{ secrets.GITHUB_TOKEN }}"
generate_release_notes: true
files: |
result/
69 changes: 0 additions & 69 deletions .github/workflows/release-packer.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/test-helm.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/test-packer.yml

This file was deleted.

81 changes: 0 additions & 81 deletions .github/workflows/test-playbook.yml

This file was deleted.

Loading

0 comments on commit e7330f4

Please sign in to comment.