blob: a565c18354e859978afbe548f26c26c34aac6093 (
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
|
{
pkgs,
lib,
osConfig ? null,
...
}:
let
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;
# 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;
}
|