tami-nix-infra/hosts/tami-mac/hardware.nix
2023-05-17 00:15:23 +03:00

59 lines
1.2 KiB
Nix

{ pkgs, ... }:
let
device = "/dev/sda";
in
{
disko.devices = {
disk.${baseNameOf device} = {
inherit device;
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "boot";
start = "1MiB";
end = "512MiB";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
name = "nixos";
start = "512MiB";
end = "100%";
part-type = "primary";
bootable = true;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
}
];
};
};
};
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
initrd.systemd.enable = true;
tmp.cleanOnBoot = true;
};
hardware = {
enableAllFirmware = true;
enableRedistributableFirmware = true;
cpu.intel.updateMicrocode = true;
};
zramSwap.enable = true;
}