Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggles to home manager modules #17

Open
alecandido opened this issue Mar 5, 2024 · 1 comment
Open

Toggles to home manager modules #17

alecandido opened this issue Mar 5, 2024 · 1 comment
Labels
nix Nix related (config or tool) refactor Improve the configuration code

Comments

@alecandido
Copy link
Owner

alecandido commented Mar 5, 2024

Instead of using a list of toggles, like:
https://github.com/alecandido/nixpkgs/blob/b4d147a5d43712a8295c718bff96980eaaaedfee/systems/nixos/default.nix#L64
it would be more natural to have attributes, like:

{
  amenities = true;
  gnome = true;
  neovim = {
    lsp = true;
  };
  shell = "nu";
  thunderbird = true;
}

But even better, it would be to have an home-manager module where to write some configurations, and then use this high-level configs to enable a series of other configs (like right now it is happening for toggles).
https://nixos.org/manual/nixos/stable/index.html#sec-writing-modules

Using home-manager it should on every platform (including darwin), and the configurations could be added as an extra module in systems/.

@alecandido alecandido added nix Nix related (config or tool) refactor Improve the configuration code labels Mar 5, 2024
@alecandido
Copy link
Owner Author

  • feature-gate neovim LSP servers

    • they are the biggest part of neovim (the other configs are light)

    • mostly at the level of Nix (avoid installing some packages)

    • propagate the information with an environment variable and catch it inside neovim
      as well (to disable the related configs and avoid failing)

      • in the first place let it fail
      • and then fix the failures with a test case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nix Nix related (config or tool) refactor Improve the configuration code
Projects
None yet
Development

No branches or pull requests

1 participant