{"id":28483584,"url":"https://github.com/typovrak/nixos-bat","last_synced_at":"2026-04-30T19:31:34.126Z","repository":{"id":288992430,"uuid":"969763684","full_name":"typovrak/nixos-bat","owner":"typovrak","description":"📚 NixOS module to install bat, a cat clone with syntax highlighting, with Catppuccin mocha theme, secure config and pre-built cache","archived":false,"fork":false,"pushed_at":"2025-05-21T15:45:15.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T13:24:44.063Z","etag":null,"topics":["automation","bat","cat","catppuccin","declarative","mocha","nix","nixos","ricing"],"latest_commit_sha":null,"homepage":"https://typovrak.tv/nixos","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/typovrak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"buy_me_a_coffee":"typovrak"}},"created_at":"2025-04-20T21:55:02.000Z","updated_at":"2026-03-10T01:13:43.000Z","dependencies_parsed_at":"2025-04-28T20:25:49.213Z","dependency_job_id":null,"html_url":"https://github.com/typovrak/nixos-bat","commit_stats":null,"previous_names":["typovrak/nixos-bat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/typovrak/nixos-bat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typovrak%2Fnixos-bat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typovrak%2Fnixos-bat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typovrak%2Fnixos-bat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typovrak%2Fnixos-bat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typovrak","download_url":"https://codeload.github.com/typovrak/nixos-bat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typovrak%2Fnixos-bat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bat","cat","catppuccin","declarative","mocha","nix","nixos","ricing"],"created_at":"2025-06-07T22:00:37.815Z","updated_at":"2026-04-30T19:31:34.120Z","avatar_url":"https://github.com/typovrak.png","language":"Nix","funding_links":["https://buymeacoffee.com/typovrak"],"categories":[],"sub_categories":[],"readme":"[![NixOS 24.11+](https://img.shields.io/badge/NixOS-24.11%2B-a6e3a1?labelColor=45475a)](https://nixos.org/)\n[![License MIT](https://img.shields.io/badge/License-MIT-cba6f7.svg?labelColor=45475a)](LICENSE.md)\n[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-☕-fab387?labelColor=45475a)](https://typovrak.tv/coffee)\n[![Portal](https://img.shields.io/badge/Portal-typovrak.tv%2Fnixos-eba0ac?labelColor=45475a)](https://typovrak.tv/nixos)\n[![Discord join us](https://img.shields.io/badge/Discord-Join%20us-74c7ec?labelColor=45475a\u0026logo=discord\u0026logoColor=white)](https://typovrak.tv/discord)\n\n# 📚 NixOS Bat\n\n\u003e NixOS module to install bat, a cat clone with syntax highlighting, with Catppuccin mocha theme, secure config and pre-built cache.\n\n## 🧩 Part of the Typovrak NixOS ecosystem\n\nThis module is part of ```Typovrak NixOS```, a fully modular and declarative operating system configuration built entirely with :\n\n- 🧱 **30+ standalone modules :** Each managing a specific tool, feature or aesthetic like ```zsh```, ```i3```, ```lighdm```, ```polybar```, ```gtk``` and more.\n- 🎨 **Catppuccin Mocha :** The default theme across terminal, GUI, and login interfaces.\n- 🛡️ **100% FOSS compliant :** No proprietary software included unless explicitly chosen.\n- 🧑‍💻 **Built for developers :** Optimized for speed, keyboard-centric workflows and expressive CLI tooling.\n\n*Explore the full system : 👉 [github.com/typovrak/nixos](https://github.com/typovrak/nixos)*\n\n\u003e [!CAUTION]\n\u003e This module is opinionated, it may **override**, **replace**, or **remove** files and settings **without** prompt. To avoid unexpected changes, **back up** your existing files or **fork** this module to take full control. **Follow this documentation** to avoid any of this problem.\n\n## 📦 Features\n\n- 🔒 **Secure config directory :** Creates ```~/.config/bat``` with ```700``` permissions and correct ownership.\n- 🎨 **Catppuccin mocha green theme :** Deploys ```catppuccin-mocha.tmTheme``` into ```~/.config/bat/themes``` for consistent styling.\n- ⚙️ **Config deployment :** Installs your ```config``` into ```~/.config/bat/config``` with ```600``` permissions.\n- ⚡ **Cache build :** Runs ```bat cache --build``` as the user to pre-compile syntax and theme cache.\n- 📦 **Package installation :** Ensures ```bat``` is installed via ```environment.systemPackages```.\n- 🔄 **Idempotent :** Cleans and recreates config and themes on each rebuild without removing other user data.\n- 💾 **Backup guidance :** Documentation includes commands to back up any existing ```~/.config/bat``` before applying changes.\n\n## 📂 Repository structure\n\n```bash\n❯ tree -a -I \".git*\"\n.\n├── catppuccin-mocha.tmTheme # catppuccin mocha green theme\n├── config                   # bat configuration file\n├── configuration.nix        # module configuration\n├── LICENSE.md               # MIT license\n└── README.md                # this documentation\n\n1 directory, 5 files\n```\n\n## ⚙️ Prerequisites\n\n### 1. NixOS version\nRequires NixOS 24.11 or newer.\n\n### 2. User validation\nthe target user must be defined in ```config.username```. See [typovrak main nixos configuration](https://github.com/typovrak/nixos) for more details.\n\n### 3. Backup\nBefore proceeding, back up existing configuration if needed\n```bash\ncp ~/.config/bat{,.bak}\n```\n\n## ⬇️ Installation\n\n### 🚀 Method 1 : Out-of-the-box\n\nFetch the module directly in your [main nixos configuration](https://github.com/typovrak/nixos) at ```/etc/nixos/configuration.nix``` using fetchGit\n```nix\n# /etc/nixos/configuration.nix\n\nlet\n  nixos-bat = fetchGit {\n    url = \"https://github.com/typovrak/nixos-bat.git\";\n    ref = \"main\";\n    rev = \"4f4a89ee94b19f3869c5a7b6c2f49104d3ffdf73\"; # update to the desired commit\n  };\nin\n{\n  imports = [\n    /etc/nixos/hardware-configuration.nix # system hardware settings\n    /etc/nixos/variables.nix # defines config.username and other variables, see https://github.com/typovrak/nixos for more details\n    (import \"${nixos-bat}/configuration.nix\")\n  ];\n}\n```\n\nOnce imported, rebuild your system to apply changes\n```bash\nsudo nixos-rebuild switch\n```\n\n### 🍴 Method 2 : Fork\n\nWant to **personalize** this module ?\n\nFork it and add this custom module in your [main nixos configuration](https://github.com/typovrak/nixos) at ```/etc/nixos/configuration.nix``` using fetchGit\n```nix\nlet\n  nixos-bat = fetchGit {\n    url = \"https://github.com/\u003cYOUR_USERNAME\u003e/nixos-bat.git\";\n    ref = \"main\";\n    rev = \"\u003cCOMMIT\u003e\"; # see below\n  };\nin {\n  imports = [\n    /etc/nixos/hardware-configuration.nix # system hardware settings\n    /etc/nixos/variables.nix # defines config.username and other variables, see https://github.com/typovrak/nixos for more details\n    (import \"${nixos-bat}/configuration.nix\")\n  ];\n}\n```\n\nGet the latest commit hash by executing\n```bash\ngit clone https://github.com/\u003cYOUR_USERNAME\u003e/nixos-bat.git \u0026\u0026\ncd nixos-bat \u0026\u0026\ngit log -1 --pretty=format:\"%H\"\n```\n\n## 🎬 Usage\n\nUse ```bat``` just like ```cat``` on a file, with syntax highlighting and the Catppuccin mocha green theme\n```bash\nbat file.txt\n```\n\n## 📚 Learn more\n\n- 🦇 [Bat GitHub repository](https://github.com/sharkdp/bat) : Modern ```cat``` clone with syntax highlighting and Git integration.\n- 🎨 [Catppuccin for bat](https://github.com/catppuccin/bat) : Theme used in this module.\n\n## 🌐 Discover my NixOS system portal\n\nDive into [typovrak.tv/nixos](https://typovrak.tv/nixos) Catppuccin mocha green themed **gateway** to my GitHub and NixOS setup.\n\nBrowse **every module**, example and config in a sleek with an interactive interface that feels just like your desktop.\n\n## ❤️ Support\n\nIf this module saved you time, please ⭐️ the repo and share feedback.  \nYou can also support me on ☕ [Buy me a coffee](https://typovrak.tv/coffee)\n\n## 💬 Join the Typovrak community on Discord 🇫🇷\n\nIf you've ever ```rm -rf```ed your config by mistake or rebuilt for the 42nd time because a semicolon was missing…\n\nYou're not alone, **Welcome home !**\n\n🎯 [Join us on Discord »](https://typovrak.tv/discord)\n\n🧭 What you’ll find is :\n\n- ```💻 #nixos-setup``` - get help with modules, rebuilds and configs.\n- ```🌐 #web-dev``` - talk JS, TypeScript, React, Node and more.\n- ```🧠 #open-source``` - share your repos, contribute to others and discuss FOSS culture.\n- ```⌨️ #typing``` - layouts, mechanical keyboards and speed goals.\n- ```🎨 #ricing``` - dotfiles, theming tips and desktop screenshots.\n\n*Everyone's welcome no matter how many times you've broken your system ~~(except for Windows users)~~ 😄*\n\n---\n\n\u003cp align=\"center\"\u003e\u003ci\u003eMade with 💜 by \u003ca href=\"https://typovrak.tv\"\u003etypovrak\u003c/a\u003e\u003c/i\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypovrak%2Fnixos-bat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypovrak%2Fnixos-bat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypovrak%2Fnixos-bat/lists"}