forked from Fachschaft/nixConfig
Differentiate hardware and vms in roles
This commit is contained in:
parent
cfffd4b3b8
commit
0e1c7651a7
3 changed files with 20 additions and 2 deletions
|
@ -2,15 +2,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
|
vm ? true,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./admins.nix
|
./admins.nix
|
||||||
./nix_keys.nix
|
./nix_keys.nix
|
||||||
./prometheusNodeExporter.nix
|
./prometheusNodeExporter.nix
|
||||||
(modulesPath + "/virtualisation/xen-domU.nix")
|
|
||||||
../modules/impermanence.nix
|
../modules/impermanence.nix
|
||||||
];
|
] ++ (if vm then [./vm.nix] else [./hardware.nix]);
|
||||||
nix = {
|
nix = {
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
|
|
10
nixos/roles/hardware.nix
Normal file
10
nixos/roles/hardware.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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