|
42 | 42 | } |
43 | 43 | } |
44 | 44 | ''; |
| 45 | + |
| 46 | + # Session-startup launcher: open the local Coder dashboard in Firefox. |
| 47 | + # Wired up as an XDG autostart entry (see environment.etc below) on the |
| 48 | + # INSTALLED box only — the installer ISO disables it (installer/iso.nix), and |
| 49 | + # its coder-redirect/coder services are off there anyway. coder-redirect binds |
| 50 | + # :80 only AFTER it has discovered the *.try.coder.app tunnel URL and serves a |
| 51 | + # 302 to it, so opening http://127.0.0.1 before then would just show a |
| 52 | + # connection-refused page. Poll :80 (up to ~2 min) before launching so the |
| 53 | + # first paint is the dashboard, not an error. `firefox` resolves from the |
| 54 | + # session PATH (the wrapped build that programs.firefox.enable installs). |
| 55 | + openDashboard = pkgs.writeShellScript "coder-box-open-dashboard" '' |
| 56 | + export PATH=/run/current-system/sw/bin:$PATH |
| 57 | + for _ in $(seq 1 60); do |
| 58 | + if ${pkgs.curl}/bin/curl -s -o /dev/null --max-time 2 http://127.0.0.1; then |
| 59 | + break |
| 60 | + fi |
| 61 | + sleep 2 |
| 62 | + done |
| 63 | + exec firefox http://127.0.0.1 |
| 64 | + ''; |
45 | 65 | in |
46 | 66 | { |
47 | 67 | # Per-host modules (hardware detection via facter, disk layout via disko, |
|
141 | 161 | # LAN and a *.try.coder.app tunnel. Suspending or hibernating drops the |
142 | 162 | # NIC, so the machine silently falls off the network (no mDNS, no SSH, |
143 | 163 | # tunnel dies) until someone physically wakes it. The shipped image runs a |
144 | | - # KDE desktop, which exposes Sleep/Hibernate actions, and a stray |
| 164 | + # GNOME desktop, which exposes Sleep/Hibernate actions, and a stray |
145 | 165 | # `systemctl suspend` / `systemctl hibernate` (or the matching D-Bus call) |
146 | 166 | # would do the same. Mask the suspend, hibernate, and hybrid-sleep targets |
147 | 167 | # so all of those paths become a no-op. |
|
199 | 219 | LC_TIME = "en_US.UTF-8"; |
200 | 220 | }; |
201 | 221 |
|
202 | | - # ── Desktop: KDE Plasma 6 ───────────────────────────────────────────────── |
| 222 | + # ── Desktop: GNOME ──────────────────────────────────────────────────────── |
| 223 | + # GNOME 49 (the version in the pinned nixpkgs-25.11) is Wayland-only: the |
| 224 | + # GNOME-on-Xorg session was dropped upstream (gnome-session now advertises |
| 225 | + # `providedSessions = [ "gnome" ]` — no `gnome-xorg`), so there is no X11 |
| 226 | + # GNOME session to fall back to. GDM runs on Wayland by default and we keep |
| 227 | + # it that way; there is therefore no `defaultSession`/`wayland.enable` |
| 228 | + # plumbing as the SDDM/Plasma config (KDE Plasma 6 on Xorg) had before it. |
| 229 | + # `services.xserver.enable` is still set so XWayland is available for legacy |
| 230 | + # X11 clients (e.g. the optional ScreenConnect agent — see screenconnect.nix). |
203 | 231 | services.xserver.enable = true; |
204 | | - services.displayManager.sddm.enable = true; |
205 | | - services.displayManager.sddm.wayland.enable = false; |
206 | | - services.displayManager.defaultSession = "plasmax11"; |
207 | | - services.desktopManager.plasma6.enable = true; |
| 232 | + services.displayManager.gdm.enable = true; |
| 233 | + services.desktopManager.gnome.enable = true; |
208 | 234 | services.xserver.xkb = { |
209 | 235 | layout = "us"; |
210 | 236 | variant = ""; |
211 | 237 | }; |
212 | 238 |
|
| 239 | + # ── Skip GNOME's first-run welcome experience ───────────────────────────── |
| 240 | + # Out of the box GNOME greets every new login with two things this appliance |
| 241 | + # doesn't want: |
| 242 | + # 1. gnome-tour — the "Welcome to NixOS / Take the Tour" dialog. GNOME |
| 243 | + # Shell auto-launches it from its .desktop file on first login (it ships |
| 244 | + # in the default GNOME package set), so the only way to suppress it is to |
| 245 | + # drop the package via environment.gnome.excludePackages. |
| 246 | + # 2. The Activities overview (the app/window grid) shown at session |
| 247 | + # startup. GNOME has no gsetting to disable this, so we ship the |
| 248 | + # "no-overview" Shell extension and enable it for the session, which |
| 249 | + # lands you on the bare desktop instead of the overview. |
| 250 | + # (the no-overview extension package is added to environment.systemPackages |
| 251 | + # in the shared package list below.) |
| 252 | + environment.gnome.excludePackages = [ pkgs.gnome-tour ]; |
| 253 | + programs.dconf.profiles.user.databases = [ |
| 254 | + { |
| 255 | + settings = { |
| 256 | + "org/gnome/shell".enabled-extensions = [ "no-overview@fthx" ]; |
| 257 | + |
| 258 | + # ── Pinned dash icons: match the old KDE Plasma 6 taskbar ─────────── |
| 259 | + # Plasma 6 shipped its Icons-Only Task Manager pre-pinned with three |
| 260 | + # launchers: System Settings, the file manager (Dolphin), and the web |
| 261 | + # browser (Firefox). Reproduce that exact set as the GNOME dash |
| 262 | + # favourites so the box looks the same after the KDE→GNOME switch. |
| 263 | + # GNOME's own NixOS default (Epiphany/Geary/Calendar/Music/Nautilus) |
| 264 | + # is mostly apps we don't even install, so override it outright. |
| 265 | + # System Settings → org.gnome.Settings (gnome-control-center) |
| 266 | + # Dolphin → org.gnome.Nautilus (GNOME Files) |
| 267 | + # Firefox → firefox |
| 268 | + "org/gnome/shell".favorite-apps = [ |
| 269 | + "org.gnome.Settings.desktop" |
| 270 | + "org.gnome.Nautilus.desktop" |
| 271 | + "firefox.desktop" |
| 272 | + ]; |
| 273 | + }; |
| 274 | + } |
| 275 | + ]; |
| 276 | + |
| 277 | + # ── Open the Coder dashboard on login ────────────────────────────────────── |
| 278 | + # On the installed box the coderbox user autologins into GNOME; open Firefox |
| 279 | + # on http://127.0.0.1 (the local coder-redirect → tunnel URL) at session |
| 280 | + # start so the dashboard is up and ready. See openDashboard in the let block |
| 281 | + # for the wait-for-:80 logic. The installer ISO overrides this away |
| 282 | + # (installer/iso.nix) since it has no running Coder stack. |
| 283 | + environment.etc."xdg/autostart/coder-box-open-dashboard.desktop".text = '' |
| 284 | + [Desktop Entry] |
| 285 | + Type=Application |
| 286 | + Name=Open Coder Dashboard |
| 287 | + Comment=Open the local Coder dashboard in Firefox on login |
| 288 | + Exec=${openDashboard} |
| 289 | + Terminal=false |
| 290 | + X-GNOME-Autostart-enabled=true |
| 291 | + OnlyShowIn=GNOME; |
| 292 | + ''; |
| 293 | + |
213 | 294 | # ── Audio ───────────────────────────────────────────────────────────────── |
214 | 295 | services.pulseaudio.enable = false; |
215 | 296 | security.rtkit.enable = true; |
|
301 | 382 | terraform |
302 | 383 | gh |
303 | 384 | vlc |
| 385 | + # GNOME Shell extension that suppresses the Activities overview shown at |
| 386 | + # session startup (enabled via programs.dconf above). See the Desktop block. |
| 387 | + gnomeExtensions.no-overview |
304 | 388 | ]; |
305 | 389 |
|
306 | 390 | nix.settings.experimental-features = [ |
|
0 commit comments