From 80a8ab4b72bb05931727586f02b54079942d7f7c Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 11 Apr 2024 18:24:08 +0530 Subject: [PATCH] add bat --- hosts/default/home.nix | 7 ------- modules/home-manager/bat/default.nix | 17 +++++++++++++++++ modules/home-manager/default.nix | 2 ++ 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 modules/home-manager/bat/default.nix diff --git a/hosts/default/home.nix b/hosts/default/home.nix index 06bd30d..de04526 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -106,13 +106,6 @@ "electron-25.9.0" ]; - programs.bat = { - enable = true; - config = { - theme = "ansi"; - }; - }; - services.mpris-proxy.enable = true; # Home Manager is pretty good at managing dotfiles. The primary way to manage diff --git a/modules/home-manager/bat/default.nix b/modules/home-manager/bat/default.nix new file mode 100644 index 0000000..719aae5 --- /dev/null +++ b/modules/home-manager/bat/default.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + ... +}: { + options = { + bat.enable = lib.mkEnableOption "enable bat"; + }; + config = lib.mkIf config.bat.enable { + programs.bat = { + enable = true; + config = { + theme = "ansi"; + }; + }; + }; +} diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 3077301..2a9963d 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,6 +1,7 @@ {lib, ...}: { imports = [ ./bash + ./bat ./kitty ./neovim ./session-vars @@ -12,6 +13,7 @@ nixpkgs.config.allowUnfree = true; bash.enable = lib.mkDefault true; + bat.enable = lib.mkDefault true; kitty.enable = lib.mkDefault true; neovim.enable = lib.mkDefault true; tmux.enable = lib.mkDefault true;