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,26 +12,9 @@
|
|||
../common/sharedOptions.nix
|
||||
../common/targetNode.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 =
|
||||
{
|
||||
root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZsldWMEsajYysjYsEpNvMOjO4D8L21pTrfQS1T+Hfy"
|
||||
];
|
||||
}
|
||||
// environment.config.resources."operator-environment".login-shell.apply {
|
||||
users.users = 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
|
||||
|
|
|
|||
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 = {
|
||||
nixos-configuration = mkNixosConfiguration environment required-resources;
|
||||
nixos-configuration = {
|
||||
imports = [
|
||||
(mkNixosConfiguration environment required-resources)
|
||||
./shared.nix
|
||||
];
|
||||
};
|
||||
system = targetSystem;
|
||||
ssh = {
|
||||
host = nodeName;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,12 @@ in
|
|||
}:
|
||||
{
|
||||
tf-proxmox-vm = {
|
||||
nixos-configuration = mkNixosConfiguration environment required-resources;
|
||||
nixos-configuration = {
|
||||
imports = [
|
||||
(mkNixosConfiguration environment required-resources)
|
||||
./shared.nix
|
||||
];
|
||||
};
|
||||
system = targetSystem;
|
||||
ssh = {
|
||||
username = "root";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue