From 6d25860b08178432a294197dd72eccaf733016d8 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 9 Jun 2022 09:40:02 -0700 Subject: ref(nix): rename lib/ to nix/ Change-Id: If1e608b89b39bd5a53a37b873833a7ea881cb418 Reviewed-on: https://cl.fcuny.net/c/world/+/298 Reviewed-by: Franck Cuny --- nix/default.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 nix/default.nix (limited to 'nix/default.nix') diff --git a/nix/default.nix b/nix/default.nix new file mode 100644 index 0000000..8b46c58 --- /dev/null +++ b/nix/default.nix @@ -0,0 +1,39 @@ +{ inputs }: + +{ + mkSystem = + { hostname + , system + }: + inputs.nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs system hostname; + }; + modules = [ + ../modules + ../hosts/${hostname} + ./private-wireguard.nix + { + networking.hostName = hostname; + nixpkgs = { + config.allowUnfree = true; + overlays = [ + inputs.emacs-overlay.overlay + inputs.nur.overlay + (final: prev: { + tools = { + gerrit-hook = import ../tools/gerrit-hook final; + }; + }) + ]; + }; + # Add each input as a registry + nix.registry = inputs.nixpkgs.lib.mapAttrs' + (n: v: + inputs.nixpkgs.lib.nameValuePair (n) ({ flake = v; })) + inputs; + } + ]; + }; +} -- cgit 1.4.1