Adjust base and home packages

This commit is contained in:
DashieTM 2024-08-25 19:51:45 +02:00
parent a90a9c3a8e
commit 218b7dc4ca
8 changed files with 156 additions and 103 deletions

View file

@ -8,6 +8,12 @@
}:
{
options.mods.home_packages = {
noDefaultPackages = lib.mkOption {
default = false;
example = true;
type = lib.types.bool;
description = "No default packages (will use additional_packages only)";
};
enable = lib.mkOption {
default = true;
example = false;
@ -23,77 +29,92 @@
Will be installed regardless of default home manager packages are installed.
'';
};
matrixClient = lib.mkOption {
default = pkgs.nheko;
example = null;
type = with lib.types; nullOr package;
description = "The matrix client";
};
vesktop = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Adds the vesktop discord client";
};
ncspot = lib.mkOption {
default = false;
example = true;
type = lib.types.bool;
description = "Adds the ncspot spotify client";
};
nextcloudClient = lib.mkOption {
default = false;
example = true;
type = lib.types.bool;
description = "Adds the full desktop nextcloud client (the nextcloud module in dashnix only provides the cli tool)";
};
mailClient = lib.mkOption {
default = pkgs.thunderbird;
example = null;
type = with lib.types; nullOr package;
description = "The email client";
};
};
config = (
lib.optionalAttrs (options ? home.packages) {
home.packages = config.mods.home_packages.additional_packages;
}
// (lib.mkIf config.mods.home_packages.enable (
lib.mkIf config.mods.home_packages.noDefaultPackages (
lib.optionalAttrs (options ? home.packages) {
home.packages = with pkgs; [
nheko
nextcloud-client
xournalpp
vesktop
kitty
ripgrep
home.packages = config.mods.home_packages.additional_packages;
}
)
// (lib.optionalAttrs (options ? home.packages) {
home.packages =
with pkgs;
[
# TODO add fcp once fixed....
rm-improved
bat
fd
lsd
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
noto-fonts
flatpak
networkmanager
zoxide
fastfetch
gnome-keyring
dbus
killall
(lib.mkIf config.mods.home_packages.ncspot ncspot)
(lib.mkIf config.mods.home_packages.vesktop vesktop)
(lib.mkIf config.mods.home_packages.nextcloudClient nextcloud-client)
(lib.mkIf (options ? config.mods.home_pakcage.matrixClient) config.mods.home_packages.matrixClient)
(lib.mkIf (options ? config.mods.home_packages.mailClient) config.mods.home_packages.mailClient)
adw-gtk3
bat
brave
brightnessctl
dbus
fastfetch
fd
ffmpeg
flake-checker
gnome-keyring
gnutar
greetd.regreet
killall
kitty
libnotify
lsd
networkmanager
nh
nix-index
playerctl
poppler_utils
pulseaudio
qt5ct
qt6ct
gnutar
nix-index
libnotify
zenith
nh
amberol
pulseaudio
playerctl
ncspot
poppler_utils
brave
greetd.regreet
flake-checker
ffmpeg
ripgrep
rm-improved
system-config-printer
brightnessctl
];
xournalpp
zenith
zoxide
]
++ config.mods.home_packages.additional_packages;
xdg.configFile."direnv/direnv.toml".source = (pkgs.formats.toml { }).generate "direnv" {
global = {
warn_timeout = "-1s";
};
xdg.configFile."direnv/direnv.toml".source = (pkgs.formats.toml { }).generate "direnv" {
global = {
warn_timeout = "-1s";
};
};
#my own programs
programs = {
hyprdock.enable = true;
oxicalc.enable = true;
ReSet.enable = true;
ReSet.config.plugins = [
inputs.reset-plugins.packages."x86_64-linux".monitor
inputs.reset-plugins.packages."x86_64-linux".keyboard
];
ReSet.config.plugin_config = {
Keyboard = {
path = "/home/${config.conf.username}/.config/reset/keyboard.conf";
};
};
};
}
))
})
);
}