Compare commits

..

2 commits

Author SHA1 Message Date
566501573d
mount /dev/kvm
This reverts commit 32a8c011133045f624f23d0cacd6e2b81ccc78eb.
2025-08-04 19:49:50 +02:00
35cf1dad09
try store mounted read-only
- `--store` as per
https://blog.kotatsu.dev/posts/2023-04-21-woodpecker-nix-caching/
- `--eval-store` as per
https://kevincox.ca/2022/01/02/nix-in-docker-caching/

mount store

rm kvm
2025-08-04 19:49:48 +02:00
11 changed files with 34 additions and 16 deletions

View file

@ -8,6 +8,8 @@ when:
steps:
- name: build
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- |
mkdir -p ~/.ssh
@ -17,5 +19,3 @@ steps:
environment:
CD_SSH_KEY:
from_secret: cd_ssh_key
volumes:
- /nix:/mnt/nix:ro

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-data-model
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix-shell --run 'nix-unit ./deployment/data-model-test.nix'
- nix-shell --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --run 'nix-unit ./deployment/data-model-test.nix'

View file

@ -9,9 +9,9 @@ when:
steps:
- name: check-deployment-basic
image: nixos/nix
commands:
- nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-basic -L
volumes:
- /nix:/mnt/nix:ro
commands:
- nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-basic -L
devices:
- /dev/kvm:/dev/kvm

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-deployment-cli
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-cli -L
- nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-cli -L

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-deployment-panel
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-panel -L
- nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.deployment-panel -L

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-mastodon
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.test-mastodon-service -L
- nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.test-mastodon-service -L

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-panel
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix-build -A tests.panel
- nix-build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt -A tests.panel

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-peertube
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.test-peertube-service -L
- nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.test-peertube-service -L

View file

@ -9,5 +9,7 @@ when:
steps:
- name: check-pre-commit
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix-build -A tests
- nix-build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt -A tests

View file

@ -14,20 +14,22 @@ when:
steps:
- name: check-resources
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- echo ==================== [ VM Options ] ====================
- |
set -euC
machines=$(nix eval --impure --raw --expr 'with builtins; toString (attrNames (getFlake (toString ./.)).vmOptions)')
machines=$(nix eval --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' --impure --raw --expr 'with builtins; toString (attrNames (getFlake (toString ./.)).vmOptions)')
for machine in $machines; do
echo ~~~~~~~~~~~~~~~~~~~~~: $machine :~~~~~~~~~~~~~~~~~~~~~
nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.vmOptions-$machine
nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.vmOptions-$machine
done
- echo ==================== [ NixOS Configurations ] ====================
- |
set -euC
machines=$(nix eval --impure --raw --expr 'with builtins; toString (attrNames (getFlake (toString ./.)).nixosConfigurations)')
machines=$(nix eval --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' --impure --raw --expr 'with builtins; toString (attrNames (getFlake (toString ./.)).nixosConfigurations)')
for machine in $machines; do
echo ~~~~~~~~~~~~~~~~~~~~~: $machine :~~~~~~~~~~~~~~~~~~~~~
nix build --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.nixosConfigurations-$machine
nix build --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --extra-experimental-features 'nix-command flakes' .#checks.x86_64-linux.nixosConfigurations-$machine
done

View file

@ -8,8 +8,10 @@ when:
steps:
- name: lockfile
image: nixos/nix
volumes:
- /nix:/mnt/nix:ro
commands:
- nix-shell --run "npins --verbose update"
- nix-shell --eval-store local --store unix:///mnt/nix/var/nix/daemon-socket/socket?root=/mnt --run "npins --verbose update"
# - name: Create PR
# uses: https://github.com/KiaraGrouwstra/gitea-create-pull-request@f9f80aa5134bc5c03c38f5aaa95053492885b397
# with: