summaryrefslogtreecommitdiff
path: root/config/hardware
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2026-02-28 22:40:11 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2026-02-28 22:40:11 +0100
commit2ed1c3bb4b33d8ecec53256334d24506b5ad8e04 (patch)
tree87f2934a4b1dd3fb2d31a2e522866c74c7428adb /config/hardware
parent43e91c264ac91eddc02d92e2650a7f71f1074d2c (diff)
change hardwareHEADmaster
Diffstat (limited to 'config/hardware')
-rw-r--r--config/hardware/default.nix17
-rw-r--r--config/hardware/hardware-configuration.nix39
2 files changed, 27 insertions, 29 deletions
diff --git a/config/hardware/default.nix b/config/hardware/default.nix
index 26f503e..4c03d09 100644
--- a/config/hardware/default.nix
+++ b/config/hardware/default.nix
@@ -3,9 +3,9 @@
pkgs,
...
}:
-# usage:
-# blankscreen {force, poke}
let
+ # usage:
+ # blankscreen {force, poke}
blankscreen = "echo 0 > /sys/class/backlight/intel_backlight/brightness; setterm -term linux -blank </dev/tty1";
in
{
@@ -14,24 +14,19 @@ in
./hardware-configuration.nix
# Community-curated hardware configuration
- nixos-hardware.nixosModules.lenovo-thinkpad-x1-9th-gen # includes intel cpu and ssd
+ nixos-hardware.nixosModules.common-cpu-intel
+ nixos-hardware.nixosModules.common-pc
+ nixos-hardware.nixosModules.common-pc-ssd
];
personal.hardware = {
usb.enable = false;
- disks.crypted = "/dev/disk/by-uuid/b7a3424f-d8cd-4985-829c-224bf0f0842a";
+ disks.crypted = "/dev/disk/by-uuid/29fa7cc7-e8ca-4f9f-bd3d-46475ede48e2";
firmwareNonFree.enable = true;
keyboard.keyMap = "fr";
sound.enable = false;
};
- services.logind.settings.Login = {
- # don't suspend on lid close
- HandleLidSwitchDocked = "ignore";
- HandleLidSwitchExternalPower = "ignore";
- HandleLidSwitch = "ignore";
- };
-
environment.shellAliases = { inherit blankscreen; };
systemd = {
suppressedSystemUnits = [ "systemd-backlight@.service" ];
diff --git a/config/hardware/hardware-configuration.nix b/config/hardware/hardware-configuration.nix
index b752734..e2287cf 100644
--- a/config/hardware/hardware-configuration.nix
+++ b/config/hardware/hardware-configuration.nix
@@ -1,42 +1,45 @@
-# 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,
modulesPath,
...
-}: {
+}:
+
+{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
- boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
- boot.initrd.kernelModules = ["dm-snapshot"];
- boot.kernelModules = ["kvm-intel"];
- boot.extraModulePackages = [];
+ boot.initrd.availableKernelModules = [
+ "xhci_pci"
+ "ahci"
+ "usbhid"
+ "usb_storage"
+ "sd_mod"
+ "rtsx_pci_sdmmc"
+ ];
+ boot.initrd.kernelModules = [ "dm-snapshot" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
fileSystems."/" = {
- device = "/dev/disk/by-uuid/4fee0db4-0f9b-4b83-9dca-94f4576a1603";
+ device = "/dev/mapper/nixos-root";
fsType = "ext4";
};
fileSystems."/boot" = {
- device = "/dev/disk/by-uuid/ED9D-FCDE";
+ device = "/dev/disk/by-uuid/766A-3450";
fsType = "vfat";
+ options = [
+ "fmask=0022"
+ "dmask=0022"
+ ];
};
swapDevices = [
- {device = "/dev/disk/by-uuid/646b3fd3-a52e-49c3-9ffa-511adca82458";}
+ { device = "/dev/mapper/nixos-swap"; }
];
- # 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.wlp0s20f3.useDHCP = lib.mkDefault true;
-
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}