add test vm

This commit is contained in:
Kopatz
2024-07-08 16:43:00 +02:00
parent 88537d8f3d
commit 2b9a21c1dd
4 changed files with 89 additions and 1 deletions

View File

@@ -159,6 +159,11 @@
modules =
[ disko.nixosModules.disko ./systems/adam-site/configuration.nix ];
};
"proxmox-test-vm" = mkHost {
minimal = true;
modules =
[ disko.nixosModules.disko ./systems/proxmox-test-vm/configuration.nix ];
};
};
};
}

View File

@@ -6,7 +6,7 @@
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
settings.X11Forwarding = false;
settings.PermitRootLogin = "no";
settings.PermitRootLogin = "prohibit-password";
extraConfig = ''
AllowAgentForwarding no
AllowStreamLocalForwarding no

View File

@@ -0,0 +1,27 @@
{ modulesPath, config, lib, pkgs, ... }: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
./disk-config.nix
../../modules/services/ssh.nix
];
time.timeZone = "Europe/Vienna";
custom = {
nftables.enable = true;
nix = {
ld.enable = true;
settings.enable = true;
};
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeP6qtVqE/gu72ZUZE8cdRi3INiUW9NqDR7SjXIzTw2"
];
environment.systemPackages = map lib.lowPrio [ pkgs.curl pkgs.gitMinimal ];
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
system.stateVersion = "24.05";
}

View File

@@ -0,0 +1,56 @@
# Example to create a bios compatible gpt partition
{ lib, ... }:
{
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "200M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}