Added some of the hardware config stuff

This commit is contained in:
Annika Merris 2024-05-18 12:25:27 -04:00
parent fc3e307d0c
commit bfba6682f6
7 changed files with 78 additions and 22 deletions

View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./hardware
]
}

View file

@ -0,0 +1,28 @@
{ config, pkgs, lib, ... }:
{
boot.loader = lib.mkIf (config.physical && !config.physical) {
grub = {
enable = true;
efiSupport = true;
useOSProber = true;
gfxmodeEfi = "1920x1080";
configurationLimit = 25;
device = "nodev";
# Display menu indefinitely if holding shift key
extraConfig = ''
if keystatus --shift; then
set timeout=-1
else
set timeout=3
fi
'';
};
efi.canTouchEfiVariables = true;
};
boot.supportedFilesystems = lib.mkIf config.physical [ "ntfs" ];
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
}

View file

@ -0,0 +1,12 @@
{ lib, ... }:
{
import = [
./boot.nix
];
options = {
physical = lib.mkEnableOption "Whether this machine is a physical device.";
server = lib.mkEnableOption "Whether this machine is a server.";
};
}