diff --git a/hosts/pinwheel/modules/git/gitconfig b/hosts/pinwheel/modules/git/gitconfig index d8d800e..ac8834a 100644 --- a/hosts/pinwheel/modules/git/gitconfig +++ b/hosts/pinwheel/modules/git/gitconfig @@ -2,9 +2,6 @@ name = Alexander Heldt email = me@alexanderheldt.se -[core] - editor = "vim" - [url "git@github.com:"] insteadOf = https://github.com/ diff --git a/hosts/pinwheel/modules/vim/default.nix b/hosts/pinwheel/modules/vim/default.nix index 9842524..21d5211 100644 --- a/hosts/pinwheel/modules/vim/default.nix +++ b/hosts/pinwheel/modules/vim/default.nix @@ -1,4 +1,7 @@ -{ ... }: +{ lib, config, ... }: +let + gitEnabled = config.mod.git.enable; +in { home-manager.users.alex = { programs.vim = { @@ -8,5 +11,13 @@ set noswapfile ''; }; + + programs.git = lib.mkIf gitEnabled { + extraConfig = { + core = { + editor = "vim"; + }; + }; + }; }; }