41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
# SPDX-FileCopyrightText: 2026 Qyriad <qyriad@qyriad.me>
|
|
#
|
|
# SPDX-License-Identifier: EUPL-1.1
|
|
|
|
{ name, lib, config, ... }:
|
|
|
|
{
|
|
system.includeBuildDependencies = true;
|
|
system.switch.enable = true;
|
|
|
|
documentation.enable = false;
|
|
|
|
virtualisation = {
|
|
additionalPaths = [ config.system.build.toplevel ];
|
|
writableStore = true;
|
|
mountHostNixStore = true;
|
|
installBootLoader = true;
|
|
|
|
# Moderately improves performance of `nixos-rebuild` inside the VM on my machine,
|
|
# (205.48 seconds to 186.42 seconds), but we have to allocate much more space.
|
|
writableStoreUseTmpfs = false;
|
|
# 20 GiB ought to be enough.
|
|
diskSize = lib.mkIf (!config.virtualisation.writableStoreUseTmpfs) (20 * 1024);
|
|
|
|
# With how much memory Nix eval uses, this is essentially required.
|
|
memorySize = 8192;
|
|
cores = 8;
|
|
|
|
};
|
|
|
|
boot.loader.grub = {
|
|
enable = true;
|
|
device = "/dev/vda";
|
|
forceInstall = true;
|
|
};
|
|
|
|
# Just making something in this strict in `name`,
|
|
# which is only present as an argument for nodes and I don't want to
|
|
# confuse that with the test modules.
|
|
warnings = builtins.seq name [ ];
|
|
}
|