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

export nixosModule as file #934

Merged
merged 1 commit into from
Jan 9, 2025
Merged

export nixosModule as file #934

merged 1 commit into from
Jan 9, 2025

Conversation

Lassulus
Copy link
Collaborator

@Lassulus Lassulus commented Jan 9, 2025

No description provided.

Copy link
Member

@Enzime Enzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@phaer phaer merged commit 11e3073 into master Jan 9, 2025
3 checks passed
@phaer phaer deleted the file-module branch January 9, 2025 15:46
@@ -26,7 +26,7 @@
in
{
nixosModules.default = self.nixosModules.disko; # convention
nixosModules.disko.imports = [ ./module.nix ];
nixosModules.disko = ./module.nix;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rational behind this? If we import modules by file they will have no _file defined. This means if disko is imported twice, there is not deduplication. Also error messages are worse.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems this fixes multiple imports of the disko module, since it is a file it implicitly has _file defined

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why the old code failed to import twice is because the file was imported into Nix manually making it an inline module as opposed to being imported as a file and having _file automatically defined

0e507d7

github-actions bot pushed a commit to clan-lol/clan-core that referenced this pull request Jan 9, 2025
Include fix from nix-community/disko#934
The disko version before this makes the evaluation fail, if machines
import their own disko directly already.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants