diff options
Diffstat (limited to '')
-rw-r--r-- | flake/default.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/flake/default.nix b/flake/default.nix new file mode 100644 index 0000000..443999e --- /dev/null +++ b/flake/default.nix @@ -0,0 +1,54 @@ +{inputs, ...}: { + perSystem = { + config, + system, + ... + }: let + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [inputs.nixvim.overlays.default]; + }; + nixVimConfig = + (import ../hm/nixvim/config.nix pkgs) + // { + colorschemes.gruvbox.enable = true; + plugins.airline.settings.theme = "minimalist"; + }; + nvim = inputs.nixvim.legacyPackages."${system}".makeNixvim nixVimConfig; + hooks = inputs.self.checks.${system}.pre-commit; + in { + devShells.default = pkgs.mkShell { + inherit (hooks) shellHook; + buildInputs = hooks.enabledPackages; + packages = with pkgs; [ + nil + statix + alejandra + sops + inputs.ragenix.packages."${system}".default + ]; + }; + + formatter = pkgs.alejandra; + + packages = { + inherit nvim; + default = nvim; + }; + checks = { + nvim = inputs.nixvim.lib.${system}.check.mkTestDerivationFromNvim { + inherit nvim; + name = "My NixVim Configuration"; + }; + pre-commit = inputs.git-hooks.lib.${system}.run { + src = ./.; + hooks = { + alejandra.enable = true; + }; + }; + }; + }; + flake = { + nixosConfigurations = import ./nixosConfigurations inputs; + }; +} |