aux-config/systems/x86_64-linux/mow0m/hardware.nix
kB01 18c1a197ad
All checks were successful
/ Check Nix Flake (push) Successful in 2m3s
Added Host mow0m
2025-04-23 22:46:03 +02:00

85 lines
2.3 KiB
Nix

{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "c61a0c21";
networking.useDHCP = lib.mkDefault true;
# Grub boot loader
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot";
boot.loader.grub.enable = true;
boot.loader.grub.copyKernels = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.device = "nodev";
#boot.loader.grub.devices = [
# "/dev/disk/by-uuid/90A1-2F0B"
# "/dev/disk/by-uuid/90F1-EAEB"
#];
boot.loader.grub.mirroredBoots = [
{
devices = [ "/dev/disk/by-uuid/90A1-2F0B" ];
path = "/boot";
}
{
devices = [ "/dev/disk/by-uuid/90F1-EAEB" ];
path = "/boot-fallback";
}
# The first Boot Device is Mounted on /boot and gets added Automatically
];
# Remote Filesystem(s) unlocking
boot.kernelParams = [ "ip=dhcp" ];
boot.initrd.network.enable = true;
boot.initrd.network.ssh = {
enable = true;
port = 2550;
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPKorzbCjRROOmFpiEfbH2mmLJ8qACUUt7pln87PgkA kb@LoyAdjo"
];
hostKeys = [ "/etc/secrets/initrd/ssh_host_ed25519_key" ];
};
boot.initrd.network.postCommands = ''
zpool import -a
echo "zfs load-key -a; killall zfs" >> /root/.profile
'';
# Filesystems
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/90A1-2F0B";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot-fallback" = {
device = "/dev/disk/by-uuid/90F1-EAEB";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/" = {
device = "mow0m/root";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "mow0m/root/nix";
fsType = "zfs";
};
fileSystems."/home" = {
device = "mow0m/root/home";
fsType = "zfs";
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}