stockholm: call the base module what it is

This reduces confusion when referring to stockholm, which is either the
whole repository or the value of the top-level default.nix, which is in
a way the same thing. :)
This commit is contained in:
tv 2015-10-20 03:49:10 +02:00
parent 433479bc51
commit f3873a2640
1 changed files with 11 additions and 9 deletions

View File

@ -42,7 +42,7 @@ let out = {
inherit users; inherit users;
# Additionally, output lib and pkgs for easy access from the shell. # Additionally, output lib and pkgs for easy access from the shell.
# Notice how we're evaluating just the stockholm module to obtain pkgs. # Notice how we're evaluating just the base module to obtain pkgs.
inherit lib; inherit lib;
inherit (eval {}) pkgs; inherit (eval {}) pkgs;
}; };
@ -55,10 +55,10 @@ let out = {
kpath = lib.nspath "krebs"; kpath = lib.nspath "krebs";
upath = lib.nspath current-user-name; upath = lib.nspath current-user-name;
# This is the base stockholm NixOS module. It's purpose is to provide a # This is the base module. Its purpose is to provide modules and
# modules and packages, both common ones, found in krebs/ as well as the # packages, both common ones, found in krebs/ as well as the current user's,
# current user's, found in the user's namespace. # found in the user's namespace.
stockholm = { base-module = {
imports = map (f: f "3modules") [ kpath upath ]; imports = map (f: f "3modules") [ kpath upath ];
nixpkgs.config.packageOverrides = pkgs: nixpkgs.config.packageOverrides = pkgs:
@ -71,13 +71,15 @@ let out = {
kpkgs // upkgs; kpkgs // upkgs;
}; };
# The above stockholm module is used together with a NixOS configuration to # The above base module is used together with a NixOS configuration to
# produce a system. Stockholm really just provides additional packages and # produce a system. Notice how stockholm really just provides additional
# modules that don't fit upstream for one reason or another. # packages and modules on top of NixOS. Some of this stuff might become
# useful to a broader audience, at which point it should probably be merged
# and pull-requested for inclusion into NixOS/nixpkgs.
# TODO provide krebs lib, so modules don't have to import it awkwardly # TODO provide krebs lib, so modules don't have to import it awkwardly
eval = config: import <nixpkgs/nixos/lib/eval-config.nix> { eval = config: import <nixpkgs/nixos/lib/eval-config.nix> {
modules = [ modules = [
stockholm base-module
config config
]; ];
}; };