From 8ac87f0b609b8f30b83382d1e4913ddc89e0893e Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Thu, 24 Sep 2026 09:13:19 +0000 Subject: Add Ghostty, GNOME Tweaks, and a GNOME dark-mode default Ghostty joins the cross-platform desktop app list (Linux-only in nixpkgs today, filtered out on darwin by the existing availableOn check). GNOME Tweaks is gated on osConfig.services.desktopManager.gnome.enable rather than plain isLinux, since modules/home/desktop-apps.nix is also consumed by the standalone, non-NixOS tom@linux home-manager profile, which has no GNOME involved. Every NixOS host now also gets a dconf default of org/gnome/desktop/interface color-scheme=prefer-dark, left unlocked so GNOME Settings can still switch back to light mode. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01HngxrvqEzq8oBEBDtrYJyB --- modules/home/desktop-apps.nix | 28 +++++++++++++++++++++++----- modules/nixos/common.nix | 13 ++++++++++++- 2 files changed, 35 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/home/desktop-apps.nix b/modules/home/desktop-apps.nix index 882ce34..a565c18 100644 --- a/modules/home/desktop-apps.nix +++ b/modules/home/desktop-apps.nix @@ -1,10 +1,28 @@ -{ pkgs, lib, ... }: +{ + pkgs, + lib, + osConfig ? null, + ... +}: let - crossPlatformApps = [ pkgs.slack pkgs.discord pkgs.spotify pkgs.firefox pkgs.bitwarden-desktop ]; + crossPlatformApps = [ + pkgs.slack + pkgs.discord + pkgs.spotify + pkgs.firefox + pkgs.bitwarden-desktop + pkgs.ghostty + ]; linuxOnlyApps = lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.teams-for-linux; - candidateApps = crossPlatformApps ++ linuxOnlyApps; + # GNOME Tweaks only makes sense where GNOME is actually enabled, which this + # flake only does at the NixOS level (modules/nixos/common.nix) - not on + # standalone, non-NixOS activations of this shared profile. osConfig is the + # full NixOS config and is only present when home-manager is integrated + # into a NixOS system; it's absent for standalone `home-manager switch`. + gnomeOnlyApps = lib.optional (osConfig.services.desktopManager.gnome.enable or false + ) pkgs.gnome-tweaks; + candidateApps = crossPlatformApps ++ linuxOnlyApps ++ gnomeOnlyApps; in { - home.packages = - builtins.filter (lib.meta.availableOn pkgs.stdenv.hostPlatform) candidateApps; + home.packages = builtins.filter (lib.meta.availableOn pkgs.stdenv.hostPlatform) candidateApps; } diff --git a/modules/nixos/common.nix b/modules/nixos/common.nix index 1b34e4e..a219850 100644 --- a/modules/nixos/common.nix +++ b/modules/nixos/common.nix @@ -1,6 +1,9 @@ { pkgs, lib, ... }: { - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; nix.gc = { automatic = true; @@ -43,6 +46,14 @@ services.displayManager.gdm.enable = true; services.desktopManager.gnome.enable = true; + # Defaults GNOME to dark mode without locking it - GNOME Settings' + # Appearance toggle still writes to the user's own dconf database, which + # is searched before this default database. + programs.dconf.enable = true; + programs.dconf.profiles.user.databases = [ + { settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; } + ]; + networking.networkmanager.enable = true; services.pipewire = { -- cgit v1.3