diff options
| author | 2026-09-24 09:13:19 +0000 | |
|---|---|---|
| committer | 2026-09-24 09:13:19 +0000 | |
| commit | 8ac87f0b609b8f30b83382d1e4913ddc89e0893e (patch) | |
| tree | eff3a1eaedb59adabc7500fee95b2fe1d97f09af /modules | |
| parent | 2ec5dfa25cef3c4fea72336e4142e5c3b5981cc3 (diff) | |
| download | desktop-flake-8ac87f0b609b8f30b83382d1e4913ddc89e0893e.tar.gz desktop-flake-8ac87f0b609b8f30b83382d1e4913ddc89e0893e.tar.bz2 desktop-flake-8ac87f0b609b8f30b83382d1e4913ddc89e0893e.zip | |
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HngxrvqEzq8oBEBDtrYJyB
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/home/desktop-apps.nix | 28 | ||||
| -rw-r--r-- | modules/nixos/common.nix | 13 |
2 files changed, 35 insertions, 6 deletions
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 @@ | |||
| 1 | { pkgs, lib, ... }: | 1 | { |
| 2 | pkgs, | ||
| 3 | lib, | ||
| 4 | osConfig ? null, | ||
| 5 | ... | ||
| 6 | }: | ||
| 2 | let | 7 | let |
| 3 | crossPlatformApps = [ pkgs.slack pkgs.discord pkgs.spotify pkgs.firefox pkgs.bitwarden-desktop ]; | 8 | crossPlatformApps = [ |
| 9 | pkgs.slack | ||
| 10 | pkgs.discord | ||
| 11 | pkgs.spotify | ||
| 12 | pkgs.firefox | ||
| 13 | pkgs.bitwarden-desktop | ||
| 14 | pkgs.ghostty | ||
| 15 | ]; | ||
| 4 | linuxOnlyApps = lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.teams-for-linux; | 16 | linuxOnlyApps = lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.teams-for-linux; |
| 5 | candidateApps = crossPlatformApps ++ linuxOnlyApps; | 17 | # GNOME Tweaks only makes sense where GNOME is actually enabled, which this |
| 18 | # flake only does at the NixOS level (modules/nixos/common.nix) - not on | ||
| 19 | # standalone, non-NixOS activations of this shared profile. osConfig is the | ||
| 20 | # full NixOS config and is only present when home-manager is integrated | ||
| 21 | # into a NixOS system; it's absent for standalone `home-manager switch`. | ||
| 22 | gnomeOnlyApps = lib.optional (osConfig.services.desktopManager.gnome.enable or false | ||
| 23 | ) pkgs.gnome-tweaks; | ||
| 24 | candidateApps = crossPlatformApps ++ linuxOnlyApps ++ gnomeOnlyApps; | ||
| 6 | in | 25 | in |
| 7 | { | 26 | { |
| 8 | home.packages = | 27 | home.packages = builtins.filter (lib.meta.availableOn pkgs.stdenv.hostPlatform) candidateApps; |
| 9 | builtins.filter (lib.meta.availableOn pkgs.stdenv.hostPlatform) candidateApps; | ||
| 10 | } | 28 | } |
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 @@ | |||
| 1 | { pkgs, lib, ... }: | 1 | { pkgs, lib, ... }: |
| 2 | { | 2 | { |
| 3 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; | 3 | nix.settings.experimental-features = [ |
| 4 | "nix-command" | ||
| 5 | "flakes" | ||
| 6 | ]; | ||
| 4 | 7 | ||
| 5 | nix.gc = { | 8 | nix.gc = { |
| 6 | automatic = true; | 9 | automatic = true; |
| @@ -43,6 +46,14 @@ | |||
| 43 | services.displayManager.gdm.enable = true; | 46 | services.displayManager.gdm.enable = true; |
| 44 | services.desktopManager.gnome.enable = true; | 47 | services.desktopManager.gnome.enable = true; |
| 45 | 48 | ||
| 49 | # Defaults GNOME to dark mode without locking it - GNOME Settings' | ||
| 50 | # Appearance toggle still writes to the user's own dconf database, which | ||
| 51 | # is searched before this default database. | ||
| 52 | programs.dconf.enable = true; | ||
| 53 | programs.dconf.profiles.user.databases = [ | ||
| 54 | { settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; } | ||
| 55 | ]; | ||
| 56 | |||
| 46 | networking.networkmanager.enable = true; | 57 | networking.networkmanager.enable = true; |
| 47 | 58 | ||
| 48 | services.pipewire = { | 59 | services.pipewire = { |
