diff --git a/machines/WinMax2/hardware-configuration.nix b/machines/WinMax2/hardware-configuration.nix index de48c2d..9f4145d 100755 --- a/machines/WinMax2/hardware-configuration.nix +++ b/machines/WinMax2/hardware-configuration.nix @@ -1,16 +1,25 @@ # 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, ... }: +{ config, lib, flakeSelf, modulesPath, ... }: let # \x20 is the escape code for a space ssdLabel = ''Win\\x20Max\\x202\\x20SSD''; + + # You need to do fucky shit to import modules from the NUR + # https://github.com/nix-community/NUR#using-the-flake-in-nixos + nur = import flakeSelf.inputs.nur { + nurpkgs = import flakeSelf.inputs.nixpkgs-unstable-raw { + system = "x86_64-linux"; + }; + }; in { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + nur.repos.cryolitia.modules.bmi260 ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "sdhci_pci" ]; @@ -66,5 +75,8 @@ in swapDevices = [ ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware = { + cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + sensor.iio.bmi260.enable = true; + }; } diff --git a/roles/common/configuration.nix b/roles/common/configuration.nix index 99e8e1c..8809576 100755 --- a/roles/common/configuration.nix +++ b/roles/common/configuration.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, flakeSelf, ... }: { + imports = [ flakeSelf.inputs.nur.nixosModules.nur ]; environment = { # As of the 1st of May 2023, the default packages are nano, perl, rsync and strace # I don't need any of them, so I just empty the list