refactor
This commit is contained in:
@@ -5,126 +5,20 @@
|
||||
imports = [ ../../nixos/custom.nix ./hardware-configuration.nix ];
|
||||
|
||||
fileSystems."/".options = [ "ssd" "noatime" "compress=zstd" ];
|
||||
|
||||
swapDevices = [{
|
||||
device = "/swapfile";
|
||||
size = 4 * 1024; # Creates an 4GB swap file
|
||||
size = 4 * 1024;
|
||||
randomEncryption.enable = true;
|
||||
}];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# TODO: fix conflicted configurations
|
||||
|
||||
# This runs only intel/amdgpu igpus and nvidia dgpus do not drain power.
|
||||
|
||||
##### disable nvidia, very nice battery life.
|
||||
# boot.extraModprobeConfig = ''
|
||||
# blacklist nouveau
|
||||
# options nouveau modeset=0
|
||||
# '';
|
||||
|
||||
# services.udev.extraRules = ''
|
||||
# # Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
|
||||
# # Remove NVIDIA USB Type-C UCSI devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
|
||||
# # Remove NVIDIA Audio devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
|
||||
# # Remove NVIDIA VGA/3D controller devices
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# '';
|
||||
|
||||
services.thermald.enable = true;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
services.auto-cpufreq = { enable = true; };
|
||||
|
||||
# boot.blacklistedKernelModules =
|
||||
# [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
|
||||
|
||||
# TODO: try to connect proxy on all system
|
||||
|
||||
networking.networkmanager = { enable = true; };
|
||||
|
||||
time.timeZone = "Europe/Moscow";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "ru_RU.UTF-8";
|
||||
LC_IDENTIFICATION = "ru_RU.UTF-8";
|
||||
LC_MEASUREMENT = "ru_RU.UTF-8";
|
||||
LC_MONETARY = "ru_RU.UTF-8";
|
||||
LC_NAME = "ru_RU.UTF-8";
|
||||
LC_NUMERIC = "ru_RU.UTF-8";
|
||||
LC_PAPER = "ru_RU.UTF-8";
|
||||
LC_TELEPHONE = "ru_RU.UTF-8";
|
||||
LC_TIME = "ru_RU.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "us,ru";
|
||||
variant = "";
|
||||
options = "grp:win_space_toggle";
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
users.users.krosh = {
|
||||
isNormalUser = true;
|
||||
description = "krosh";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
# xwayland.enable = true; # Xwayland can be disabled.
|
||||
};
|
||||
services.auto-cpufreq = { enable = true; }; # !!!
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
services.xserver.videoDrivers = [ "modesetting" "nvidia" ];
|
||||
# hardware.nvidia.open = true;
|
||||
hardware.nvidia = {
|
||||
open = true;
|
||||
modesetting.enable = true; # полезно и для Wayland/tearing
|
||||
# prime = {
|
||||
# offload.enable = true;
|
||||
# offload.enableOffloadCmd = true; # добавит скрипт `nvidia-offload`
|
||||
|
||||
# # intelBusId = "PCI:0:2:0"; # <-- подставь свои
|
||||
# # nvidiaBusId = "PCI:1:0:0"; # <-- подставь свои
|
||||
# };
|
||||
modesetting.enable = true;
|
||||
};
|
||||
|
||||
programs.uwsm.enable = true;
|
||||
|
||||
users.users.krosh.shell = pkgs.zsh;
|
||||
|
||||
security.polkit.enable = true;
|
||||
# hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user