Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0.4.1
_commit: 0.6.0
_src_path: gh:quickplates/flux
accountname: spietras
description: Flux manifests for my k8s clusters ☸️
docs: true
docsurl: https://spietras.github.io/clusters
docs: false
projectname: clusters
reponame: clusters
repourl: https://github.com/spietras/clusters
69 changes: 13 additions & 56 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,63 @@
{
// Build the base image
"build": {
// Docker context to use, relative to this file
"context": "image/",
// Dockerfile to use, relative to this file
"dockerfile": "image/Dockerfile",
// Build options
"options": [
// Use host network
"--network=host"
]
"options": ["--network=host"]
},
// Tool-specific settings
"customizations": {
// VS Code settings
"vscode": {
// Extensions to install
"extensions": [
// Nix
"jnoortheen.nix-ide",
// Direnv
"mkhl.direnv",
// Task
"task.vscode-task",
// Trunk
"Trunk.io"
],
// Settings to override
"settings": {
// Set Trunk as the default formatter
"[nix]": {
"editor.defaultFormatter": "jnoortheen.nix-ide"
},
"editor.defaultFormatter": "trunk.io",
// Use LSP for Nix
"nix.enableLanguageServer": true,
// Use nil as the language server
"nix.serverPath": "nil",
"nix.serverSettings": {
"nil": {
"formatting": {
// Use 'nix fmt' for formatting
"command": ["nix", "fmt", "--", "-"]
}
}
},
// Don't forward ports automatically
"remote.autoForwardPorts": false,
// Use Nix IDE instead of Trunk for Nix files
"[nix]": {
"editor.defaultFormatter": "jnoortheen.nix-ide"
}
"remote.autoForwardPorts": false
}
}
},
// Extra features to install to the container
"features": {
// Install Nix
"ghcr.io/devcontainers/features/nix:1.2.0": {
// Enable experimental features
"extraNixConfig": "experimental-features = nix-command flakes",
"version": "2.26.2"
"ghcr.io/devcontainers-extra/features/direnv:1.0.3": {
"version": "2.37.1"
},
// Install Direnv
"ghcr.io/devcontainers-extra/features/direnv:1.0.2": {
"version": "2.35.0"
"ghcr.io/devcontainers-extra/features/starship:1.0.10": {
"version": "1.24.0"
},
// Install Starship
"ghcr.io/devcontainers-extra/features/starship:1.0.9": {
"version": "1.22.1"
"ghcr.io/devcontainers/features/nix:1.2.0": {
"extraNixConfig": "experimental-features = nix-command flakes",
"version": "2.28.5"
}
},
// Volumes
"mounts": [
// Mount secrets (shared)
"source=devcontainer-shared-secrets,target=/secrets/,type=volume",
// Mount nix store (not shared)
"source=devcontainer-${devcontainerId}-nix,target=/nix/,type=volume",
// Mount shell history (not shared)
"source=devcontainer-${devcontainerId}-shellhistory-persist,target=/persist/shellhistory/,type=volume",
// Mount trunk cache (shared)
"source=devcontainer-shared-trunk-cache,target=/cache/trunk/,type=volume",
// Mount npm cache (shared)
"source=devcontainer-shared-npm-cache,target=/cache/npm/,type=volume"
"source=devcontainer-shared-trunk-cache,target=/cache/trunk/,type=volume"
],
// Run a command when the container is created
"onCreateCommand": "/hooks/create.sh",
// Environment variables
"remoteEnv": {
// Set workspace path
"WORKSPACE": "${containerWorkspaceFolder}"
},
// Run arguments
"runArgs": [
// Use host UTS namespace
"--uts=host",
// Use host IPC
"--ipc=host",
// Use host network
"--network=host",
// Use host user namespace
"--userns=host",
// Use host cgroup namespace
"--cgroupns=host",
// Run with elevated privileges
"--privileged"
]
}
2 changes: 1 addition & 1 deletion .devcontainer/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# It also has git, zsh and a bunch of other stuff preinstalled
# Also, it includes a non-root 'vscode' user with sudo access
# The version is pinned to ensure reproducibility
FROM mcr.microsoft.com/devcontainers/base:1.2.3-ubuntu-24.04
FROM mcr.microsoft.com/devcontainers/base:1.2.6-ubuntu-24.04

ENV REMOTE_USER=vscode

Expand Down
13 changes: 0 additions & 13 deletions .devcontainer/image/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,3 @@ EOF
cat <<EOF >>"${REMOTE_USER_HOME}/.zshrc"
export TRUNK_CACHE=/cache/trunk/
EOF

# Setup npm cache
mkdir --parents /cache/npm/

chown --recursive "${REMOTE_USER}:" /cache/npm/

cat <<EOF >>"${REMOTE_USER_HOME}/.bashrc"
export NPM_CONFIG_CACHE=/cache/npm/
EOF

cat <<EOF >>"${REMOTE_USER_HOME}/.zshrc"
export NPM_CONFIG_CACHE=/cache/npm/
EOF
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Mark everything as vendored
* linguist-vendored
# Treat docs as documentation
/docs/** -linguist-vendored linguist-documentation
# Unmark files in src, so that they are included in language stats
/src/** -linguist-vendored
# Treat tests as documentation
Expand Down
115 changes: 0 additions & 115 deletions .github/workflows/docs.yaml

This file was deleted.

25 changes: 10 additions & 15 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,35 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
# We need to fetch upstream so Trunk can compare against it
- name: Fetch upstream
if: github.event_name == 'pull_request'
run: >
run: >-
git
fetch
origin
${{ github.event.pull_request.base.ref }}
- name: Setup Nix cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
id: cache-nix
with:
path: ${{ env.NIX_CACHE_DIR }}
key: lint-nix
- name: Setup Trunk cache
uses: actions/cache@v4.2.1
uses: actions/cache@v4.3.0
with:
path: ${{ env.TRUNK_CACHE_DIR }}
key: lint-trunk
- name: Setup docs modules cache
uses: actions/[email protected]
with:
path: docs/node_modules/
key: lint-docs-modules
- name: Install Nix
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31.8.4
with:
github_access_token: ${{ github.token }}
install_url: https://releases.nixos.org/nix/nix-2.26.2/install
install_url: https://releases.nixos.org/nix/nix-2.28.5/install
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Import Nix store cache
if: steps.cache-nix.outputs.cache-hit == 'true'
run: >
run: >-
nix-store
--import
< ${{ env.NIX_CACHE_DIR }}/archive.nar
Expand All @@ -70,7 +65,7 @@ jobs:
if: github.event_name == 'pull_request'
env:
TRUNK_CACHE: ${{ env.TRUNK_CACHE_DIR }}
run: >
run: >-
nix
develop
./#lint
Expand All @@ -87,7 +82,7 @@ jobs:
if: github.event_name != 'pull_request'
env:
TRUNK_CACHE: ${{ env.TRUNK_CACHE_DIR }}
run: >
run: >-
nix
develop
./#lint
Expand All @@ -100,7 +95,7 @@ jobs:
# See: https://github.com/cachix/install-nix-action/issues/56
- name: Export Nix store cache
if: "!cancelled()"
run: >
run: >-
mkdir
--parents
${{ env.NIX_CACHE_DIR }}
Expand Down
Loading