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 = { aa = {
apps = { apps = {
bat.enable = true;
btop.enable = true; btop.enable = true;
tmux.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,23 +1,23 @@
{ {
options,
config, config,
lib, lib,
pkgs, pkgs,
inputs, inputs,
... ...
}: }: let
with lib; let inherit (lib) mkIf mkEnableOption;
cfg = config.aa.suites.utils; cfg = config.aa.suites.utils;
in { in {
options.aa.suites.utils = with lib.types; { options.aa.suites.utils = {
enable = mkEnableOption "common configuration"; enable = mkEnableOption "common configuration";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
aa.apps.bat.enable = true; environment.systemPackages =
environment.systemPackages = with pkgs; [ (with pkgs; [
inputs.agenix.packages.x86_64-linux.default
alejandra alejandra
bat
bind # for dig bind # for dig
curl curl
deploy-rs deploy-rs
@ -36,6 +36,7 @@ in {
tcpdump tcpdump
usbutils usbutils
wget wget
]; ])
++ [inputs.agenix.packages.x86_64-linux.default];
}; };
} }