From e0259412d09499f30fdf7b3c579667313a991fa7 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sat, 18 Mar 2023 13:34:13 +0100 Subject: initial commit --- config/hardware/default.nix | 13 +++++++++ config/hardware/hardware-configuration.nix | 43 ++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 config/hardware/default.nix create mode 100644 config/hardware/hardware-configuration.nix (limited to 'config/hardware') 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..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; +} -- cgit v1.2.3