forked from Fediversity/Fediversity
move machines to reflect a semantic structure (#367)
later we may want to distinguish dev vs host as well, tho eventually we expect not to have hard-coded machines anyway. split off from #319. Reviewed-on: Fediversity/Fediversity#367 Co-authored-by: Kiara Grouwstra <kiara@procolix.eu> Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
parent
5a514b96e9
commit
dbb4ce67fc
42 changed files with 11 additions and 7 deletions
|
@ -14,7 +14,7 @@ everything will become much cleaner.
|
||||||
above 100. For instance, `fedi117`.
|
above 100. For instance, `fedi117`.
|
||||||
|
|
||||||
2. Add a basic configuration for the machine. These typically go in
|
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
|
find inspiration. You probably do not need a `nixos.module` option at this
|
||||||
point.
|
point.
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ everything will become much cleaner.
|
||||||
|
|
||||||
7. Regenerate the list of machines:
|
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.
|
Commit it with the machine's configuration, public key, etc.
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ let
|
||||||
++ (
|
++ (
|
||||||
if isTestVm then
|
if isTestVm then
|
||||||
[
|
[
|
||||||
./test-machines/${vmName}
|
../machines/operator/${vmName}
|
||||||
{
|
{
|
||||||
nixos.module.users.users.root.openssh.authorizedKeys.keys = [
|
nixos.module.users.users.root.openssh.authorizedKeys.keys = [
|
||||||
# allow our panel vm access to the test machines
|
# allow our panel vm access to the test machines
|
||||||
|
@ -38,7 +38,7 @@ let
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
[
|
[
|
||||||
./machines/${vmName}
|
../machines/dev/${vmName}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
fediversityVm.name = vmName;
|
fediversityVm.name = vmName;
|
||||||
|
@ -147,8 +147,8 @@ let
|
||||||
|
|
||||||
listSubdirectories = path: attrNames (filterAttrs (_: type: type == "directory") (readDir path));
|
listSubdirectories = path: attrNames (filterAttrs (_: type: type == "directory") (readDir path));
|
||||||
|
|
||||||
machines = listSubdirectories ./machines;
|
machines = listSubdirectories ../machines/dev;
|
||||||
testMachines = listSubdirectories ./test-machines;
|
testMachines = listSubdirectories ../machines/operator;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
4
machines/README.md
Normal file
4
machines/README.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Machines
|
||||||
|
|
||||||
|
This directory contains the definition of [the VMs](machines.md) that host our
|
||||||
|
infrastructure.
|
|
@ -20,7 +20,7 @@ vmOptions=$(
|
||||||
cd ..
|
cd ..
|
||||||
nix eval \
|
nix eval \
|
||||||
--impure --raw --expr "
|
--impure --raw --expr "
|
||||||
builtins.toJSON (builtins.getFlake (builtins.toString ./.)).vmOptions
|
builtins.toJSON (builtins.getFlake (builtins.toString ../.)).vmOptions
|
||||||
" \
|
" \
|
||||||
--log-format raw --quiet
|
--log-format raw --quiet
|
||||||
)
|
)
|
Loading…
Add table
Reference in a new issue