nixos-config/configurations/profile/home/default.nix

73 lines
2.6 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, materusArg, ... }:
2023-10-08 11:42:08 +02:00
let
packages = cfg.packages;
cfg = config.materus.profile;
in
{
imports = [
./fonts.nix
./browser.nix
2024-03-28 22:49:38 +01:00
./xdg.nix
2023-10-08 11:42:08 +02:00
./shell
./editor
2024-03-31 21:11:40 +02:00
./terminal
2023-10-08 11:42:08 +02:00
];
options.materus.profile.enableDesktop = materusArg.pkgs.lib.mkBoolOpt false "Enable settings for desktop";
options.materus.profile.enableTerminal = materusArg.pkgs.lib.mkBoolOpt true "Enable settings for terminal";
options.materus.profile.enableTerminalExtra = materusArg.pkgs.lib.mkBoolOpt false "Enable extra settings for terminal";
options.materus.profile.enableNixDevel = materusArg.pkgs.lib.mkBoolOpt false "Enable settings for nix devel";
2023-10-08 11:42:08 +02:00
config =
{
2024-03-11 16:19:31 +01:00
home.packages = (if cfg.enableDesktop then packages.list.desktopApps else [ ]) ++
(if cfg.enableNixDevel then packages.list.nixRelated else [ ]) ++
(if cfg.enableTerminal then packages.list.terminalApps else [ ]);
2023-10-08 11:42:08 +02:00
#Desktop
programs.feh.enable = lib.mkDefault cfg.enableDesktop;
#Terminal
programs.git = {
enable = lib.mkDefault cfg.enableTerminal;
package = lib.mkDefault pkgs.gitFull;
delta.enable = lib.mkDefault cfg.enableTerminal;
lfs.enable = lib.mkDefault cfg.enableTerminal;
};
programs.gitui.enable = cfg.enableTerminalExtra;
programs.nix-index = {
enable = lib.mkDefault cfg.enableTerminal;
enableBashIntegration = lib.mkDefault config.programs.bash.enable;
enableFishIntegration = lib.mkDefault config.programs.fish.enable;
enableZshIntegration = lib.mkDefault config.programs.zsh.enable;
};
programs.direnv = {
enable = lib.mkDefault (cfg.enableTerminalExtra || cfg.enableNixDevel);
nix-direnv.enable = lib.mkDefault (cfg.enableNixDevel && (config.programs.direnv.enable == true));
enableBashIntegration = lib.mkDefault config.programs.bash.enable;
2024-04-01 22:10:17 +02:00
enableFishIntegration = lib.mkDefault config.programs.fish.enable;
2023-10-08 11:42:08 +02:00
enableZshIntegration = lib.mkDefault config.programs.zsh.enable;
};
programs.tmux.enable = lib.mkDefault cfg.enableTerminal;
programs.tmux.clock24 = lib.mkDefault config.programs.tmux.enable;
programs.fzf = {
enable = lib.mkDefault cfg.enableTerminalExtra;
enableBashIntegration = lib.mkDefault config.programs.bash.enable;
enableFishIntegration = lib.mkDefault config.programs.fish.enable;
enableZshIntegration = lib.mkDefault config.programs.zsh.enable;
};
2024-03-16 19:24:04 +01:00
programs.eza.enable = lib.mkDefault cfg.enableTerminalExtra;
2023-10-08 11:42:08 +02:00
programs.yt-dlp.enable = lib.mkDefault cfg.enableTerminalExtra;
};
}