summaryrefslogtreecommitdiff
path: root/config/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'config/hardware')
-rw-r--r--config/hardware/default.nix13
-rw-r--r--config/hardware/hardware-configuration.nix43
2 files changed, 56 insertions, 0 deletions
diff --git a/config/hardware/default.nix b/config/hardware/default.nix
new file mode 100644
index 0000000..a6219f8
--- /dev/null
+++ b/config/hardware/default.nix
@@ -0,0 +1,13 @@
+{ nixos-hardware, ... }: {
+ imports = [
+ ./hardware-configuration.nix
+ nixos-hardware.nixosModules.pcengines-apu
+ nixos-hardware.nixosModules.common-pc-ssd
+ nixos-hardware.nixosModules.common-cpu-amd
+ ];
+ personal.hardware = {
+ usb.enable = true;
+ firmwareNonFree.enable = true;
+ };
+ swapDevices = [{ device = "/swap"; }];
+}
diff --git a/config/hardware/hardware-configuration.nix b/config/hardware/hardware-configuration.nix
new file mode 100644
index 0000000..68cf8c9
--- /dev/null
+++ b/config/hardware/hardware-configuration.nix
@@ -0,0 +1,43 @@
+# 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" "ahci" "ehci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-amd" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/9e447187-fae1-466a-b37d-4de1fe240c6f";
+ fsType = "ext4";
+ };
+
+ boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/47e77d74-1aad-4d99-9aa7-568d8524b305";
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/b99733fc-3734-41d3-8fe5-2682714f319e";
+ fsType = "ext4";
+ };
+
+ 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.<interface>.useDHCP`.
+ networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}