feat(home): conditionally enable programs and packages based on desktop module

This commit is contained in:
Mohammad Rafiq 2025-06-14 04:21:35 +08:00
parent 63b80b67ce
commit d39cad5faa
No known key found for this signature in database

View file

@ -2,9 +2,11 @@
pkgs, pkgs,
inputs, inputs,
osConfig, osConfig,
lib,
... ...
}: }:
let let
inherit (lib) mkMerge mkIf;
mkEmailAccount = address: { mkEmailAccount = address: {
inherit address; inherit address;
maildir.path = address; maildir.path = address;
@ -22,6 +24,19 @@ let
thunderbird.enable = true; thunderbird.enable = true;
}; };
in in
{
config = mkMerge [
(mkIf osConfig.desktop.enable {
programs = {
obs-studio.enable = true;
thunderbird.enable = true;
thunderbird.profiles.rafiq.isDefault = true;
};
home.packages = with pkgs; [
stremio
tor-browser
];
})
{ {
accounts = { accounts = {
email = { email = {
@ -58,8 +73,6 @@ in
cbonsai cbonsai
ripgrep ripgrep
devenv devenv
stremio
tor-browser
pantheon.rebuild pantheon.rebuild
pantheon.deploy pantheon.deploy
pantheon.edit pantheon.edit
@ -77,17 +90,13 @@ in
programs = { programs = {
nh.enable = true; nh.enable = true;
tealdeer.enable = true; tealdeer.enable = true;
pay-respects = {
enable = true;
};
tealdeer.settings.updates.auto_update = true; tealdeer.settings.updates.auto_update = true;
pay-respects.enable = true;
direnv = { direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
thunderbird.enable = true;
thunderbird.profiles.rafiq = {
isDefault = true;
};
}; };
} }
];
}