nixos System

This commit is contained in:
Nicolas Jeannerod 2025-05-09 09:12:39 +02:00
parent 1f01f088d8
commit 8135d3e1b8
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8

View file

@ -20,6 +20,16 @@ testers.runNixOSTest (
name = "basic.tfvars";
path = ./basic.tfvars;
};
fakeMachine = pkgs.nixos [
../basic/minimalTarget.nix
../../../launch/shared.nix
../../../launch/garage.nix
../../../launch/mastodon.nix
../../../launch/pixelfed.nix
../../../launch/peertube.nix
];
extraDependenciesFromMachine =
machine:
[
@ -101,7 +111,7 @@ testers.runNixOSTest (
pkgs.postgresql_15
]
++ lib.concatLists (
map (tm: extraDependenciesFromMachine nodes.${tm}) (targetMachines ++ [ "fake" ])
map extraDependenciesFromMachine (map (tm: nodes.${tm}) targetMachines ++ [ fakeMachine.config ])
);
environment.systemPackages = [
tf
@ -109,49 +119,6 @@ testers.runNixOSTest (
];
};
fake = {
imports = [
../basic/minimalTarget.nix
## NOTE: Cannot use ../../../launch/shared.nix because it involves
## <disko/module.nix> and <agenix/modules/age.nix>.
(
{ pkgs, ... }:
let
hostname = "dummy";
domain = "dummy";
initialUser = {
username = "dummy";
email = "dummy";
displayName = "dummy";
};
in
{
imports = [
# <disko/module.nix>
# <agenix/modules/age.nix>
../../../services/fediversity
../../../launch/resource.nix
];
fediversityVm.name = hostname;
fediversity = {
inherit domain;
temp.initialUser = {
inherit (initialUser) username email displayName;
# FIXME: disgusting, but nvm, this is going to be replaced by
# proper central authentication at some point
passwordFile = pkgs.writeText "password" initialUser.password;
};
};
}
)
../../../launch/garage.nix
../../../launch/mastodon.nix
../../../launch/pixelfed.nix
../../../launch/peertube.nix
];
};
}
// lib.genAttrs targetMachines (_: {
imports = [ ../basic/minimalTarget.nix ];