blob: 22a78924f15451555064be6210eadfc74f298491 (
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
|
{
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.optionals (osConfig.services.desktopManager.gnome.enable or false) [
pkgs.gnome-tweaks
pkgs.gnome-extension-manager
];
candidateApps = crossPlatformApps ++ linuxOnlyApps ++ gnomeOnlyApps;
in
{
home.packages = builtins.filter (lib.meta.availableOn pkgs.stdenv.hostPlatform) candidateApps;
}
|