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;
@ -23,71 +25,78 @@ let
}; };
in in
{ {
accounts = { config = mkMerge [
email = { (mkIf osConfig.desktop.enable {
maildirBasePath = "mail"; programs = {
accounts = { obs-studio.enable = true;
"rafiq@rrv.sh" = { thunderbird.enable = true;
primary = true; thunderbird.profiles.rafiq.isDefault = true;
} // mkEmailAccount "rafiq@rrv.sh";
"mohammadrafiq@rrv.sh" = mkEmailAccount "mohammadrafiq@rrv.sh";
}; };
}; home.packages = with pkgs; [
}; stremio
cli = { tor-browser
shell = "zsh"; ];
finder = "fzf"; })
screensaver.enable = true; {
screensaver.timeout = "100"; accounts = {
screensaver.command = "cbonsai -S -w 0.1 -L 40 -M 2 -b 2"; email = {
editor = "nvf"; maildirBasePath = "mail";
file-browser = "yazi"; accounts = {
multiplexer = "zellij"; "rafiq@rrv.sh" = {
fetch = "hyfetch"; primary = true;
git.name = "Mohammad Rafiq"; } // mkEmailAccount "rafiq@rrv.sh";
git.email = "rafiq@rrv.sh"; "mohammadrafiq@rrv.sh" = mkEmailAccount "mohammadrafiq@rrv.sh";
git.defaultBranch = "prime"; };
}; };
home = { };
shellAliases = { cli = {
v = "nvim"; shell = "zsh";
e = "edit"; finder = "fzf";
}; screensaver.enable = true;
screensaver.timeout = "100";
screensaver.command = "cbonsai -S -w 0.1 -L 40 -M 2 -b 2";
editor = "nvf";
file-browser = "yazi";
multiplexer = "zellij";
fetch = "hyfetch";
git.name = "Mohammad Rafiq";
git.email = "rafiq@rrv.sh";
git.defaultBranch = "prime";
};
home = {
shellAliases = {
v = "nvim";
e = "edit";
};
packages = with pkgs; [ packages = with pkgs; [
cbonsai cbonsai
ripgrep ripgrep
devenv devenv
stremio pantheon.rebuild
tor-browser pantheon.deploy
pantheon.rebuild pantheon.edit
pantheon.deploy pantheon.commit
pantheon.edit pantheon.check
pantheon.commit inputs.nixspect.packages."x86_64-linux".nixspect
pantheon.check ];
inputs.nixspect.packages."x86_64-linux".nixspect
];
persistence."/persist/home/rafiq".directories = [ persistence."/persist/home/rafiq".directories = [
"docs" "docs"
"repos" "repos"
".tor project" ".tor project"
]; ];
}; };
programs = { programs = {
nh.enable = true; nh.enable = true;
tealdeer.enable = true; tealdeer.enable = true;
pay-respects = { tealdeer.settings.updates.auto_update = true;
enable = true; pay-respects.enable = true;
}; direnv = {
tealdeer.settings.updates.auto_update = true; enable = true;
direnv = { nix-direnv.enable = true;
enable = true; };
nix-direnv.enable = true; };
}; }
thunderbird.enable = true; ];
thunderbird.profiles.rafiq = {
isDefault = true;
};
};
} }