Skip to content

Commit

Permalink
templates: use auto-configured checks/packages
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jan 19, 2025
1 parent f9e86ab commit 88f5e37
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions templates/new/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
inputs.nixvim.flakeModules.default
];

nixvim = {
# Automatically install `nixvim-<name>` packages for each nixvimConfiguration
# Lets you run `nix run .#nixvim-<name>`
packages.enable = true;
# Automatically install checks for each nixvimConfiguration
# Run `nix flake check .` to verify that your config is not broken
checks.enable = true;
};

# You can define your reusable Nixvim modules here
flake.nixvimModules = {
default = ./config;
Expand All @@ -41,14 +50,9 @@
};
};

checks = {
# Run `nix flake check .` to verify that your config is not broken
default = config.nixvimConfigurations.default.config.build.test;
};

packages = {
# Lets you run `nix run .` to start nixvim
default = config.nixvimConfigurations.default.config.build.package;
# Lets you start nixvim using `nix run`
default = config.packages.nixvim-default;
};
};
};
Expand Down

0 comments on commit 88f5e37

Please sign in to comment.