summaryrefslogtreecommitdiff
path: root/nixos/hosts/opus/default.nix
blob: 829086662317b61de663c749a30b1c017e701514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{ config, pkgs, inputs, ... }:

{
  imports = [
    # hardware-configuration.nix stays at the repo root for nixos-generate-config compat
    ../../hardware-configuration.nix

    # OS-level modules — no binary wrapped, just system concerns
    ../../modules/system/nix
    ../../modules/system/boot
    ../../modules/system/hardware
    ../../modules/system/locale
    ../../modules/system/users
    ../../modules/system/audio
    ../../modules/system/printing
    ../../modules/system/network
    ../../modules/system/services

    # Standalone features (apps with their own binaries)
    ../../modules/features/niri
    ../../modules/features/noctalia-greeter
    ../../modules/features/noctalia-shell
    ../../modules/features/nvidia
    ../../modules/features/appimage
    ../../modules/features/mpd
    ../../modules/features/swingmusic
    ../../modules/features/monitoring
    ../../modules/features/terminals
    ../../modules/features/cli-tools
    ../../modules/features/binary-compat
    ../../modules/features/editors
    ../../modules/features/file-managers
    ../../modules/features/wayland-tools
    ../../modules/features/audio-tools
    ../../modules/features/gst-codecs
    ../../modules/features/fonts
    ../../modules/features/desktop-apps
    ../../modules/features/dev-tools
    ../../modules/features/wireshark
    ../../modules/features/mouse
  ];

  # ────────────────────────────────────────────────────────────────────────
  # Desktop composition (was attrs/desktop)
  # Inline because this host is the only one using the full desktop stack.
  # ────────────────────────────────────────────────────────────────────────
  # Qt styling: use qt5ct to theme Qt apps consistently with the GTK desktop.
  qt = {
    enable = true;
    platformTheme = "qt5ct";
    style = "breeze";
  };
  # Desktop portals let Wayland clients request screenshots, file dialogs, etc.
  # These backends wire the GNOME + GTK portal implementations into the session.
  xdg.portal = {
    enable = true;
    extraPortals = [
      pkgs.xdg-desktop-portal-gnome
      pkgs.xdg-desktop-portal-gtk
    ];
  };

  # Qt/HiDPI and GPU renderer hints shared across the desktop.
  environment.sessionVariables = {
    XCURSOR_THEME = "Bibata-Modern-Ice";
    XCURSOR_SIZE = "20";
    CC = "clang";
    ELECTRON_OZONE_PLATFORM_HINT = "auto";
    GSK_RENDERER = "ngl";
    QT_QPA_PLATFORM = "wayland;xcb";
    QT_ENABLE_HIGHDPI_SCALING = "1";
    QT_AUTO_SCREEN_SCALE_FACTOR = "1";
    QT_SCREEN_SCALE_FACTORS = "1.5";
  };

  # ────────────────────────────────────────────────────────────────────────
  # Gaming composition (was attrs/gaming)
  # Host-only desktop apps that don't (yet) deserve their own feature module.
  # ────────────────────────────────────────────────────────────────────────
  # Steam: remote play and dedicated servers need open firewall ports.
  programs.steam = {
    enable = true;
    remotePlay.openFirewall = true;
    dedicatedServer.openFirewall = true;
  };
  # Throne: privacy-oriented game overlay / microtransactions blocker.
  programs.throne = {
    enable = true;
    tunMode.enable = true;
  };
  services.gnome.gnome-keyring.enable = true;
  # Wine-based launchers for Windows games & apps.
  environment.systemPackages = with pkgs; [
    pkgs.lutris
    pkgs.prismlauncher
    pkgs.bottles
  ];

  system.stateVersion = "26.05";
}