profiles: init (vsock ssh &c.)
This commit is contained in:
parent
12e95630b1
commit
1828835a1d
8 changed files with 228 additions and 0 deletions
19
profiles/resources.nix
Normal file
19
profiles/resources.nix
Normal 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;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue