From 29afdc5c149af0b374dde8bbd4d73c35490496d5 Mon Sep 17 00:00:00 2001 From: Jens Nolte <jens@nightmarestudio.de> Date: Tue, 22 Oct 2019 14:06:13 +0200 Subject: [PATCH] Create parameterized top-level entry point --- nixos/default.nix | 7 ++++++- nixos/layers/base.nix | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nixos/default.nix b/nixos/default.nix index 5f893fd..a5de97f 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,9 +1,14 @@ +# This is the entry point for my NixOS configuration. +{ layers ? [] }: { lib, config, pkgs, ... }: +let + layerImports = map (l: ./layers + "/${l}.nix") layers; +in { imports = [ ./modules - ]; + ] ++ layerImports; nixpkgs.config = { packageOverrides = ( import ./pkgs ) { inherit lib config; } ; diff --git a/nixos/layers/base.nix b/nixos/layers/base.nix index e86ff1f..5cfbecf 100644 --- a/nixos/layers/base.nix +++ b/nixos/layers/base.nix @@ -4,7 +4,6 @@ { imports = [ - ./.. ./zsh.nix ]; -- GitLab