From 066a7c9d745d982882d1cce5135224d73a2b7c53 Mon Sep 17 00:00:00 2001 From: batvin321 Date: Mon, 18 Nov 2024 17:56:51 -0500 Subject: [PATCH] Add system/2012macmini/hardware-configuration.nix --- system/2012macmini/hardware-configuration.nix | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 system/2012macmini/hardware-configuration.nix diff --git a/system/2012macmini/hardware-configuration.nix b/system/2012macmini/hardware-configuration.nix new file mode 100644 index 0000000..8179d7f --- /dev/null +++ b/system/2012macmini/hardware-configuration.nix @@ -0,0 +1,66 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "wl" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + + fileSystems."/" = + { device = "/dev/sda2"; + fsType = "btrfs"; + options = [ "subvol=root" "compress=zstd" "noatime" ]; + }; + + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/8c7cfd8b-9b49-4f86-8019-3d4614920c19"; + + fileSystems."/boot" = + { device = "/dev/sda1"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + fileSystems."/home" = + { device = "/dev/sda2"; + fsType = "btrfs"; + options = [ "subvol=home" "compress=zstd" "noatime" ]; + }; + + fileSystems."/nix" = + { device = "/dev/sda2"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" "noatime" ]; + }; + + fileSystems."/persist" = + { device = "/dev/sda2"; + fsType = "btrfs"; + options = [ "subvol=persist" "compress=zstd" "noatime" ]; + }; + + fileSystems."/var/log" = + { device = "/dev/sda2"; + fsType = "btrfs"; + options = [ "subvol=log" "compress=zstd" "noatime" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20u1u2.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}