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 13:06:50 +02:00
|
|
|
../../common/modules/secureboot.nix
|
2024-07-27 04:25:41 +02:00
|
|
|
# ../../common/modules/yubikey-auth.nix
|
2024-07-27 13:06:50 +02:00
|
|
|
# ../../common/modules/boot.nix
|
2024-07-28 02:14:59 +02: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
|
2024-07-27 13:11:30 +02:00
|
|
|
../../common/modules/builder.nix
|
2024-11-18 20:48:16 +01:00
|
|
|
../../common/services/geoclue.nix
|
2024-11-21 23:21:53 +01:00
|
|
|
../../common/services/syncthing.nix
|
2023-10-08 12:21:29 +02:00
|
|
|
];
|
|
|
|
|
2024-12-17 22:58:58 +01:00
|
|
|
services.ollama.acceleration = "cuda";
|
2024-07-28 15:31:25 +02:00
|
|
|
#### TEMPORARY TODO ####
|
2024-07-30 15:22:49 +02:00
|
|
|
environment.variables = {
|
2024-08-10 07:43:26 +02:00
|
|
|
MOZ_ENABLE_WAYLAND = 1;
|
|
|
|
NIXOS_OZONE_WL = "1";
|
|
|
|
# __GL_YIELD = "usleep";
|
|
|
|
# KWIN_TRIPLE_BUFFER = 1;
|
2024-07-30 15:22:49 +02:00
|
|
|
|
|
|
|
};
|
2024-07-28 15:31:25 +02:00
|
|
|
|
|
|
|
services.displayManager.sddm = {
|
|
|
|
wayland.enable = true;
|
|
|
|
wayland.compositor = "kwin";
|
|
|
|
enableHidpi = true;
|
|
|
|
};
|
2024-09-25 03:44:36 +02:00
|
|
|
hardware.keyboard.zsa.enable = true;
|
2024-07-28 15:31:25 +02:00
|
|
|
|
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;
|
2024-09-07 05:03:57 +02:00
|
|
|
|
2023-10-08 12:21:29 +02:00
|
|
|
# Set the networking hostname:
|
|
|
|
networking.hostName = "nixos-desktop";
|
2024-01-07 10:50:39 +01:00
|
|
|
|
2024-07-27 05:48:09 +02:00
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
2024-07-27 14:39:39 +02:00
|
|
|
services.hardware = {
|
2024-07-27 14:28:15 +02:00
|
|
|
openrgb = {
|
|
|
|
enable = true;
|
|
|
|
motherboard = "intel";
|
|
|
|
};
|
2024-07-27 14:39:39 +02:00
|
|
|
};
|
2024-07-27 14:28:15 +02:00
|
|
|
|
2024-07-27 14:39:39 +02:00
|
|
|
hardware = {
|
2024-12-03 19:29:00 +01:00
|
|
|
graphics = {
|
2024-06-24 05:55:17 +02:00
|
|
|
enable = true;
|
|
|
|
};
|
2024-07-30 15:22:49 +02:00
|
|
|
nvidia = {
|
|
|
|
modesetting.enable = true;
|
|
|
|
forceFullCompositionPipeline = true;
|
|
|
|
nvidiaSettings = true;
|
|
|
|
open = false;
|
|
|
|
};
|
2024-07-28 15:32:36 +02:00
|
|
|
};
|
2024-08-15 02:25:27 +02:00
|
|
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
|
|
|
version = "555.58";
|
|
|
|
sha256_64bit = "sha256-bXvcXkg2kQZuCNKRZM5QoTaTjF4l2TtrsKUvyicj5ew=";
|
|
|
|
sha256_aarch64 = "sha256-7XswQwW1iFP4ji5mbRQ6PVEhD4SGWpjUJe1o8zoXYRE=";
|
|
|
|
openSha256 = "sha256-hEAmFISMuXm8tbsrB+WiUcEFuSGRNZ37aKWvf0WJ2/c=";
|
|
|
|
settingsSha256 = "sha256-vWnrXlBCb3K5uVkDFmJDVq51wrCoqgPF03lSjZOuU8M=";
|
|
|
|
persistencedSha256 = "sha256-lyYxDuGDTMdGxX3CaiWUh1IQuQlkI2hPEs5LI20vEVw=";
|
2024-10-20 13:36:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
programs.gamemode = {
|
|
|
|
enable = true;
|
|
|
|
enableRenice = true;
|
|
|
|
settings = {
|
|
|
|
general = {
|
|
|
|
renice = 10;
|
|
|
|
};
|
|
|
|
custom = {
|
|
|
|
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
|
|
|
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
|
|
|
};
|
|
|
|
};
|
2024-08-15 02:25:27 +02:00
|
|
|
};
|
2024-06-24 05:55:17 +02:00
|
|
|
|
2023-12-27 05:13:32 +01:00
|
|
|
environment.systemPackages = [
|
|
|
|
# deployments and development environments
|
2024-01-31 04:31:01 +01:00
|
|
|
inputs.deploy-rs.packages.${system}.deploy-rs
|
2023-12-27 05:13:32 +01:00
|
|
|
pkgs.distrobox
|
|
|
|
|
2023-10-08 12:21:29 +02:00
|
|
|
# nVidia gpu options
|
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-07-30 03:38:17 +02:00
|
|
|
(
|
|
|
|
pkgs.wine.override { wineBuild = "wine64"; }
|
|
|
|
)
|
2024-01-01 05:25:08 +01:00
|
|
|
pkgs.wineWowPackages.staging
|
2023-12-27 05:13:32 +01:00
|
|
|
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
|
|
|
];
|
2024-10-05 10:10:56 +02:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
logseq = prev.logseq.overrideAttrs (oldAttrs: {
|
|
|
|
postFixup = ''
|
|
|
|
makeWrapper ${prev.electron_27}/bin/electron $out/bin/${oldAttrs.pname} \
|
|
|
|
--add-flags $out/share/${oldAttrs.pname}/resources/app \
|
|
|
|
--add-flags "--use-gl=desktop" \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${prev.lib.makeLibraryPath [ prev.stdenv.cc.cc.lib ]}"
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
})
|
|
|
|
];
|
2023-10-08 12:21:29 +02:00
|
|
|
}
|