profiles: init (vsock ssh &c.)

This commit is contained in:
Else, Someone 2025-09-17 16:51:24 +03:00
parent 12e95630b1
commit 1828835a1d
8 changed files with 228 additions and 0 deletions

19
profiles/resources.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, options, lib, ... }:
{
config = lib.mkMerge [
{
# zswap is said to be more reliable than zram
boot.kernelParams = lib.optionals (!config.zramSwap.enable) [ "zswap.enabled=1" ];
}
(lib.optionalAttrs (options ? microvm) {
microvm = {
hypervisor = lib.mkDefault "cloud-hypervisor";
graphics.enable = lib.mkDefault true;
vcpu = lib.mkDefault 2;
hotplugMem = lib.mkDefault (2 * 1024);
hotpluggedMem = lib.mkDefault 512;
};
})
];
}