Comments (6)
Hi @x10an14,
The way flake-parts uses the module system is more complicated than NixOS, so don't despair :)
It seems that I've underestimated the difficulty of developing new modules. I'll make an attempt at filling in some of the missing documentation about the module system specifically.
at some times/places these are different
configs
,
That deserves an article of its own.
from flake-parts.
self
is only a module argument, not an option, let alone an option you can define a value for. The value of self
comes directly from Nix.
In order to make your allowedUnfreePackages
global, it doesn't have to be in flake
, but you do have to declare it, as it seems that you want to merge definitions from multiple places.
What you're trying to solve is not a unique problem though. I think the right solution is to have a better nixpkgs module, and perhaps also a home manager module that integrates with the pkgs
constructed by that nixpkgs module.
Refs #74
from flake-parts.
(...) I'll close this, but feel free to ask questions.
Thanks!
Aren't you invoking those functions from within a scope that has the flake-parts
config
? You could then forward it.
I already tried asking for guidance/help with that over at your Matrix channel, but I didn't feel comfortable continuing the discussion to be honest.
I felt there was too much of a disconnect between the respective perspectives of the ones in the know, and the newbie who knows next to nothing (me). It didn't make me feel as if I could ask for help without becoming too much of a bother.
To be clear; I suspect no ill will - a lot gets missed/misunderstood with written chat.
I just didn't feel like it was possible to communicate due to lack of what I'd call a "common platform of understanding".
I still do not understand the differences/similarities/intricacies of config
from within the contexts of the referenced function invocations here, and the config.flake
mentioned in your documentation. I have no idea what I don't understand, which makes it nigh impossible for me to know what questions to ask, let alone how to formulate them correctly.
(And this from a ~2yrs nix(os) user who has experience from writing and using of options with the nixos/home-manager config
specialArgs variable).
I just know that at some times/places these are different configs
, and at others they are not. Not really managed to find examples showing this interplay between them/how to leverage config.flake
.
from flake-parts.
I solved it without flake-parts for now. Subscribed to #74 for progress updates.
Ideally, I wish to assign this allowedUnfreePackages
option to a flake-global variable, instead of config
.
(Due config
only being available after home-manager.lib.homeManagerConfiguration
or nixpkgs.lib.nixosSystem
invocations).
from flake-parts.
Aren't you invoking those functions from within a scope that has the flake-parts config
? You could then forward it.
I'll close this, but feel free to ask questions.
from flake-parts.
Looking forward to it!'
from flake-parts.
Related Issues (20)
- Provide a way to easily run doc tests HOT 1
- Explicitly pass default nixpkgs to mkFlake
- Document, how to declare packages only for concrete system
- perSystem.packages cannot be used with recursive packages HOT 1
- NixOS options not 1:1 available HOT 2
- nixosConfigurations example does not invoke nixosConfigurations HOT 2
- infinite recursion when `self` assigned to option HOT 6
- Add `templates` to `flake` HOT 2
- Infinite recursion error when unknown option is set HOT 3
- nix flake show broken HOT 2
- Set `_file` and `_class` for modules defined under `flake.modules.${className}.${moduleName}` HOT 1
- How to define a custom flake attribute for a reusable module HOT 2
- Attribute set is expected to be unique HOT 2
- Generate nixosConfigurations HOT 1
- Per system option with a different name? HOT 4
- Flakestry releases HOT 2
- Q: How to correctly implement a home-manager? HOT 1
- Do we really need nixpkgs in inputs instead of the lightweight nix-community/nixpkgs.lib? HOT 2
- `flake-parts` doesn't evaluate. HOT 3
- Declaring per-system functions as flake outputs HOT 1
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-parts.