forked from Fediversity/Fediversity
seemingly gets further when a similar command is tried from terminal. as per https://github.com/NixOS/nix/issues/8752#issuecomment-1694714693, this may have to do with aligning the current working directory.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{
|
|
system ? "x86_64-linux",
|
|
sources ? import ../npins,
|
|
pkgs ? import sources.nixpkgs {
|
|
inherit system;
|
|
config = { };
|
|
overlays = [ (import ../panel/nix/overlay.nix) ];
|
|
},
|
|
module,
|
|
...
|
|
}:
|
|
import "${sources.nixpkgs}/nixos/lib/eval-config.nix" {
|
|
modules = [
|
|
"${sources.disko}/module.nix"
|
|
"${sources.agenix}/modules/age.nix"
|
|
../services/fediversity
|
|
./resource.nix
|
|
# FIXME: get VM details from TF
|
|
module
|
|
(
|
|
{
|
|
terraform,
|
|
...
|
|
}:
|
|
let
|
|
inherit (terraform) hostname;
|
|
in
|
|
{
|
|
imports = [
|
|
../infra/test-machines/${hostname}
|
|
];
|
|
fediversityVm.name = hostname;
|
|
fediversity = {
|
|
inherit (terraform) domain;
|
|
temp.initialUser = {
|
|
inherit (terraform.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" terraform.initialUser.password;
|
|
};
|
|
};
|
|
}
|
|
)
|
|
];
|
|
}
|