Compare commits

..

No commits in common. "4e8b399052b2f9c6600b4c74212630c55408e0d4" and "bd1cfd7a7cc5699cf2e70f16540d204edfc01599" have entirely different histories.

68 changed files with 16 additions and 159 deletions

View file

@ -7,16 +7,15 @@ on:
jobs:
lockfile:
runs-on: native
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update pins
run: nix-shell --run "npins update"
- name: Create PR
uses: peter-evans/create-pull-request@v7
- 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
with:
token: "${{ secrets.DEPLOY_KEY }}"
branch: npins-update
commit-message: "npins: update sources"
title: "npins: update sources"

View file

@ -10,8 +10,6 @@ let
gitignore
;
inherit (pkgs) lib;
inherit (import sources.flake-inputs) import-flake;
inherit ((import-flake { src = ./.; }).inputs) nixops4;
pre-commit-check =
(import "${git-hooks}/nix" {
inherit nixpkgs system;
@ -57,10 +55,8 @@ in
};
in
[
pkgs.npins
pkgs.nix-unit
test-loop
nixops4.packages.${system}.default
];
};

View file

@ -17,8 +17,6 @@ let
in
{
_class = "flake";
perSystem =
{ pkgs, ... }:
{

View file

@ -1,8 +1,6 @@
{ inputs, ... }:
{
_class = "nixosTest";
name = "deployment-basic";
nodes.deployer =

View file

@ -20,8 +20,6 @@ let
in
{
_class = "flake";
perSystem =
{ pkgs, ... }:
{

View file

@ -7,8 +7,6 @@ let
in
{
_class = "nixosTest";
name = "deployment-cli";
nodes.deployer =

View file

@ -18,8 +18,6 @@ let
in
{
_class = "nixos";
imports = [ ./sharedOptions.nix ];
options.system.extraDependenciesFromModule = mkOption {

View file

@ -42,8 +42,6 @@ let
in
{
_class = "nixosTest";
imports = [
./sharedOptions.nix
];

View file

@ -11,7 +11,6 @@ let
inherit (lib) mkOption types;
in
# `config` not set and imported from multiple places: no fixed module class
{
options = {
targetMachines = mkOption {

View file

@ -12,8 +12,6 @@ let
in
{
_class = "nixos";
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
(modulesPath + "/../lib/testing/nixos-test-base.nix")

View file

@ -12,8 +12,6 @@ let
in
{
_class = "nixops4Resource";
imports = [ ./sharedOptions.nix ];
options = {

View file

@ -23,8 +23,6 @@ let
in
{
_class = "flake";
perSystem =
{ pkgs, ... }:
{

View file

@ -121,8 +121,6 @@ let
in
{
_class = "nixosTest";
name = "deployment-panel";
## The panel's module sets `nixpkgs.overlays` which clashes with

View file

@ -11,8 +11,6 @@ let
}).config;
in
{
_class = "nix-unit";
test-eval = {
expr =
let

View file

@ -7,8 +7,6 @@ let
in
with types;
{
_class = "nixops4Deployment";
options = {
runtime-environments = mkOption {
description = "Collection of runtime environments into which applications can be deployed";

View file

@ -65,8 +65,6 @@ let
cfg = config.deployment;
in
{
_class = "nixops4Deployment";
options = {
deployment = lib.mkOption {
description = ''

View file

@ -1,6 +1,4 @@
{
_class = "flake";
imports = [
./check/basic/flake-part.nix
./check/cli/flake-part.nix

View file

@ -17,8 +17,6 @@ let
inherit (lib) types mkOption;
in
{
_class = "nixops4Deployment";
options = {
enable = lib.mkEnableOption "Fediversity configuration";
domain = mkOption {

View file

@ -5,8 +5,6 @@ let
in
{
_class = "nixos";
imports = [
./hardware.nix
./networking.nix

View file

@ -1,8 +1,6 @@
{ modulesPath, ... }:
{
_class = "nixos";
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot = {

View file

@ -5,8 +5,6 @@ let
in
{
_class = "nixos";
config = {
services.openssh = {
enable = true;

View file

@ -1,6 +1,4 @@
{
_class = "nixos";
users.users = {
procolix = {
isNormalUser = true;

View file

@ -6,8 +6,6 @@ let
in
{
_class = "nixops4Resource";
options.fediversityVm = {
##########################################################################

View file

@ -1,5 +1,4 @@
{
inputs,
lib,
config,
...
@ -10,7 +9,7 @@ let
inherit (lib.attrsets) concatMapAttrs optionalAttrs;
inherit (lib.strings) removeSuffix;
sources = import ../../npins;
inherit (sources) agenix disko;
inherit (sources) nixpkgs agenix disko;
secretsPrefix = ../../secrets;
secrets = import (secretsPrefix + "/secrets.nix");
@ -18,8 +17,6 @@ let
in
{
_class = "nixops4Resource";
imports = [ ./options.nix ];
fediversityVm.hostPublicKey = mkDefault keys.systems.${config.fediversityVm.name};
@ -29,7 +26,7 @@ in
hostPublicKey = config.fediversityVm.hostPublicKey;
};
inherit (inputs) nixpkgs;
inherit 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,9 +21,6 @@ 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
@ -155,8 +152,6 @@ let
in
{
_class = "flake";
## - Each normal or test machine gets a NixOS configuration.
## - Each normal or test machine gets a VM options entry.
## - Each normal machine gets a deployment.

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 200;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 201;
proxmox = "fediversity";

View file

@ -6,8 +6,6 @@ let
name = "panel";
in
{
_class = "nixos";
imports = [
(import ../../../panel { }).module
];

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 2116;
proxmox = "procolix";

View file

@ -5,8 +5,6 @@ let
in
{
_class = "nixos";
services.forgejo = {
enable = true;

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 2187;
proxmox = "procolix";

View file

@ -1,8 +1,6 @@
{ config, ... }:
{
_class = "nixos";
services.phpfpm.pools.mediawiki.phpOptions = ''
upload_max_filesize = 1024M;
post_max_size = 1024M;

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7001;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7002;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7003;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7004;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7005;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7006;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7011;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7012;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7013;
proxmox = "fediversity";

View file

@ -1,6 +1,4 @@
{
_class = "nixops4Resource";
fediversityVm = {
vmId = 7014;
proxmox = "fediversity";

View file

@ -25,22 +25,6 @@
"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 = toString ../.;
DEPLOYMENT_FLAKE = ../.;
DEPLOYMENT_NAME = "test";
NPINS_DIRECTORY = toString ../npins;
CREDENTIALS_DIRECTORY = toString ./.credentials;

View file

@ -76,8 +76,6 @@ in
# https://git.dgnum.eu/mdebray/djangonix/
# unlicensed at the time of writing, but surely worth taking some inspiration from...
{
_class = "nixos";
options.services.${name} = {
enable = mkEnableOption "Service configuration for `${name}`";
production = mkOption {

View file

@ -60,8 +60,6 @@ let
];
in
python3.pkgs.buildPythonPackage {
_class = "package";
pname = name;
inherit (pyproject.project) version;
pyproject = true;

View file

@ -8,8 +8,6 @@
}:
buildPythonPackage rec {
_class = "package";
pname = "django-pydantic-field";
version = "v0.3.12";
pyproject = true;

View file

@ -10,8 +10,6 @@
}:
buildPythonPackage rec {
_class = "package";
pname = "drf-pydantic";
version = "v2.7.1";
pyproject = true;

View file

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

View file

@ -6,8 +6,6 @@ let
in
{
_class = "nixos";
imports = [
./garage
./mastodon

View file

@ -97,8 +97,6 @@ let
in
{
_class = "nixos";
imports = [ ./options.nix ];
config = mkIf config.fediversity.garage.enable {

View file

@ -5,8 +5,6 @@ let
in
{
_class = "nixos";
options.fediversity.garage = {
enable = mkEnableOption "Enable a Garage server on the machine";

View file

@ -11,8 +11,6 @@ let
in
{
_class = "nixos";
imports = [ ./options.nix ];
config = mkMerge [

View file

@ -1,8 +1,6 @@
{ config, lib, ... }:
{
_class = "nixos";
options.fediversity.mastodon =
(import ../sharedOptions.nix {
inherit config lib;

View file

@ -5,8 +5,6 @@ let
in
{
_class = "nixos";
imports = [ ./options.nix ];
config = mkMerge [

View file

@ -6,8 +6,6 @@ let
in
{
_class = "nixos";
options.fediversity.peertube =
(import ../sharedOptions.nix {
inherit config lib;

View file

@ -15,8 +15,6 @@ let
in
{
_class = "nixos";
imports = [ ./options.nix ];
config = mkMerge [

View file

@ -1,8 +1,6 @@
{ config, lib, ... }:
{
_class = "nixos";
options.fediversity.pixelfed =
(import ../sharedOptions.nix {
inherit config lib;

View file

@ -14,8 +14,6 @@ let
in
{
_class = "nixos";
enable = mkEnableOption "Enable a ${serviceDocName} server on the machine";
s3AccessKeyFile = mkOption {

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 = {

View file

@ -127,8 +127,6 @@ let
preOverride = pkgs.nixosTest (
test
// {
_class = "nixosTest";
interactive = (test.interactive or { }) // {
# no need to // with test.interactive.nodes here, since we are iterating
# over all of them, and adding back in the config via `imports`

View file

@ -10,8 +10,6 @@ let
in
{
_class = "nixos";
imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ];
fediversity.garage.enable = true;

View file

@ -1,8 +1,6 @@
# customize nixos-rebuild build-vm to be a bit more convenient
{ pkgs, ... }:
{
_class = "nixos";
# let us log in
users.mutableUsers = false;
users.users.root.hashedPassword = "";

View file

@ -6,7 +6,6 @@
...
}:
{
_class = "nixos";
imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ];

View file

@ -5,8 +5,6 @@
}:
{
_class = "nixos";
imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ];
fediversity = {

View file

@ -11,8 +11,6 @@ let
in
{
_class = "nixos";
imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ];
fediversity = {