hardwareRoles #26
No reviewers
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Fachschaft/nixConfig!26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Gonne/nixConfig:hardwareRoles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Not sure, if this is structurally the right way. Furthermore I'm not yet sure about the right way to use this. But currently neither this branch nor https://gitea.mathebau.de/Gonne/nixConfig/src/branch/bragi builds.
hardwareRolesto WIP: hardwareRoles0e1c7651a7tob42a20fbb8b42a20fbb8to72823c5e7d72823c5e7dtob354be1529Seems like we can't do conditional imports (https://discourse.nixos.org/t/conditional-module-imports/34863) and the “right” way is to have a module that is imported and can be enabled afterwards.
Unfortunately, our Xen-DomU config is not a module while lying in the “modules” folder.
I see several ways forward:
We likely need one for hardware anyways.
b354be1529to511243fcbfJa, das mit den module imports ist ein bisschen nervig.
Was mich ein bisschen beruhigt hat ist die Perspektive, dass das Modulsystem das ist, was nixos ein bisschen typsicher gibt. Aber ein Modul kann natürlich nur überprüft werden, wenn es auch geladen wird. Auch disablete Module optionen werden evaluiert sodass manche Problem früher entdeckt werden können.
Für hardware.nix könnte man halt einfach mit einer Moduloption arbeiten, aber das geht bei vm.nix nicht, weil das ja selber wieder einen include macht.
Ich würde empfehlen einfach in der configuration.nix von den System wo es gebraucht wird das vm.nix zu importieren und in anderen nicht.
Alternativ könnte man die default.nix in eine Funktion wrappen, die parameter übernimmt, die nicht durch das modulesystem gehen.
Also
vm: { pkgs, ...das kann man dann mitimports = [ (import ./. true) ]laden. In imports darf nämlich jede expression stehen die zu einem Module evaluiert und nicht nur Dateinamen.511243fcbfto45d0ef262fDanke. Ich habe das jetzt erstmal umgesetzt.
WIP: hardwareRolesto hardwareRolesnix flake check, that is also automated withnix fmt45d0ef262fto4a65723e054a65723e05tod68f6bf45fd68f6bf45fto4197474fecDone. Also added a comment and removed obsolete commented option for efi variables.
Gonne referenced this pull request2024-01-08 15:00:11 +00:00