feat(home): import desktop module using import-tree and move misc config to desktop module

This commit is contained in:
Mohammad Rafiq 2025-06-14 18:22:53 +08:00
parent 2387ad9099
commit f5a046cd58
No known key found for this signature in database
10 changed files with 97 additions and 112 deletions

View file

@ -3,11 +3,11 @@
inputs,
osConfig,
lib,
system,
...
}:
let
inherit (lib) mkMerge mkIf;
inherit (lib) optional;
inherit (inputs) import-tree;
mkEmailAccount = address: {
inherit address;
maildir.path = address;
@ -22,99 +22,65 @@ let
host = "smtp.forwardemail.net";
port = 465;
};
thunderbird.enable = true;
thunderbird.enable = osConfig.desktop.enable;
};
in
{
config = mkMerge [
(mkIf osConfig.desktop.enable (
import ./desktop {
inherit
lib
inputs
system
pkgs
osConfig
;
}
))
(mkIf osConfig.desktop.enable {
home.persistence."/persist/home/rafiq".directories = [
"docs"
"repos"
"vids"
"tmp"
".tor project"
".local/share/PrismLauncher"
];
programs = {
obs-studio.enable = true;
thunderbird.enable = true;
thunderbird.profiles.rafiq.isDefault = true;
};
home.packages = with pkgs; [
stremio
tor-browser
prismlauncher
];
})
{
accounts = {
email = {
maildirBasePath = "mail";
accounts = {
"rafiq@rrv.sh" = {
primary = true;
} // mkEmailAccount "rafiq@rrv.sh";
"mohammadrafiq@rrv.sh" = mkEmailAccount "mohammadrafiq@rrv.sh";
};
};
};
cli = {
shell = "zsh";
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";
};
imports = optional osConfig.desktop.enable (import-tree ./desktop);
packages = with pkgs; [
cbonsai
ripgrep
devenv
pantheon.rebuild
pantheon.deploy
pantheon.edit
pantheon.commit
pantheon.check
inputs.nixspect.packages."x86_64-linux".nixspect
];
persistence."/persist/home/rafiq".directories = [
];
};
programs = {
nh.enable = true;
tealdeer.enable = true;
tealdeer.settings.updates.auto_update = true;
pay-respects.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
config = {
accounts = {
email = {
maildirBasePath = "mail";
accounts = {
"rafiq@rrv.sh" = {
primary = true;
} // mkEmailAccount "rafiq@rrv.sh";
"mohammadrafiq@rrv.sh" = mkEmailAccount "mohammadrafiq@rrv.sh";
};
};
}
];
};
cli = {
shell = "zsh";
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; [
cbonsai
ripgrep
devenv
pantheon.rebuild
pantheon.deploy
pantheon.edit
pantheon.commit
pantheon.check
inputs.nixspect.packages."x86_64-linux".nixspect
];
};
programs = {
nh.enable = true;
tealdeer.enable = true;
tealdeer.settings.updates.auto_update = true;
pay-respects.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
};
};
}