40 lines
1013 B
Nix
40 lines
1013 B
Nix
{ lib, pkgs, config, ... }:
|
|
|
|
let
|
|
moduleName = "kitty";
|
|
username = config.defaultUser or "henrov";
|
|
|
|
assetPath = ../../../assets/system/conf/${moduleName};
|
|
programFiles = builtins.readDir assetPath;
|
|
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
|
src = "${assetPath}/${name}";
|
|
});
|
|
|
|
enableProgram = config.enableKitty or true;
|
|
in
|
|
{
|
|
options.enableKitty = lib.mkEnableOption "Enable Kitty terminal integration";
|
|
|
|
config = lib.mkIf enableProgram {
|
|
|
|
# Install kitty system-wide
|
|
environment.systemPackages = [ pkgs.kitty ];
|
|
|
|
# Home Manager user-specific configuration
|
|
home-manager.users.${username} = {
|
|
programs.kitty.enable = true;
|
|
|
|
programs.kitty.extraConfig = ''
|
|
# Include the Catppuccin-Mocha theme
|
|
include themes/Catppuccin-Mocha.conf
|
|
'';
|
|
|
|
xdg.configFile =
|
|
lib.mapAttrs' (name: value: {
|
|
name = "${moduleName}/${name}";
|
|
value.source = value.src;
|
|
}) files;
|
|
};
|
|
};
|
|
}
|