add test vm
This commit is contained in:
@@ -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 ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
27
systems/proxmox-test-vm/configuration.nix
Normal file
27
systems/proxmox-test-vm/configuration.nix
Normal 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";
|
||||
}
|
||||
56
systems/proxmox-test-vm/disk-config.nix
Normal file
56
systems/proxmox-test-vm/disk-config.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user