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;
}

View file

@ -1,7 +1,6 @@
{ config, pkgs, lib, ... }: {
imports = [
./hardware-configuration.nix
./disk-config.nix
];
# Bootloader - standard UEFI setup
@ -103,7 +102,7 @@
i18n.defaultLocale = "en_US.UTF-8";
# Sound configuration with PipeWire (better than PulseAudio)
hardware.pulseaudio.enable = false;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
@ -120,30 +119,30 @@
# Video drivers
videoDrivers = [ "modesetting" "nvidia" ];
# Display manager
displayManager.sddm = {
enable = true;
wayland.enable = true;
};
# Desktop environment
desktopManager.plasma6.enable = true;
# Keyboard layout
xkb = {
layout = "us";
variant = "";
};
# Touchpad configuration
libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
tapping = true;
disableWhileTyping = true;
accelProfile = "adaptive";
};
};
# Display manager
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
# Desktop environment
services.desktopManager.plasma6.enable = true;
# Touchpad configuration
services.libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
tapping = true;
disableWhileTyping = true;
accelProfile = "adaptive";
};
};
@ -250,11 +249,11 @@
home-manager
# KDE/Plasma utilities
kate
konsole
spectacle
filelight
ark
kdePackages.kate
kdePackages.konsole
kdePackages.spectacle
kdePackages.filelight
kdePackages.ark
# System utilities
pciutils
@ -293,4 +292,4 @@
# settings for stateful data, like file locations and database versions
# on your system were taken.
system.stateVersion = "24.05";
}
}