34 lines
782 B
Nix
34 lines
782 B
Nix
{ config, lib, modulesPath, ... }:
|
|
|
|
let
|
|
cfg = config.homelab.virtualisation.guest;
|
|
in {
|
|
options.homelab.virtualisation.guest.enable = lib.mkEnableOption "Settings for devices running on virtualisation, e.g. Proxmox";
|
|
|
|
imports = [
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
|
];
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
boot = {
|
|
# Whether to enable growing the root partition on boot.
|
|
growPartition = true;
|
|
# Use Grub bootloader
|
|
loader.grub = {
|
|
enable = true;
|
|
devices = [
|
|
"nodev"
|
|
];
|
|
};
|
|
};
|
|
|
|
fileSystems."/" = lib.mkDefault {
|
|
device = "/dev/disk/by-label/nixos";
|
|
autoResize = true;
|
|
fsType = "ext4";
|
|
};
|
|
|
|
# Enable QEMU Guest for Proxmox
|
|
services.qemuGuest.enable = true;
|
|
};
|
|
}
|