Compare commits

...

5 commits

Author SHA1 Message Date
5150985d36 expose npins in shell for CI 2025-06-23 17:00:11 +02:00
d073bd706d
cast DEPLOYMENT_FLAKE to string 2025-06-22 14:42:14 +02:00
486b316885 run updater natively (#394)
see Fediversity/Fediversity#65 (comment).

closes #65.

Reviewed-on: Fediversity/Fediversity#394
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-06-20 09:41:38 +02:00
611c961dcf separate test declarations from invocations (#396)
see Fediversity/Fediversity#395 (comment)

Reviewed-on: Fediversity/Fediversity#396
Reviewed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Kiara Grouwstra <kiara@procolix.eu>
Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
2025-06-19 18:11:08 +02:00
d67f533948 fix running nixops4 apply test (#391)
Closes #390

Reviewed-on: Fediversity/Fediversity#391
Reviewed-by: kiara Grouwstra <kiara@procolix.eu>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-committed-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2025-06-19 08:26:20 +02:00
10 changed files with 37 additions and 15 deletions

View file

@ -7,15 +7,16 @@ on:
jobs:
lockfile:
runs-on: ubuntu-latest
runs-on: native
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
- name: Install npins
run: nix profile install 'nixpkgs#npins'
- name: Update npins sources
uses: getchoo/update-npins@v0
run: nix-shell --run "npins update"
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
token: "${{ secrets.DEPLOY_KEY }}"
branch: npins-update
commit-message: "npins: update sources"
title: "npins: update sources"

View file

@ -55,6 +55,7 @@ in
};
in
[
pkgs.npins
pkgs.nix-unit
test-loop
];

View file

@ -1,4 +1,5 @@
{
inputs,
lib,
config,
...
@ -9,7 +10,7 @@ let
inherit (lib.attrsets) concatMapAttrs optionalAttrs;
inherit (lib.strings) removeSuffix;
sources = import ../../npins;
inherit (sources) nixpkgs agenix disko;
inherit (sources) agenix disko;
secretsPrefix = ../../secrets;
secrets = import (secretsPrefix + "/secrets.nix");
@ -26,7 +27,7 @@ in
hostPublicKey = config.fediversityVm.hostPublicKey;
};
inherit nixpkgs;
inherit (inputs) nixpkgs;
## The configuration of the machine. We strive to keep in this file only the
## options that really need to be injected from the resource. Everything else

View file

@ -21,6 +21,9 @@ let
makeResourceModule =
{ vmName, isTestVm }:
{
# TODO(@fricklerhandwerk): this is terrible but IMO we should just ditch flake-parts and have our own data model for how the project is organised internally
_module.args = { inherit inputs; };
imports =
[
./common/resource.nix

View file

@ -25,6 +25,22 @@
"url": null,
"hash": "1w2gsy6qwxa5abkv8clb435237iifndcxq0s79wihqw11a5yb938"
},
"disko": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "nix-community",
"repo": "disko"
},
"pre_releases": false,
"version_upper_bound": null,
"release_prefix": null,
"submodules": false,
"version": "v1.12.0",
"revision": "7121f74b976481bc36877abaf52adab2a178fcbe",
"url": "https://api.github.com/repos/nix-community/disko/tarball/v1.12.0",
"hash": "0wbx518d2x54yn4xh98cgm65wvj0gpy6nia6ra7ns4j63hx14fkq"
},
"flake-inputs": {
"type": "GitRelease",
"repository": {

View file

@ -27,7 +27,7 @@ in
pkgs.openssh
];
env = {
DEPLOYMENT_FLAKE = ../.;
DEPLOYMENT_FLAKE = toString ../.;
DEPLOYMENT_NAME = "test";
NPINS_DIRECTORY = toString ../npins;
CREDENTIALS_DIRECTORY = toString ./.credentials;

View file

@ -6,8 +6,8 @@
}:
{
tests = {
mastodon = import ./tests/mastodon.nix { inherit pkgs; };
pixelfed-garage = import ./tests/pixelfed-garage.nix { inherit pkgs; };
peertube = import ./tests/peertube.nix { inherit pkgs; };
mastodon = pkgs.nixosTest ./tests/mastodon.nix;
pixelfed-garage = pkgs.nixosTest ./tests/pixelfed-garage.nix;
peertube = pkgs.nixosTest ./tests/peertube.nix;
};
}

View file

@ -42,7 +42,7 @@ let
'';
in
pkgs.nixosTest {
{
name = "mastodon";
nodes = {

View file

@ -161,7 +161,7 @@ let
'';
in
pkgs.nixosTest {
{
name = "peertube";
nodes = {

View file

@ -114,7 +114,7 @@ let
${seleniumQuit}'';
in
pkgs.nixosTest {
{
name = "test-pixelfed-garage";
nodes = {