summaryrefslogtreecommitdiff
path: root/config/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'config/hardware')
-rw-r--r--config/hardware/default.nix18
-rw-r--r--config/hardware/hardware-configuration.nix46
2 files changed, 64 insertions, 0 deletions
diff --git a/config/hardware/default.nix b/config/hardware/default.nix
new file mode 100644
index 0000000..aa11a7b
--- /dev/null
+++ b/config/hardware/default.nix
@@ -0,0 +1,18 @@
+{ nixos-hardware, ... }:
+
+{
+ imports = [
+ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+
+ # Community-curated hardware configuration
+ # nixos-hardware.nixosModules.common-cpu-intel
+ # nixos-hardware.nixosModules.common-pc
+ # nixos-hardware.nixosModules.common-pc-ssd
+ ];
+
+ personal.hardware = {
+ disks.crypted = "/dev/disk/by-uuid/1f453b74-3b03-4992-9d84-97a8208372d1";
+ keyboard.keyMap = "fr";
+ };
+}
diff --git a/config/hardware/hardware-configuration.nix b/config/hardware/hardware-configuration.nix
new file mode 100644
index 0000000..e92068e
--- /dev/null
+++ b/config/hardware/hardware-configuration.nix
@@ -0,0 +1,46 @@
+{
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}:
+
+{
+ imports = [
+ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [
+ "xhci_pci"
+ "ahci"
+ "nvme"
+ "usbhid"
+ "usb_storage"
+ "sd_mod"
+ ];
+ boot.initrd.kernelModules = [ "dm-snapshot" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" = {
+ device = "/dev/mapper/nixos-root";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/DA86-17BF";
+ fsType = "vfat";
+ options = [
+ "fmask=0022"
+ "dmask=0022"
+ ];
+ };
+
+ swapDevices = [
+ { device = "/dev/mapper/nixos-swap"; }
+ ];
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}