diff --git a/flake.nix b/flake.nix index ae436ab..686e971 100644 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,7 @@ outputs = inputs@{ self, nixpkgs, ... }: { + modules.default = import ./modules; nixosModules.default = import ./nixos-modules; homeManagerModules.default = import ./home-modules; nixosConfigurations = import ./systems { inherit self inputs nixpkgs; }; diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..f2d25bf --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + imports = [ + ./neovim + ]; +} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix new file mode 100644 index 0000000..d9b669b --- /dev/null +++ b/modules/neovim/default.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: + +let + cfg = config.jopejoe1.neovim; +in +{ + options.jopejoe1.neovim = { + enable = lib.mkEnableOption "Enable neovim"; + }; + + config = lib.mkIf cfg.enable { + programs.nixvim = { + enable = true; + }; + }; +} diff --git a/nixos-modules/default.nix b/nixos-modules/default.nix index ef9b7c6..e75064b 100644 --- a/nixos-modules/default.nix +++ b/nixos-modules/default.nix @@ -29,5 +29,7 @@ self.inputs.nixos-generators.nixosModules.all-formats self.inputs.sops-nix.nixosModules.sops self.inputs.catppuccin.nixosModules.catppuccin + self.inputs.nixvim.nixosModules.nixvim + self.outputs.modules.default ]; } diff --git a/systems/omoikane/default.nix b/systems/omoikane/default.nix index 953e7a7..e3ab70d 100644 --- a/systems/omoikane/default.nix +++ b/systems/omoikane/default.nix @@ -32,6 +32,7 @@ enable = true; layout = "us"; }; + neovim.enable = true; user = { jopejoe1.enable = true; root.enable = true;