Comments (11)
As of commit states... I Will fix the breaking stuff later, but I am quite happy with the new implementation/dataflow of it.
Feel free to try out github:/gytis-ivaskevicius/flake-utils-plus/staging
Edit:
Also, I went through your config - one note: system = "x86_64-linux";
in nixosProfiles
is redundant since that's the default
from flake-utils-plus.
When using flake-utils-plus cases like these can be specified in two areas:
- For channel-specific configuration (i believe this is what you are looking for) https://github.com/gytis-ivaskevicius/flake-utils-plus/blob/master/examples/fully-featured-flake.nix#L46-L48
- Or globally (applied to all channels) https://github.com/gytis-ivaskevicius/flake-utils-plus/blob/master/examples/fully-featured-flake.nix#L63-L66
from flake-utils-plus.
Yes, I found that, but I build up a list of allowed packages in the nixos modules for my machines, which I don't have access to at that point.
from flake-utils-plus.
Interesting use case, admittedly I don't really see much point in doing something like that but ill look into it regardless. I obviously have not tested it but fix should be as simple as this:
Replace this code block: https://github.com/gytis-ivaskevicius/flake-utils-plus/blob/master/systemFlake.nix#L75-L85
with:
{config, ...}: {
networking.hostName = name;
nixpkgs = {
pkgs = selectedNixpkgs;
config = selectedNixpkgs.config // config.nixpkgs.config;
};
system.configurationRevision = mkIf (self ? rev) self.rev;
nix.package = mkDefault selectedNixpkgs.nixUnstable;
}
(two lines changed, will test it out once I am available)
from flake-utils-plus.
That doesn't seem to work. I think the problem is caused by the pkgs = selectedNixpkgs;
line. The config applied in nixpkgs.config
doesn't seem to apply to it, but only to the nixpkgs
that is used for nixpkgs.lib.nixosSystem
. When I remove the pkgs = selectedNixpkgs
line (and manually add the overlays I use) it works as expected.
from flake-utils-plus.
Pushed some changes, fixed channels switching, few other changes.
What's unfortunate is that it seems that I will not be able to implement nixpkgs.config.xyz
with the addition of channel patching (User will be forced to pick one of these features), but we will see. I Will give it some more thought overnight
The next release is planned for the weekend.
from flake-utils-plus.
Ah, that is unfortunate, the easy patching was one of my main reasons for starting to use this. Am I correct in thinking that this is the main blocker for the combination? Do you know what the underlying issue is?
from flake-utils-plus.
Yes, @chvp, you are correct. More specifically because of this NixOS/nix#4669.
But here is a solution to your specific problem:
TL;DR: implement explicit unfree package definitions in different manner
How?
in your flake.nix:
{
inputs.nixpkgs.input = nixpkgs;
inputs.nixpkgs.overlayBuilder = channels: [
(final: prev: { unfree = channels.unfree; })
];
inputs.unfree.input = nixpkgs;
inputs.unfree.config.allowUnfree = true;
}
(untested, should more or less work, might have a typo or two)
And instead of building some fancy array of allowed packages now, you can define unfree packages by simply typing pkgs.unfree.google-chrome
This achieves the same result while being much simpler, easier to implement, and resulting in fewer lines of code
from flake-utils-plus.
Hmm, that is an interesting alternative for making the unfree packages explicit. I'll try that out tomorrow. Thanks for the issue on nix, I subscribed to it to keep updated.
from flake-utils-plus.
It took a while before I was able to get to it, but your solution doesn't seem to work. It refuses to evaluate because of unfree packages.
from flake-utils-plus.
I got a strong feeling that this is going to be one of the limitations of Nix (patching + dynamic configuration). Will need to look into it more :/
from flake-utils-plus.
Related Issues (20)
- Unable to explicitly specify networking.hostName HOT 1
- `generateNixPathFromInputs` should use a dir entry instead of per-flake entries HOT 4
- `generateNixPathFromInputs == true && linkInputs == false` should be an error HOT 1
- `generateNixPathFromInputs` should check for `default.nix` file instead of for package set HOT 3
- Print which host is being built HOT 4
- Same condition as previous if expression HOT 1
- `ca-references` in extra-experimental-features is now causing errors HOT 2
- Build fails with nix-darwin: The option `_module.args.inputs' is defined multiple times. HOT 12
- Deprecated evalModules arguments HOT 2
- How to use new flake overlays HOT 2
- How to cross compile? HOT 8
- Expose `fup-repl` through `blueprints` HOT 1
- Need for a `system` arg for outputsBuilder HOT 1
- Add 'channels' argument to sharedOverlays HOT 1
- nix-shell to respect system's overlays HOT 4
- Devshell attribute 'x86_64-linux' missing
- FUP broken on nixos-unstable-small HOT 2
- Can't use flakes inputs modifying `nixpkgs.config` anymore HOT 3
- channels.<nixpkgs>.overlaysBuilder doesn't work if supportedSystems contains more than one architecture HOT 5
- `overlayNames` errors; can't necessarily pass `null` to an overlay HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flake-utils-plus.