Replies: 2 comments
-
Yes. The flake exports modules, you can import them like any other nixos or home manager module. Put inputs.nixCats.homeModule or inputs.nixCats.nixosModule in your modules imports list and then use the module options. The nixos module actually also doubles as a nix darwin module. You can see some examples of useage in this template for home-manager and nixos, which is the same but with extra user level options, they are not full configurations, just examples of how to use the nix module. They are just examples, they show how to put the module inputs.nixCats.whatever into the imports list like you would with any other module, and then some basic useage of the options, it should more or less resemble the normal flake format. Here are the full options lists, and an extra help file with info such as how to make a custom module based on your OWN nvim config that can be used to modify an existing config, and how to grab the packages the module makes for exporting from your system flake https://nixcats.org/nixCats_hm_options.html https://nixcats.org/nixCats_nixos_options.html https://nixcats.org/nixCats_modules.html The module options more or less mirror each section of the flake template but in module form, with some extra features to facilitate editing existing configurations. PS: The issue you found was someone installing an already existing config that was in a flake. They were trying to install THEIR config as a module, which can be done in pretty much the same way as using the base empty module provided by the nixCats flake, except, it comes preloaded with their existing config and then they can edit that further again there if they want. There is, frankly, an obscene number of ways to use/install nixCats and nixCats based configs. Each nixCats package even exports its own module based on the configuration that made it via passthru so that you can go full turtles all the way down if you want :) Edit: some of the comments in those module templates are a little outdated, but not too bad, mostly the one about luaPath is only half correct because there is no lua for it to import from the flake because there isnt a pre built config in the nixCats flake. I should fix that soon and clean them up a bit. But they should serve as instructional enough and thats the only outdated info im seeing at a glance. |
Beta Was this translation helpful? Give feedback.
-
much of the documentation is assuming you are using a flake, but most info will be relevant to modules as well. In particular, these 2 help files are relevant regardless of the method you chose. https://nixcats.org/nixCats_plugin.html https://nixcats.org/nixCats_format.html The standalone flake is the easiest to then export your config separately from your system flake to be ran via nix run. Because its already exported because its its own flake and then you just put it in your flake inputs and then into your packages list. I found that to be the easiest installation method to talk people through that still alows them to use But it is still fairly easily possible to do this with the module form as well from the flake by exporting self.nixosConfigurations.configname.config.nixCats.out.packages Also, if you havent read it, this 100 line overview is the crash course you want to use the module OR flake template (or, well, just the nixCats builder in general) https://nixcats.org/nixCats_installation.html#nixCats.overview |
Beta Was this translation helpful? Give feedback.
-
When configuring a full nixOS system with a flake, I've found that it's typically best practice to avoid the use of
import
and instead write things as nixOS or home-manager modules, to be imported with theimports = [];
option.However, much of the documentation for this project says to call
import
on the configuration. Is there a way to use this as a nixOS or home-manager module? I've read #68, and it's helped somewhat, but ideally I want to be able to integrate my configuration with my system flake to take advantage ofnixd
features rather than having to hard-code my flake path.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions