-
Notifications
You must be signed in to change notification settings - Fork 65
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
Refactor: Imports structure #1085
base: main
Are you sure you want to change the base?
Conversation
modules/profiles/flake-module.nix
Outdated
inputs.self.nixosModules.hw-laptop | ||
inputs.self.nixosModules.disko-debug-partition |
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.
do not add disko here it is not used in all laptop configurations only in the debug ones
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.
as of now (pre PR#1074), it is. same as current implementation with commonModules. also, the enable flag is now in reference profile, so it can be turned on/off in the settings
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.
Would it cause issues if the disko module is not imported at all? Since the target in #1074 would not build properly, conflicting options with disko if imported.
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.
My thinking here is that we sync the targets identifier and the conditional modules definition, i.e. target = hw + platform profile identifier, with platform profile {mvp, ...} + {debug, release, any-other}. This would allow to move towards a generic interface for a laptop-builder and target definition. Not quite sure if a disk layout configuration at this level is necessary? And could we not just make the namespaces not overlapping? Then, instead of relying on conditional imports we control it via config settings, e.g. using -debug/release or even additional flags
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.
there are a min of 3 levels of config that need to be supported.
- the hardware config (e.g. x1)
- the profile config (e.g. mvp)
- the target config ( with customizations available specific to this target definition)
The current laptop targets/laptop/flake-module.nix supports this.
ghaf = { | ||
# Enable disk partitioning | ||
partitioning.disko.enable = true; |
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.
Not all targets would use disko especially with #1074, even the disko module shouldn't be included as that would conflict with certain options.
modules/profiles/flake-module.nix
Outdated
inputs.self.nixosModules.hw-laptop | ||
inputs.self.nixosModules.disko-debug-partition |
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.
Would it cause issues if the disko module is not imported at all? Since the target in #1074 would not build properly, conflicting options with disko if imported.
Create common and development flake module files. Signed-off-by: Manuel Bluhm <[email protected]>
Add flake module for desktop. Signed-off-by: Manuel Bluhm <[email protected]>
Unify and cleanup hardware modules, moving relevant imports to the places where needed. Signed-off-by: Manuel Bluhm <[email protected]>
- remove hardware definition dependencies - move shm and mem manager - initial reference flake module file Signed-off-by: Manuel Bluhm <[email protected]>
Description of changes
Make more flake-modules, and various changes. To be discussed.
Checklist for things done
x86_64
aarch64
riscv64
make-checks
and it passesnixos-rebuild ... switch
Instructions for Testing