NixOSConfig/lib/system.nix

33 lines
1.2 KiB
Nix
Raw Normal View History

{ nixpkgs }:
name :
{ dualBoot ? false } :
let
lib = nixpkgs.lib;
configPath = ./machines/${name}.nix;
2023-12-01 15:04:29 +00:00
machineConfig =
if builtins.pathExists configPath then
configPath
else
./hardware/base.nix;
in
lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ config, pkgs, ... }: {
2023-12-01 15:04:29 +00:00
imports = [
machineConfig
];
2024-04-06 21:43:37 +00:00
virtualisation.vmVariant = {
virtualisation.sharedDirectories = {
keys = {
source = "/etc/ssh";
target = "/etc/ssh";
};
};
};
})
];
}