Adding the rest of the hardware files

This commit is contained in:
Lyes Saadi 2024-05-04 22:20:24 +02:00
parent a013933c1a
commit 01f3c697d3
No known key found for this signature in database
GPG key ID: 17418538BAA17767
3 changed files with 60 additions and 3 deletions

View file

@ -16,9 +16,8 @@
modules = [ modules = [
./configuration/configuration.nix ./configuration/configuration.nix
nix-flatpak.nixosModules.nix-flatpak nix-flatpak.nixosModules.nix-flatpak
./hardware/lyes-pc.nix ./hardware/lyes-pc/configuration.nix
nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4 nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen4
/etc/nixos/hardware-configuration.nix
]; ];
}; };
}; };

View file

@ -1,6 +1,10 @@
{ config, pkgs, ... }: { ... }:
{ {
imports = [
./hardware-configuration.nix
];
# Optimisation # Optimisation
# nixpkgs.hostPlatform = { # nixpkgs.hostPlatform = {

View file

@ -0,0 +1,54 @@
# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2a1aab81-a8df-4781-8946-f00ac1d48db7";
fsType = "btrfs";
options = [ "subvol=nixos_root" ];
};
boot.initrd.luks.devices."luks-8d74423e-0529-46e3-87b9-b948c568a6c3".device = "/dev/disk/by-uuid/8d74423e-0529-46e3-87b9-b948c568a6c3";
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/2a1aab81-a8df-4781-8946-f00ac1d48db7";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/2a1aab81-a8df-4781-8946-f00ac1d48db7";
fsType = "btrfs";
options = [ "subvol=nixos_nix" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/94CB-9035";
fsType = "vfat";
};
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.wlp9s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
}