diff options
| -rw-r--r-- | modules/common.nix | 2 | ||||
| -rw-r--r-- | modules/home/default.nix (renamed from modules/home.nix) | 2 | ||||
| -rw-r--r-- | modules/home/nvim/default.nix (renamed from modules/home/nvim.nix) | 2 | ||||
| -rw-r--r-- | modules/home/nvim/global_config.lua | 12 |
4 files changed, 16 insertions, 2 deletions
diff --git a/modules/common.nix b/modules/common.nix index 73dc435..4c904dc 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -37,7 +37,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.christian = import ./home.nix; + home-manager.users.christian = import ./home; home-manager.extraSpecialArgs = { inherit inputs; }; environment.systemPackages = with pkgs; [ diff --git a/modules/home.nix b/modules/home/default.nix index f844fee..461f273 100644 --- a/modules/home.nix +++ b/modules/home/default.nix @@ -1,6 +1,6 @@ { config, pkgs, inputs, ... }: { - imports = [ ./home/nvim.nix ]; + imports = [ ./nvim ]; home.stateVersion = "25.11"; diff --git a/modules/home/nvim.nix b/modules/home/nvim/default.nix index f715f75..6cae9d6 100644 --- a/modules/home/nvim.nix +++ b/modules/home/nvim/default.nix @@ -8,5 +8,7 @@ plugins = with pkgs.vimPlugins; [ nvim-treesitter.withAllGrammars ]; + + extraLuaConfig = builtins.readFile ./global_config.lua; }; } diff --git a/modules/home/nvim/global_config.lua b/modules/home/nvim/global_config.lua new file mode 100644 index 0000000..2ae6dce --- /dev/null +++ b/modules/home/nvim/global_config.lua @@ -0,0 +1,12 @@ +vim.opt.expandtab = true +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 + +vim.api.nvim_create_autocmd("FileType", { + pattern = "nix", + callback = function() + vim.opt_local.shiftwidth = 2 + vim.opt_local.tabstop = 2 + vim.opt_local.expandtab = true + end, +}) |
