Fix t420-laptop

This commit is contained in:
Alexander Bantyev 2022-10-04 13:21:57 +04:00
parent f7b853e549
commit a09d1fd32a
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
3 changed files with 33 additions and 15 deletions

View File

@ -1,4 +1,4 @@
{ inputs, ... }: { { inputs, lib, ... }: {
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [ imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [
./hardware-configuration.nix ./hardware-configuration.nix
inputs.self.nixosRoles.server inputs.self.nixosRoles.server
@ -19,6 +19,14 @@
system.stateVersion = "21.11"; system.stateVersion = "21.11";
boot.loader = {
systemd-boot.enable = lib.mkForce false;
grub = {
enable = lib.mkForce true;
device = "/dev/sda";
};
};
deviceSpecific.devInfo = { deviceSpecific.devInfo = {
legacy = true; legacy = true;
cpu = { cpu = {

View File

@ -4,27 +4,35 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ];
[ "ehci_pci" "ahci" "uas" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/d3a1bd83-db4d-4e98-9231-b7c7f19a2cfc"; { device = "/dev/disk/by-uuid/1364826d-5333-4ec9-93cf-aba2925e41d0";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = { fileSystems."/var/lib" =
device = "/dev/disk/by-uuid/D36A-068D"; { device = "/dev/disk/by-uuid/e4122adb-3f73-44b5-8763-7fb91e9a52e7";
fsType = "vfat"; fsType = "ext4";
}; };
swapDevices = [ ]; swapDevices = [ ];
nix.settings.max-jobs = lib.mkDefault 4; # 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.enp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; # nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
nix.settings.max-jobs = 4;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -10,6 +10,8 @@
XCOMPOSEFILE = "${config.home-manager.users.balsoft.xdg.configHome}/XCompose"; XCOMPOSEFILE = "${config.home-manager.users.balsoft.xdg.configHome}/XCompose";
}; };
i18n.defaultLocale = "en_GB.UTF-8";
time.timeZone = "Asia/Tbilisi"; time.timeZone = "Asia/Tbilisi";
home-manager.users.balsoft = { home-manager.users.balsoft = {
home.file.".XCompose".source = ./compose; home.file.".XCompose".source = ./compose;