{ lib, pkgs, config, flakeRoot, ... }: let ################################# # Determine default username ################################# username = config.defaultUser or "henrov"; moduleName = "kitty"; ################################# # Paths to assets ################################# assetPath = "${flakeRoot}/generated/.config/${moduleName}"; assetFiles = builtins.attrNames (builtins.readDir assetPath); in { ################################# # System-wide packages ################################# environment.systemPackages = [ pkgs.kitty ]; ################################# # Home Manager user configuration ################################# home-manager.users = { ${username} = { ################################# # Enable Kitty ################################# programs.kitty = { enable = true; extraConfig = '' # Include the Catppuccin-Mocha theme include themes/Catppuccin-Mocha.conf ''; }; ################################# # Copy config files ################################# home.file = { ".config/kitty/kitty.conf" = { text = builtins.readFile "${assetPath}/kitty.conf"; force = true; }; ".config/kitty/Catppuccin-Mocha.conf" = { text = builtins.readFile "${assetPath}/Catppuccin-Mocha.conf"; force = true; }; }; }; }; }