aboutsummaryrefslogtreecommitdiffstats
path: root/modules/development
diff options
context:
space:
mode:
Diffstat (limited to 'modules/development')
-rw-r--r--modules/development/git/assertions.nix22
-rw-r--r--modules/development/lazygit/assertions.nix10
-rw-r--r--modules/development/lazygit/default.nix7
-rw-r--r--modules/development/nixvim/keymaps.nix5
4 files changed, 37 insertions, 7 deletions
diff --git a/modules/development/git/assertions.nix b/modules/development/git/assertions.nix
index d663173..c18c847 100644
--- a/modules/development/git/assertions.nix
+++ b/modules/development/git/assertions.nix
@@ -10,5 +10,27 @@
SSH must be enabled (security.ssh.enable = true) to use SSH for git.
'';
}
+ {
+ assertion = !config.development.git.signing.signByDefault || config.development.git.enable;
+ message = ''
+ development.git.signing.signByDefault is enabled but development.git.enable is not.
+ Enable development.git before enabling commit signing.
+ '';
+ }
+ {
+ assertion =
+ !config.development.git.signing.signByDefault || config.development.git.signing.key != null;
+ message = ''
+ development.git.signing.signByDefault is enabled but development.git.signing.key is not set.
+ Set a GPG key ID before enabling commit signing by default.
+ '';
+ }
+ {
+ assertion = !config.development.git.signing.signByDefault || config.security.gpg.enable;
+ message = ''
+ development.git.signing.signByDefault is enabled but security.gpg.enable is not.
+ Commit signing requires the managed GPG configuration. Please enable security.gpg.
+ '';
+ }
];
}
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;
diff --git a/modules/development/nixvim/keymaps.nix b/modules/development/nixvim/keymaps.nix
index 0ac71f5..88fa841 100644
--- a/modules/development/nixvim/keymaps.nix
+++ b/modules/development/nixvim/keymaps.nix
@@ -31,10 +31,5 @@
];
options.desc = "Toggle file explorer";
}
- {
- key = "<c-c>";
- action = "<cmd>NotificationsClear<cr>";
- options.desc = "Clear notifications";
- }
];
}