From 72830ddc21e51335bc3c2f941b398bcb5c531d93 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 22 Mar 2021 20:25:50 +0100 Subject: [PATCH] Remove "rec" from flake output --- flake.nix | 11 ++++++----- nix/lib/default.nix | 5 +---- nix/nixos-module/default.nix | 7 +++---- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index a25d2ca..d9157a4 100644 --- a/flake.nix +++ b/flake.nix @@ -21,12 +21,13 @@ }) ]; }; in - rec { - lib = + { + lib = nixpkgs.lib.extend (final: prev: import ./nix/lib { - inherit self nixpkgs; + inherit self; inherit (zentralwerk-network-key.lib) gpgKey; - }; + pkgs = nixpkgs.legacyPackages.x86_64-linux; + }); packages = forAllSystems (system: import ./nix/pkgs { inherit self nixpkgs system; } @@ -40,7 +41,7 @@ builtins.mapAttrs (hostName: _: nixosConfig hostName) ( nixpkgs.lib.filterAttrs (_: { role, ... }: builtins.elem role [ "server" "container" ] - ) lib.config.site.hosts + ) self.lib.config.site.hosts ); # nixosConfigurations.test_vm = diff --git a/nix/lib/default.nix b/nix/lib/default.nix index 781396f..e3a0ac3 100644 --- a/nix/lib/default.nix +++ b/nix/lib/default.nix @@ -1,8 +1,5 @@ -{ self, nixpkgs, gpgKey }: +{ self, gpgKey, pkgs }: -let - pkgs = nixpkgs.legacyPackages.x86_64-linux; -in { config = import ./config { inherit self pkgs gpgKey; }; diff --git a/nix/nixos-module/default.nix b/nix/nixos-module/default.nix index 63d3c81..5dd138f 100644 --- a/nix/nixos-module/default.nix +++ b/nix/nixos-module/default.nix @@ -1,12 +1,11 @@ -{ self, config, lib, ... }: +{ config, lib, ... }: let inherit (config.networking) hostName; inherit (lib) optional; - hostConfig = self.lib.config.site.hosts.${hostName}; -in -builtins.trace (lib.generators.toPretty {} self.lib.config) { + hostConfig = lib.config.site.hosts.${hostName}; +in { imports = [ #{ config = self.lib.config; } ./defaults.nix