diff --git a/flake.nix b/flake.nix index 7e60698..5661800 100644 --- a/flake.nix +++ b/flake.nix @@ -19,29 +19,23 @@ "aarch64-linux" "aarch64-darwin" ]; - forAllSystems = f: lib.genAttrs systems f; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system nixpkgs.legacyPackages.${system}); in { - packages = forAllSystems ( - system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - rec { - zoneFiles = pkgs.callPackage ./zoneConfig.nix { - inherit dns; - }; + packages = forAllSystems (system: pkgs: rec { + zoneFiles = pkgs.callPackage ./zoneConfig.nix { + inherit dns; + }; - nsdConfig = pkgs.callPackage ./nsd.conf.nix { inherit pkgs; }; + nsdConfig = pkgs.callPackage ./nsd.conf.nix { inherit pkgs; }; - default = pkgs.runCommand "pvv-dns" { } '' - mkdir -p $out/zones - mkdir -p $out/etc/nsd + default = pkgs.runCommand "pvv-dns" { } '' + mkdir -p $out/zones + mkdir -p $out/etc/nsd - cp -r ${zoneFiles}/* $out/zones/ - cp -r ${nsdConfig} $out/etc/nsd/nsd.conf - ''; - } - ); + cp -r ${zoneFiles}/* $out/zones/ + cp -r ${nsdConfig} $out/etc/nsd/nsd.conf + ''; + }); }; }