feat: add module to install some packages by default
This commit is contained in:
parent
0d0a0b3f98
commit
7653a8a3a3
71
modules/home/applications/packages.nix
Normal file
71
modules/home/applications/packages.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -77,6 +77,7 @@ in
|
|||||||
desktopRole = recursiveUpdate baseRole {
|
desktopRole = recursiveUpdate baseRole {
|
||||||
ataraxia.defaults.fonts.enable = mkDefault true;
|
ataraxia.defaults.fonts.enable = mkDefault true;
|
||||||
ataraxia.defaults.sound.enable = mkDefault true;
|
ataraxia.defaults.sound.enable = mkDefault true;
|
||||||
|
ataraxia.programs.default.enable = mkDefault true;
|
||||||
ataraxia.programs.vscode.enable = mkDefault true;
|
ataraxia.programs.vscode.enable = mkDefault true;
|
||||||
ataraxia.wayland.enable = mkDefault true;
|
ataraxia.wayland.enable = mkDefault true;
|
||||||
ataraxia.wayland.hyprland.enable = mkDefault true;
|
ataraxia.wayland.hyprland.enable = mkDefault true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user