nixos/config/desktop.nix
2026-05-10 00:14:45 +01:00

256 lines
5.9 KiB
Nix

{ pkgs, inputs, ... }:
{
#system.includeBuildDependencies = true; # THIS CAN'T BE INCLUDED IN COMMON YET BECAUSE SERVER DOES NOT HAVE ENOUGH STORAGE
hardware.graphics = {
enable = true;
};
qt.style = "adwaita-dark";
qt.platformTheme = "gnome";
#hyprland
services.displayManager.gdm.enable = true; # use sddm until gnome 50 due to https://github.com/systemd/systemd/issues/39259
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
# Enable CUPS to print documents.
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
services.tailscale.enable = true;
services.printing.drivers = [ pkgs.brlaser pkgs.brgenml1lpr pkgs.brgenml1cupswrapper ];
# Enable automatic login for the user.
# services.displayManager.autoLogin.enable = true;
# services.displayManager.autoLogin.user = "admin";
# services.gnome.gnome-keyring.enable = true;
# security.pam.services.gdm.enableGnomeKeyring = true; #unlock PAM
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
#services.xserver.desktopManager.retroarch.extraArgs = [
# "--config=/mnt/services/emulators/retroarch/retroarch.cfg"
#];
services.ollama = {
enable = true;
acceleration = "cuda";
openFirewall = true;
host = "0.0.0.0";
# Optional: preload models, see https://ollama.com/library
loadModels = [ "gemma4" ];
package = pkgs.unstable.ollama;
};
programs.chromium = {
enable = true;
homepageLocation = "https://dashboard.mektem.com";
extraOpts = {
"SpellcheckEnabled" = true;
"BrowserThemeColor" = "#100f0f";
};
};
hardware.keyboard.qmk.enable = true;
boot = {
# Graphical boot
plymouth.enable = true;
# Allow higher virtual memory for games
kernel.sysctl."vm.max_map_count" = 2147483642;
initrd.systemd.enable = true; # LUKS login prompt
consoleLogLevel = 3;
initrd.verbose = false;
kernelParams = [
"quiet"
"udev.log_level=3"
"systemd.show_status=auto"
"rd.udev.log_level=3"
];
};
#services.udev.packages = [ pkgs.via ];
nixpkgs.overlays = [
(final: _: {
# this allows you to access `pkgs.unstable` anywhere in your config
unstable = import inputs.nixpkgs-unstable {
inherit (final.stdenv.hostPlatform) system;
inherit (final) config;
};
})
];
services.mullvad-vpn.enable = true;
environment.systemPackages = with pkgs; [
audacity
brave
blender
orca-slicer
firefox
gimp
inkscape
bitwarden-desktop
bitwarden-cli
kiwix
libreoffice
obs-studio
obsidian
unstable.proton-authenticator
unstable.protonmail-desktop
unstable.proton-vpn
prismlauncher
unstable.signal-desktop
freecad
tor-browser
wireshark
monero-gui
moonlight-qt
nvtopPackages.nvidia
dconf-editor
via
kdePackages.kdenlive
easyeffects
element-desktop
chirp
scrcpy
veracrypt
lmms
restic-browser
# games
webcord
heroic
lutris
cataclysm-dda
runelite
zeroad
unciv
endless-sky
wesnoth
mindustry
openrct2
openttd
xonotic
osu-lazer-bin
ufoai
ludusavi # steam backup
# game utils
mangohud
umu-launcher
# emu
ryubing
xemu
xenia-canary
#retroarch-full
rpcs3
dolphin-emu
cemu
# backup
keepassxc
];
fonts.fontconfig = {
antialias = true;
cache32Bit = true;
hinting.enable = true;
hinting.autohint = true;
};
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
package = pkgs.sunshine.override {
cudaSupport = true;
};
};
programs = {
adb.enable = true;
localsend = {
enable = true;
openFirewall = true;
};
coolercontrol = {
enable = true;
};
gamescope = {
enable = true;
capSysNice = true;
};
steam = {
enable = true;
gamescopeSession.enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
gamemode.enable = true;
};
fileSystems."/mnt/media" = {
device = "//192.168.0.30/media";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/etc/nixos/smb-credentials,uid=1000,gid=1000"];
};
fileSystems."/mnt/services" = {
device = "//192.168.0.30/services";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/etc/nixos/smb-credentials,uid=1000,gid=1000"];
};
fileSystems."/mnt/data" = {
device = "//192.168.0.30/data";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in ["${automount_opts},credentials=/etc/nixos/smb-credentials,uid=1000,gid=1000"];
};
programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["admin"];
virtualisation.libvirtd = {
enable = true;
qemu.swtpm.enable = true;
};
virtualisation.spiceUSBRedirection.enable = true;
#services.flatpak.enable = true;
}