feat: add module to install some packages by default

This commit is contained in:
Dmitriy Kholkin 2025-06-07 21:14:15 +03:00
parent 0d0a0b3f98
commit 7653a8a3a3
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
2 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,71 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib) getExe mkEnableOption mkIf;
cfg = config.ataraxia.programs.default;
thunarFinal =
with pkgs.xfce;
(thunar.override {
thunarPlugins = [
thunar-archive-plugin
thunar-media-tags-plugin
];
});
in
{
options.ataraxia.programs.default = {
enable = mkEnableOption "Install some program by default";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
bat
bottom
fd
libqalculate
p7zip
pinfo
qalculate-gtk
qbittorrent
qimgv
ripgrep
rsync
thunarFinal
tldr
translate-shell
unrar
];
persist.state.directories = [
".config/qalculate"
".config/qBittorrent"
".config/qimgv"
".config/Thunar"
".config/xarchiver"
];
defaultApplications = {
archive = {
cmd = getExe pkgs.xarchiver;
desktop = "xarchiver";
};
fm = {
cmd = "${thunarFinal}/bin/thunar";
desktop = "thunar";
};
image = {
cmd = getExe pkgs.qimgv;
desktop = "qimgv";
};
torrent = {
cmd = getExe pkgs.qbittorrent;
desktop = "qbittorrent";
};
};
};
}

View File

@ -77,6 +77,7 @@ in
desktopRole = recursiveUpdate baseRole {
ataraxia.defaults.fonts.enable = mkDefault true;
ataraxia.defaults.sound.enable = mkDefault true;
ataraxia.programs.default.enable = mkDefault true;
ataraxia.programs.vscode.enable = mkDefault true;
ataraxia.wayland.enable = mkDefault true;
ataraxia.wayland.hyprland.enable = mkDefault true;