-
Notifications
You must be signed in to change notification settings - Fork 19
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
Static Site #169
Static Site #169
Conversation
ab18a69
to
396327f
Compare
modules.service = { | ||
path = ./service.nix; | ||
options = "services\\.kbin\\..*"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lorenzleutgeb I understand this as a stopgap to get things off the ground, but really don't like this stringly typed pattern. What if we instead had
modules.services.kbin = ./service.nix
and use the actual attrpath down from modules
as the key in the website rendering? It would impose some constraints on how to lay out the module code, but that don't feel too bad at first glance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That proposal works out for NixOS modules, yes. But not for, say, home-manager. We could do that by inverting things...
{
modules = {
nixos.services.kbin = ./service.nix;
homeManager.programs.kbin-client-tool = ./hm.nix;
};
}
But that's also not nice. Because we already have nixos.{tests,configurations}
. So I suggest that we would add homeManager
at the NixOS level once we actually have non-NixOS modules:
{
nixos.modules.services.kbin = ./services.nix;
homeManager.modules.programs.kbin-client-tool = ./hm.nix;
}
Will create an updated PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait... We also have to flatten the module names for flake outputs. So these names would get longer, e.g. nixosModules."KBin/services/kbin"
but we could use the option path itself only, e.g. nixosModules."services.kbin"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest that we would add homeManager at the NixOS level once we actually have non-NixOS modules
That's what I had in mind, yes.
Fixes #165
Comments:
flake.nix
, all details regarding the static site is inoverview/*
.nixos.modules.<name>.options
to the schema forprojects/*/default.nix
which is a regex that describes the names of the options that the module atnixos.modules.<name>.path
defines. I don't particularly like this, but it's the best solution I can think of at the moment. I did briefly consult with the module system maintainers on Matrix.