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

88 lines
2.4 KiB
Nix
Raw Normal View History

2024-04-04 14:22:50 +02:00
{ inputs, config, lib, pkgs, system, ... }: {
2023-10-08 12:21:29 +02:00
imports = [
./disks.nix
2024-07-27 04:25:41 +02:00
# ../../common/modules/secureboot.nix
# ../../common/modules/yubikey-auth.nix
../../common/modules/boot.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 = {
2024-06-24 05:55:17 +02:00
opengl = {
enable = true;
driSupport32Bit = true;
driSupport = true;
};
2023-10-08 12:21:29 +02:00
nvidia = {
open = false;
nvidiaSettings = true;
modesetting.enable = true;
2024-06-29 07:58:04 +02:00
package = config.boot.kernelPackages.nvidiaPackages.production; # (installs 550)
2023-10-08 12:21:29 +02:00
};
2024-06-23 09:10:56 +02:00
};
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
2024-06-12 12:15:32 +02:00
pkgs.nvtopPackages.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
];
}