-
Notifications
You must be signed in to change notification settings - Fork 108
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
New API Porting Guide #283
Comments
Hey when pulling in the latest core into my config I get:
As the only change from my last working config was trying to switch to the new layout (twice the first try I did not see there was this guide) I guess there might be a name clash or something similar from this. EDIT: also happens for the direnv where I think no gnome modules and or packages should be used. Additionally show-trace only traces it back to the |
This is very interesting. At first look I would think it was because of using an option and then updating nixpkgs. But considering you never set corePackages and the option is from over a year ago, that doesn't really make sense. Can you post the full stack trace output of the configuration building, that should help with debugging. Also if possible, seeing your repository's code could be helpful - if its private then just the stack trace should be okay. |
thank you for taking the time, here is the link to the broken config https://cloud.tissot.de/gitea/benneti/nixos/src/branch/broken and here is the traceback:
|
Thank you for the detailed report! I think I know exactly what is going on now. I opened an issue to explain the problem in digga: #13. Although this might actually a problem that is being triggered by a function in As a workaround you can add the |
thank you very much, overlays were basically the only thing I did not consider (as I forgot I had one for nautilus and thereby gnome admittedly)! |
Not sure if your talking about overlays or devos. One of the goals for devos is to try and intuitively export as many of your creations as possible. We tried to create a sharing model for overlays and packages for anyone that uses digga. So its a bit counter-intuitive in terms of lazy evaluation, but fits well with flakes and the sharing goal. |
Yes thats what I meant. |
I think there is another issue due to exporting everything, it seems like packages in overlays that are currently broken are tried to be built when entering the direnv currently. |
Sorry for kinda spamming this thread, but I think there is another small problem. |
This could be because we try to build all packages defined in your overlay when you enter the devShell. This follows the same rules as package exporting, so if you don't want a package to be built you can set
Now this is an issue, all overlays should be applied to the channels they are passed to. Can you include more details about this? Which overlays weren't applied, and where did you use the package that didn't get changed?
Please keep spamming, the more information here the more stable devos is for all of us. |
How would I add __dontExport to emacs-overlay (thats not part of my config but an external overlay from another flake, for me that is https://github.com/nix-community/emacs-overlay ). The package that had the overlay not applied was schildichat and it is installed via homemanager, here the link to the commit where i move the contents of the overlay to the package which makes things work again, but is not that clean anymore https://cloud.tissot.de/gitea/benneti/nixos/commit/09b80c090dab64fb4f7636807eb07d4736d6a620 |
And I realized I disagree with my old self: #14 I don't think building all packages from overlays was the best idea. |
I am happy about the opinion of your new self 😅 |
This could be fixed by |
I just checked again to make sure that the lock for pkgs is up to date and even with an just updated pkgs the overlay is not applied (just to make it clear, before the merge of the new branch it was working). |
No namespacing shouldn't be necessary. I just pulled your repo and it looks like This could be a problem where home-manager gets the wrong |
I don't like that you have been forced to move the overlay into the package definition. This might be caused by the circumstances that the order of.overlays matter and the pkgs.overlay might have got applied afterwards. I don't know at this moment, how imports influences the order. We should validate that. |
I think it does make sense in that case to define everything in But yeah I have been thinking about overlay order with |
This could be a good reason for someone to make use of the old method of just importing all the overlays after |
Just updated core with the digga fix. But you can just do a |
Where should I put disabledModules? Is it a separate overlay or I need to define it in flake.nix? |
Now, you would set it the same way, yet in a (dedicated) module. For example you could have a modules/disble-foo.nix with: {
disabledModules = [ "path/to/module.nix" ];
} Does that help? |
I've been adding secrets to a btw it could be nice to have this issue added to the changelog/release notes. |
We did just add agenix support to the develop branch in devos, so that will be coming in the next release. |
Hey everyone! We just did a lot of refactoring in the core branch and if you are updating to the latest changes I would recommend you read this guide on how to update.
This is a pretty quick explanation, to get more detail take a look at the
doc
folder which carefully goes over all the new API arguments - I also linked relevant doc sections to the headers.The main things to notice are the changes to
extern
,suites
andoverrides
.Suites
Because of how important suites are to the configuration we decided it would be good to just define them in the
flake.nix
itself. You will notice asuites
argument under thenixos
section. You should copy all the content from yoursuites/default.nix
to that argument.Extern
The cool part about extern is that you can see everything a devos system depends on in one file. We believe that this information should actually be in the
flake.nix
too. So you can now just use different API arguments to pass external module and overlays.Overlays
You can just put overlays in the
overlays
argument for thenixos
channel. Where necessary, all external overlays will be automatically filtered out by inspecting yourinputs
.Modules
There is a dedicated
externalModules
argument for this purpose.specialArgs
We currently no longer allow passing specialArgs to host - its possible but quite difficult. The reasoning behind this was that you should add modules in the
flake.nix
directly instead of passing them to hosts and adding them. You can add modules to different hosts by adding lines to thehosts
argument.Overrides
Module overrides are no longer directly demonstrated by default, because of how finicky they are. It is possible by making use of the
disabledModules
key and thelatestModulesPath
special argument.Package overrides, on the other hand, can be done in the
overlays/overrides.nix
file. There are plenty of examples there.Generally as your merging, make sure to drop
extern
,overrides
, andsuites
and move the code from there either to yourflake.nix
or the relevant files.If you would like to split those things up into separate files, you can always just import files into the api arguments. Bonus: to de-clutter, you can leave out any
import
statements, where you would otherwise put them. Most items are piped through amaybeImport
.If you have any issues or comments about the API please comment here or make a dedicated issue. We would love to hear feedback!
The text was updated successfully, but these errors were encountered: