From 22627b61ec7081b1ae88e6df57990dee74d9c998 Mon Sep 17 00:00:00 2001 From: voidarc Date: Mon, 6 Jul 2026 20:46:16 +0100 Subject: [PATCH] lazygit feature --- modules/features/lazygit/default.nix | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 modules/features/lazygit/default.nix diff --git a/modules/features/lazygit/default.nix b/modules/features/lazygit/default.nix new file mode 100644 index 0000000..f2f3e9e --- /dev/null +++ b/modules/features/lazygit/default.nix @@ -0,0 +1,51 @@ +{ + self, + inputs, + ... +}: { + flake.nixosModules.lazygit = { + pkgs, + lib, + ... + }: { + environment.systemPackages = with pkgs; [ + self.packages.${pkgs.stdenv.hostPlatform.system}.lazygit + ]; + }; + perSystem = { + pkgs, + lib, + self', + ... + }: let + config-file = pkgs.writeText "config.yml" '' + gui: + nerdFontsVersion: "3" + + customCommands: + - key: 'p' + context: 'global' + command: 'git pull --recurse-submodules' + loadingText: 'Pulling with submodules' + output: 'log' + - key: '' + context: 'global' + command: 'git pull' + loadingText: 'Pulling remote repo' + output: 'log' + ''; + in { + packages.lazygit = inputs.wrappers.lib.wrapPackage ({ + config, + wlib, + lib, + ... + }: { + inherit pkgs; + package = pkgs.lazygit; + flags = { + "--use-config-file" = config-file; + }; + }); + }; +}