aboutsummaryrefslogtreecommitdiffstats
path: root/modules/development/lazygit
diff options
context:
space:
mode:
Diffstat (limited to 'modules/development/lazygit')
-rw-r--r--modules/development/lazygit/assertions.nix10
-rw-r--r--modules/development/lazygit/default.nix7
2 files changed, 15 insertions, 2 deletions
diff --git a/modules/development/lazygit/assertions.nix b/modules/development/lazygit/assertions.nix
new file mode 100644
index 0000000..b79cfb4
--- /dev/null
+++ b/modules/development/lazygit/assertions.nix
@@ -0,0 +1,10 @@
+# Assertions - LazyGit only makes sense when Git is enabled
+{ config, ... }:
+{
+ assertions = [
+ {
+ assertion = !config.development.lazygit.enable || config.development.git.enable;
+ message = "development.lazygit.enable requires development.git.enable.";
+ }
+ ];
+}
diff --git a/modules/development/lazygit/default.nix b/modules/development/lazygit/default.nix
index 8f5585e..223392a 100644
--- a/modules/development/lazygit/default.nix
+++ b/modules/development/lazygit/default.nix
@@ -1,11 +1,14 @@
# Lazygit - A simple terminal UI for git commands
{ config, lib, ... }:
{
+ imports = [
+ ./assertions.nix
+ ];
options.development.lazygit = {
enable = lib.mkEnableOption "Enables lazygit.";
};
- config = lib.mkIf config.development.lazygit.enable {
- programs.lazygit = {
+ config = {
+ programs.lazygit = lib.mkIf config.development.lazygit.enable {
enable = true;
enableBashIntegration = config.terminal.bash.enable;
enableFishIntegration = config.programs.fish.enable;