Converted bat from nixosModule to homeModule

This commit is contained in:
alejandro-angulo 2024-07-28 22:38:41 -07:00
parent c0f10df484
commit 2ad5af4f90
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
4 changed files with 50 additions and 50 deletions

View file

@ -9,6 +9,7 @@
}: {
aa = {
apps = {
bat.enable = true;
btop.enable = true;
tmux.enable = true;
};

View file

@ -0,0 +1,21 @@
{
config,
lib,
namespace,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.bat;
in {
options.${namespace}.apps.bat = {
enable = mkEnableOption "bat";
};
config = mkIf cfg.enable {
programs.bat = {
enable = true;
config.theme = "gruvbox-dark";
};
};
}

View file

@ -1,23 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.aa.apps.bat;
in {
options.aa.apps.bat = with types; {
enable = mkEnableOption "bat";
};
config = mkIf cfg.enable {
aa.home.extraOptions = {
programs.bat = {
enable = true;
config.theme = "gruvbox-dark";
};
};
};
}

View file

@ -1,41 +1,42 @@
{
options,
config,
lib,
pkgs,
inputs,
...
}:
with lib; let
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.aa.suites.utils;
in {
options.aa.suites.utils = with lib.types; {
options.aa.suites.utils = {
enable = mkEnableOption "common configuration";
};
config = mkIf cfg.enable {
aa.apps.bat.enable = true;
environment.systemPackages = with pkgs; [
inputs.agenix.packages.x86_64-linux.default
alejandra
bind # for dig
curl
deploy-rs
du-dust
fd
file
htop
jq
killall
lsof
pre-commit
progress
python3
ripgrep
sqlite
tcpdump
usbutils
wget
];
environment.systemPackages =
(with pkgs; [
alejandra
bat
bind # for dig
curl
deploy-rs
du-dust
fd
file
htop
jq
killall
lsof
pre-commit
progress
python3
ripgrep
sqlite
tcpdump
usbutils
wget
])
++ [inputs.agenix.packages.x86_64-linux.default];
};
}