-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdefault.nix
38 lines (31 loc) · 1.07 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# # !!! This file belongs to the yarn framework. !!!
# # !!! Do not change unless you know what you're doing. !!!
let
# This function takes the path of a device module as an argument
# and returns a complete module to be imported in configuration.nix
makeDevice =
devicePath:
{ config, pkgs, lib, ... }:
{
imports = [
# ...the device module holding the system configuration...
devicePath
] ++ (import ./modules/module-list.nix) lib; # ...and all the extra modules.
nixpkgs.config = {
packageOverrides = (import ./pkgs/all-packages.nix) lib;
};
nix.nixPath = [
# Where to get the top-level nix file, i.e. this one
"nixos-config=/etc/nixos/configuration.nix"
# The channel to be subscribed on
"nixpkgs=/home/gpyh/nixpkgs"
];
system.stateVersion = "15.09";
};
deviceModules =
builtins.listToAttrs (map (deviceName: {
name = deviceName;
value = makeDevice (./devices + "/${deviceName}");
}) (import ./devices/all-devices.nix));
in
deviceModules