From 152de38181eca203c939ba2a5d50e0d76d522dc8 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 18 Jan 2026 21:59:30 -0600 Subject: Restructure --- modules/common.nix | 2 +- modules/home.nix | 16 ---------------- modules/home/default.nix | 16 ++++++++++++++++ modules/home/nvim.nix | 12 ------------ modules/home/nvim/default.nix | 14 ++++++++++++++ modules/home/nvim/global_config.lua | 12 ++++++++++++ 6 files changed, 43 insertions(+), 29 deletions(-) delete mode 100644 modules/home.nix create mode 100644 modules/home/default.nix delete mode 100644 modules/home/nvim.nix create mode 100644 modules/home/nvim/default.nix create mode 100644 modules/home/nvim/global_config.lua (limited to 'modules') 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.nix deleted file mode 100644 index f844fee..0000000 --- a/modules/home.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, pkgs, inputs, ... }: -{ - imports = [ ./home/nvim.nix ]; - - home.stateVersion = "25.11"; - - home.packages = with pkgs; [ ]; - - programs.git = { - enable = true; - settings.user.name = "Christian"; - settings.user.email = "thechristiansoltermann@gmail.com"; - }; - - programs.home-manager.enable = true; -} diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..461f273 --- /dev/null +++ b/modules/home/default.nix @@ -0,0 +1,16 @@ +{ config, pkgs, inputs, ... }: +{ + imports = [ ./nvim ]; + + home.stateVersion = "25.11"; + + home.packages = with pkgs; [ ]; + + programs.git = { + enable = true; + settings.user.name = "Christian"; + settings.user.email = "thechristiansoltermann@gmail.com"; + }; + + programs.home-manager.enable = true; +} diff --git a/modules/home/nvim.nix b/modules/home/nvim.nix deleted file mode 100644 index f715f75..0000000 --- a/modules/home/nvim.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: { - programs.neovim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - - plugins = with pkgs.vimPlugins; [ - nvim-treesitter.withAllGrammars - ]; - }; -} diff --git a/modules/home/nvim/default.nix b/modules/home/nvim/default.nix new file mode 100644 index 0000000..6cae9d6 --- /dev/null +++ b/modules/home/nvim/default.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: { + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + + 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, +}) -- cgit v1.2.3