add kernel modules, comments, and re-arrange

This commit is contained in:
iFargle 2023-08-21 13:21:01 +09:00
parent db5eaad404
commit 1e298cbb0d
7 changed files with 16 additions and 33 deletions

View file

@ -1,10 +1,13 @@
{ config, pkgs, hostname, ... }: { { config, pkgs, hostname, ... }: {
imports = [ imports = [
# Hyprland
# ./hyprland-conf.nix # ./hyprland-conf.nix
# ./waybar-conf.nix # ./waybar-conf.nix
# ./rofi-conf.nix # ./rofi-conf.nix
# ./mako-conf.nix # ./mako-conf.nix
# ./swaylock-conf.nix # ./swaylock-conf.nix
# Gnome
./gnome-dconf.nix ./gnome-dconf.nix
]; ];
} }

View file

@ -9,6 +9,7 @@
../../../modules/powertop.nix ../../../modules/powertop.nix
]; ];
# https://nixos.wiki/wiki/Gamemode
programs.gamemode = { programs.gamemode = {
enable = true; enable = true;
settings = { settings = {
@ -57,13 +58,14 @@
open = false; open = false;
dynamicBoost.enable = true; dynamicBoost.enable = true;
nvidiaPersistenced = false; nvidiaPersistenced = false;
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.latest;
powerManagement.finegrained = true; powerManagement.finegrained = true;
powerManagement.enable = true; powerManagement.enable = true;
nvidiaSettings = true; nvidiaSettings = true;
modesetting.enable = true; modesetting.enable = true;
prime = { prime = {
reverseSync.enable = true; reverseSync.enable = false;
sync.enable = false;
offload = { offload = {
enable = true; enable = true;
enableOffloadCmd = true; enableOffloadCmd = true;
@ -74,13 +76,6 @@
}; };
}; };
# environment.variables = {
# GBM_BACKEND = "nvidia-drm";
# LIBVA_DRIVER_NAME = "nvidia";
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
# };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Fingerprint software # Fingerprint software
fprintd fprintd
@ -90,16 +85,10 @@
vulkan-tools vulkan-tools
gwe gwe
nvtop-nvidia nvtop-nvidia
# Game related things # Game related things
gamemode gamemode
# support both 32- and 64-bit applications
wineWowPackages.stable wineWowPackages.stable
# wine-staging (version with experimental features)
# wineWowPackages.staging
# winetricks (all versions)
winetricks winetricks
# native wayland support (unstable)
wineWowPackages.waylandFull wineWowPackages.waylandFull
]; ];
} }

View file

@ -2,7 +2,5 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./configuration.nix ./configuration.nix
./networking.nix
]; ];
} }

View file

@ -2,9 +2,9 @@
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ "acpi_backlight=native" ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" "acpi_call" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/ROOT"; device = "/dev/disk/by-label/ROOT";
@ -34,6 +34,6 @@
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,3 +0,0 @@
{ config, pkgs, ... }: {
}

View file

@ -1,9 +1,5 @@
{pkgs, config, hostname, ...}: { {pkgs, config, hostname, ...}: {
# Enable networking # Enable networking with NM and automatically allow port 22 over Tailscale
# Imports for host-specific configs:
imports = [
../hosts/${hostname}/nixos/networking.nix
];
networking = { networking = {
networkmanager = { networkmanager = {

View file

@ -7,9 +7,9 @@
autoUpgrade = { autoUpgrade = {
enable = true; enable = true;
allowReboot = false; allowReboot = false;
# channel = https://channels.nixos.org/nixos-23.05; dates = "daily";
# https://search.nixos.org/options?channel=unstable&show=system.autoUpgrade.flake&from=0&size=50&sort=relevance&type=packages&query=Autoupgrade flake = "path:/etc/nixos/flake.nix";
flake = "path:/etc/nixos/flake.nix"; # Should be /etc/nixos/flake.nix option = "switch";
}; };
}; };