revert submodule wrapper to align with module functions already doing types #2

Closed
kiara wants to merge 37 commits from kiara/Fediversity:fix-submodule-type into main
42 changed files with 11 additions and 7 deletions
Showing only changes of commit dbb4ce67fc - Show all commits

View file

@ -14,7 +14,7 @@ everything will become much cleaner.
above 100. For instance, `fedi117`.
2. Add a basic configuration for the machine. These typically go in
`infra/machines/<name>/default.nix`. You can look at other `fediXXX` VMs to
`machines/dev/<name>/default.nix`. You can look at other `fediXXX` VMs to
find inspiration. You probably do not need a `nixos.module` option at this
point.
@ -48,7 +48,7 @@ everything will become much cleaner.
7. Regenerate the list of machines:
```
sh infra/machines.md.sh
sh machines/machines.md.sh
```
Commit it with the machine's configuration, public key, etc.

View file

@ -28,7 +28,7 @@ let
++ (
if isTestVm then
[
./test-machines/${vmName}
../machines/operator/${vmName}
{
nixos.module.users.users.root.openssh.authorizedKeys.keys = [
# allow our panel vm access to the test machines
@ -38,7 +38,7 @@ let
]
else
[
./machines/${vmName}
../machines/dev/${vmName}
]
);
fediversityVm.name = vmName;
@ -147,8 +147,8 @@ let
listSubdirectories = path: attrNames (filterAttrs (_: type: type == "directory") (readDir path));
machines = listSubdirectories ./machines;
testMachines = listSubdirectories ./test-machines;
machines = listSubdirectories ../machines/dev;
testMachines = listSubdirectories ../machines/operator;
in
{

4
machines/README.md Normal file
View file

@ -0,0 +1,4 @@
# Machines
This directory contains the definition of [the VMs](machines.md) that host our
infrastructure.

View file

@ -20,7 +20,7 @@ vmOptions=$(
cd ..
nix eval \
--impure --raw --expr "
builtins.toJSON (builtins.getFlake (builtins.toString ./.)).vmOptions
builtins.toJSON (builtins.getFlake (builtins.toString ../.)).vmOptions
" \
--log-format raw --quiet
)