Comments (4)
writeZone
relies onpkgs.writeTextFile
, which is only available when the fullnixpkgs
is instantiated (import "${nixpkgs}" { system = "some-system"; }
).
What do you mean? How are you importing dns/default.nix
?
from dns.nix.
Here's a minimal example:
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.dns = { url = "github:kirelagin/nix-dns"; inputs.nixpkgs.follows = "nixpkgs"; };
outputs = { self, nixpkgs, dns }: {
defaultPackage.x86_64-linux = dns.lib.writeZone "example.invalid" {
SOA = { nameServer = "ns.example.invalid"; adminEmail = "[email protected]"; serial = 1; };
};
};
}
nix build
results in:
error: --- EvalError ----------------------------------------------------------------- nix
at: (32:5) in file: /nix/store/lnphin86szjd22maxjcj51kk13gf34nl-source/dns/default.nix
31| writeZone = name: zone:
32| pkgs.writeTextFile {
| ^
33| name = "${name}.zone";
attribute 'writeTextFile' missing
writeZone
seems to be the only part of nix-dns that accesses something out of pkgs.lib
(which in flake mode is the lib
output of the Nixpkgs flake) and that's why only it breaks.
from dns.nix.
Hm. And there's no way to actually import nixpkgs
in pure mode without specifying what system we're running on, which the lib
flake attribute doesn't support.
Maybe we could use builtins.toFile
instead of pkgs.writeTextFile
, as the zone shouldn't depend on any derivations?
from dns.nix.
Hmmmm, I think the correct solution here would be to move writeZone
out of the lib
output into some other output and do the full eachDefaultSystem
dance.
from dns.nix.
Related Issues (13)
- Long DKIM Keys (or other long TXT record) lead to syntax error in bind9 HOT 1
- Have some tests HOT 1
- Support for unqualified domain names
- Use of `dns.nix` triggers infinite recursion HOT 5
- Is there a way to import this module to have it available in all imported files? HOT 3
- Provide more detailed examples
- Difficult to use ACME/Let's Encrypt with dns.nix HOT 8
- "error: cannot coerce a set to a string" when eval lib.types HOT 3
- DMARC: add support for external destination verification
- provide a hostTTL function HOT 3
- Maintenance status HOT 3
- Expose defaults.ttl as an option 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 dns.nix.