1 { config, lib, pkgs, ... }:
4 cfg = config.programs.lazygit;
6 settingsFormat = pkgs.formats.yaml { };
9 options.programs.lazygit = {
10 enable = lib.mkEnableOption "lazygit, a simple terminal UI for git commands";
12 package = lib.mkPackageOption pkgs "lazygit" { };
14 settings = lib.mkOption {
15 inherit (settingsFormat) type;
18 Lazygit configuration.
20 See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md for documentation.
25 config = lib.mkIf cfg.enable {
27 systemPackages = [ cfg.package ];
28 etc = lib.mkIf (cfg.settings != { }) {
29 "xdg/lazygit/config.yml".source = settingsFormat.generate "lazygit-config.yml" cfg.settings;
35 maintainers = with lib.maintainers; [ linsui ];