Update nixos system config

This commit is contained in:
Yan Lin 2025-09-13 09:17:43 +02:00
parent c85ea77b73
commit c674f26e69
5 changed files with 57 additions and 49 deletions

View file

@ -1,28 +1,41 @@
# This file will be auto-generated by nixos-generate-config during installation
# It will contain the hardware scan results specific to your ThinkPad P14s Gen 2
#
# DO NOT EDIT this file manually before installation!
# Run 'nixos-generate-config --show-hardware-config' on the target machine
# to generate the actual hardware configuration.
# 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 = [ ];
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
# This will be populated automatically during installation
boot.initrd.availableKernelModules = [ ];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# Filesystem configuration will be added here by nixos-generate-config
# based on your actual disk partitioning
fileSystems."/" =
{ device = "/dev/disk/by-uuid/97aa0a15-1b4a-43b6-b424-65d1926cec73";
fsType = "ext4";
};
# Swap configuration (if applicable) will be added here
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7C9B-24EC";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
# CPU and platform configuration will be detected and added here
swapDevices = [
{ device = "/dev/disk/by-partlabel/disk-main-swap"; }
];
# The NixOS release version will be set here
system.stateVersion = "24.05";
}
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}