2023-12-01 11:51:55 +00:00
|
|
|
{ nixpkgs }:
|
2024-05-01 12:00:39 +00:00
|
|
|
name :
|
|
|
|
{ dualBoot ? false } :
|
|
|
|
let
|
|
|
|
lib = nixpkgs.lib;
|
|
|
|
configPath = ./machines/${name}.nix;
|
|
|
|
machineConfig =
|
|
|
|
if builtins.pathExists configPath then
|
|
|
|
configPath
|
|
|
|
else
|
|
|
|
./hardware/base.nix;
|
|
|
|
in
|
|
|
|
lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
(
|
|
|
|
{ config, pkgs, lib, ... }: {
|
|
|
|
imports = [
|
|
|
|
machineConfig
|
|
|
|
./config/custom-build-vm.nix
|
|
|
|
];
|
2024-04-06 21:43:37 +00:00
|
|
|
|
2024-05-01 12:00:39 +00:00
|
|
|
system.stateVersion = "23.11";
|
2024-05-01 03:23:58 +00:00
|
|
|
|
2024-05-01 12:00:39 +00:00
|
|
|
virtualisation =
|
|
|
|
let
|
|
|
|
vmConfig = {
|
|
|
|
virtualisation = {
|
|
|
|
sharedHostKeys = true;
|
|
|
|
virt-viewer = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
vmVariant = vmConfig;
|
|
|
|
vmVariantWithBootLoader = vmConfig;
|
|
|
|
};
|
2024-05-01 02:55:17 +00:00
|
|
|
|
2024-05-01 12:00:39 +00:00
|
|
|
# Networking
|
|
|
|
networking.hostName = name;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|