forked from Fachschaft/nixConfig
Differentiate hardware and vms in roles
This commit is contained in:
parent
715c10c418
commit
511243fcbf
3 changed files with 26 additions and 8 deletions
|
@ -1,16 +1,21 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
modulesPath,
|
||||
vm ? true,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
imports =
|
||||
[
|
||||
./admins.nix
|
||||
./nix_keys.nix
|
||||
./prometheusNodeExporter.nix
|
||||
(modulesPath + "/virtualisation/xen-domU.nix")
|
||||
../modules/impermanence.nix
|
||||
];
|
||||
]
|
||||
++ (
|
||||
if vm
|
||||
then [./vm.nix]
|
||||
else [./hardware.nix]
|
||||
);
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
|
|
5
nixos/roles/hardware.nix
Normal file
5
nixos/roles/hardware.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
# Bootloader
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
8
nixos/roles/vm.nix
Normal file
8
nixos/roles/vm.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/xen-domU.nix")
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue