nixos-config/config/hardware/zbox.nix

110 lines
2.4 KiB
Nix
Raw Normal View History

2021-03-31 16:28:42 -07:00
{ config, lib, pkgs, ... }:
{
2021-03-31 16:28:42 -07:00
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
2021-03-31 16:28:42 -07:00
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
kernelPackages = pkgs.linuxPackages_latest;
2021-03-31 16:28:42 -07:00
extraModulePackages = [ ];
};
system.stateVersion = "21.05";
fileSystems = {
"/" = {
device = "zbox-root";
fsType = "tmpfs";
options = [ "mode=755" ];
};
"/boot" = {
device = "/dev/disk/by-label/ZBOX-BOOT";
fsType = "vfat";
options = [ "noexec" "noatime" "nodiratime" ];
};
"/state" = {
device = "/dev/disk/by-label/zbox-data";
fsType = "btrfs";
options = [ "noatime" "nodiratime" "compress=zstd" "noexec" "subvol=@state" ];
};
"/nix" = {
device = "/dev/disk/by-label/zbox-data";
fsType = "btrfs";
options = [ "noatime" "nodiratime" "compress=zstd" "subvol=@nix" ];
};
2021-03-31 16:28:42 -07:00
"/var/log" = {
device = "/dev/disk/by-label/zbox-data";
fsType = "btrfs";
options = [ "noatime" "nodiratime" "compress=zstd" "noexec" "subvol=@logs" ];
};
"/home" = {
device = "/dev/disk/by-label/zbox-data";
fsType = "btrfs";
options = [ "noatime" "nodiratime" "compress=zstd" "noexec" "subvol=@home" ];
};
2021-08-06 16:25:01 -07:00
};
2021-03-31 16:28:42 -07:00
2021-08-06 16:25:01 -07:00
swapDevices = [{ device = "/dev/disk/by-label/zbox-swap"; }];
2021-03-31 16:28:42 -07:00
hardware = {
bluetooth.enable = true;
cpu.intel.updateMicrocode = true;
opengl = {
driSupport = true;
driSupport32Bit = true;
setLdLibraryPath = true;
2021-03-31 16:28:42 -07:00
};
2021-08-06 16:25:01 -07:00
pulseaudio = {
support32Bit = true;
package = pkgs.pulseaudioFull;
};
enableRedistributableFirmware = true;
enableAllFirmware = true;
2021-03-31 16:28:42 -07:00
};
networking = {
macvlans = {
intif0 = {
interface = "eno1";
mode = "bridge";
};
};
interfaces = {
intif0 = {
# output of: echo clunk-intif0|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
macAddress = "02:dd:80:52:83:9b";
};
};
};
services.xserver.videoDrivers = [ "nvidia" ];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
systemd.targets = {
sleep.enable = false;
suspend.enable = false;
hibernate.enable = false;
hybrid-sleep.enable = false;
};
2021-03-31 16:28:42 -07:00
}