nix/nixos/hosts/nixos-desktop/default.nix

87 lines
2.3 KiB
Nix
Raw Normal View History

2024-01-31 04:31:01 +01:00
{ inputs, config, lib, pkgs, modulesPath, desktop, hostname, username, system, ... }: {
2023-10-08 12:21:29 +02:00
imports = [
./disks.nix
2023-12-31 15:23:43 +01:00
../../common/modules/secureboot.nix
2023-12-31 14:51:01 +01:00
../../common/modules/ssh-luks.nix
2023-12-27 10:27:55 +01:00
../../common/services/openrazer.nix
2023-12-31 15:08:40 +01:00
../../common/services/podman.nix
2024-01-12 08:50:43 +01:00
../../common/services/tailscale-autoconnect.nix
2023-10-08 12:21:29 +02:00
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "acpi_call" ];
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
networking.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.keyboard.zsa.enable = true;
2023-10-08 12:21:29 +02:00
# Set your time zone.
time.timeZone = "Asia/Tokyo";
# Set the networking hostname:
networking.hostName = "nixos-desktop";
2024-01-07 10:50:39 +01:00
2024-01-07 10:50:15 +01:00
programs.gamemode = {
enable = true;
enableRenice = true;
settings = {
general = {
renice = 10;
};
# Warning: GPU optimisations have the potential to damage hardware
gpu = {
# apply_gpu_optimisations = "accept-responsibility";
gpu_device = 0;
amd_performance_level = "high";
};
custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
2024-01-07 10:50:39 +01:00
};
2023-10-08 12:21:29 +02:00
hardware = {
opengl = {
enable = true;
driSupport32Bit = true;
driSupport = true;
};
nvidia = {
open = false;
nvidiaSettings = true;
modesetting.enable = true;
2024-01-07 11:35:29 +01:00
package = config.boot.kernelPackages.nvidiaPackages.production; # (installs 535)
2023-10-08 12:21:29 +02:00
};
};
environment.systemPackages = [
# deployments and development environments
2024-01-31 04:31:01 +01:00
inputs.deploy-rs.packages.${system}.deploy-rs
pkgs.distrobox
2023-10-08 12:21:29 +02:00
# nVidia gpu options
pkgs.gwe
pkgs.nvtop-nvidia
2023-10-08 12:21:29 +02:00
# WINE
2024-01-01 05:25:08 +01:00
# support 32-bit only
2024-01-01 05:25:28 +01:00
pkgs.wine
2024-01-01 05:25:08 +01:00
# support 64-bit only
2024-01-01 05:25:28 +01:00
(pkgs.wine.override { wineBuild = "wine64"; })
2024-01-01 05:25:08 +01:00
pkgs.wineWowPackages.staging
pkgs.winetricks
pkgs.wineWowPackages.waylandFull
2023-12-27 10:27:55 +01:00
# RGB stuff
pkgs.openrgb-with-all-plugins
2024-01-04 03:39:19 +01:00
# Other
pkgs.android-udev-rules
2023-10-08 12:21:29 +02:00
];
2023-12-31 14:59:25 +01:00
2023-10-08 12:21:29 +02:00
}