forked from fediversity/fediversity
move proxmox config out
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
parent
672c8ceafe
commit
2b87ce0819
4 changed files with 41 additions and 26 deletions
|
|
@ -12,31 +12,14 @@
|
||||||
../common/sharedOptions.nix
|
../common/sharedOptions.nix
|
||||||
../common/targetNode.nix
|
../common/targetNode.nix
|
||||||
"${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
"${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
||||||
# systemd-repart
|
|
||||||
# ../../../infra/common/nixos/repart.nix
|
|
||||||
# disko
|
|
||||||
"${sources.disko}/module.nix"
|
|
||||||
../../../infra/common/proxmox-qemu-vm.nix
|
|
||||||
];
|
];
|
||||||
services.qemuGuest.enable = true;
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.cloud-init = {
|
|
||||||
enable = true;
|
|
||||||
network.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users =
|
users.users = environment.config.resources."operator-environment".login-shell.apply {
|
||||||
{
|
resources = lib.filterAttrs (_name: value: value ? login-shell) (
|
||||||
root.openssh.authorizedKeys.keys = [
|
lib.concatMapAttrs (
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZsldWMEsajYysjYsEpNvMOjO4D8L21pTrfQS1T+Hfy"
|
k': req: lib.mapAttrs' (k: lib.nameValuePair "${k'}.${k}") req.resources
|
||||||
];
|
) requests
|
||||||
}
|
);
|
||||||
// environment.config.resources."operator-environment".login-shell.apply {
|
};
|
||||||
resources = lib.filterAttrs (_name: value: value ? login-shell) (
|
|
||||||
lib.concatMapAttrs (
|
|
||||||
k': req: lib.mapAttrs' (k: lib.nameValuePair "${k'}.${k}") req.resources
|
|
||||||
) requests
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
deployment/check/data-model-tf-proxmox/setups/shared.nix
Normal file
22
deployment/check/data-model-tf-proxmox/setups/shared.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
sources ? import ../../../../npins,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# systemd-repart
|
||||||
|
# ../../../../infra/common/nixos/repart.nix
|
||||||
|
# disko
|
||||||
|
"${sources.disko}/module.nix"
|
||||||
|
../../../../infra/common/proxmox-qemu-vm.nix
|
||||||
|
];
|
||||||
|
services.qemuGuest.enable = true;
|
||||||
|
services.openssh.enable = true;
|
||||||
|
services.cloud-init = {
|
||||||
|
enable = true;
|
||||||
|
network.enable = true;
|
||||||
|
};
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZsldWMEsajYysjYsEpNvMOjO4D8L21pTrfQS1T+Hfy"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -34,7 +34,12 @@ in
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
tf-proxmox-template = {
|
tf-proxmox-template = {
|
||||||
nixos-configuration = mkNixosConfiguration environment required-resources;
|
nixos-configuration = {
|
||||||
|
imports = [
|
||||||
|
(mkNixosConfiguration environment required-resources)
|
||||||
|
./shared.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
system = targetSystem;
|
system = targetSystem;
|
||||||
ssh = {
|
ssh = {
|
||||||
host = nodeName;
|
host = nodeName;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,12 @@ in
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
tf-proxmox-vm = {
|
tf-proxmox-vm = {
|
||||||
nixos-configuration = mkNixosConfiguration environment required-resources;
|
nixos-configuration = {
|
||||||
|
imports = [
|
||||||
|
(mkNixosConfiguration environment required-resources)
|
||||||
|
./shared.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
system = targetSystem;
|
system = targetSystem;
|
||||||
ssh = {
|
ssh = {
|
||||||
username = "root";
|
username = "root";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue