···11{
22 inputs = { };
3344- outputs =
55- { self }:
66- {
77- flakeModule = import ./flake-module.nix { easy-hosts = self; };
88- flakeModules.default = import ./flake-module.nix { easy-hosts = self; };
44+ outputs = _: {
55+ flakeModule = ./flake-module.nix;
66+ flakeModules.default = ./flake-module.nix;
971010- templates = {
1111- multi = {
1212- path = ./examples/multi;
1313- description = "A multi-system flake with auto construction enabled, but only using x86_64-linux.";
1414- };
88+ templates = {
99+ multi = {
1010+ path = ./examples/multi;
1111+ description = "A multi-system flake with auto construction enabled, but only using x86_64-linux.";
1212+ };
15131616- multi-specialised = {
1717- path = ./examples/multi-specialised;
1818- description = "A multi-system flake with auto construction enabled, using the custom class system of easy-hosts";
1919- };
1414+ multi-specialised = {
1515+ path = ./examples/multi-specialised;
1616+ description = "A multi-system flake with auto construction enabled, using the custom class system of easy-hosts";
1717+ };
20182121- not-auto = {
2222- path = ./examples/not-auto;
2323- description = "A flake with auto construction disabled, using only the `easyHosts.hosts` attribute.";
2424- };
1919+ not-auto = {
2020+ path = ./examples/not-auto;
2121+ description = "A flake with auto construction disabled, using only the `easyHosts.hosts` attribute.";
2222+ };
25232626- only = {
2727- path = ./examples/only;
2828- description = "A flake with auto construction enabled, with only one class and a more 'flat' structure.";
2929- };
2424+ only = {
2525+ path = ./examples/only;
2626+ description = "A flake with auto construction enabled, with only one class and a more 'flat' structure.";
3027 };
3128 };
2929+ };
3230}
+4-6
lib.nix
···22 lib,
33 inputs,
44 withSystem,
55- easy-hosts,
66- ...
75}:
86let
97 inherit (inputs) self;
···263261 # well this is how we do it use it for all args that don't need to rosolve module structure
264262 (singleton {
265263 key = "easy-hosts#specialArgs";
266266- _file = "${easy-hosts.outPath}/lib.nix";
264264+ _file = "${__curPos.file}";
267265268266 _module.args = withSystem system (
269267 { self', inputs', ... }:
···277275 # like the system type and the hostname
278276 (singleton {
279277 key = "easy-hosts#hostname";
280280- _file = "${easy-hosts.outPath}/lib.nix";
278278+ _file = "${__curPos.file}";
281279282280 # we set the systems hostname based on the host value
283281 # which should be a string that is the hostname of the system
···286284287285 (singleton {
288286 key = "easy-hosts#nixpkgs";
289289- _file = "${easy-hosts.outPath}/lib.nix";
287287+ _file = "${__curPos.file}";
290288291289 nixpkgs = {
292290 # you can also do this as `inherit system;` with the normal `lib.nixosSystem`
···305303 # modules, if this is not set then you will get an error
306304 (optionals (class == "darwin") (singleton {
307305 key = "easy-hosts#nixpkgs-darwin";
308308- _file = "${easy-hosts.outPath}/lib.nix";
306306+ _file = "${__curPos.file}";
309307310308 # without supplying an upstream nixpkgs source, nix-darwin will not be able to build
311309 # and will complain and log an error demanding that you must set this value