2021-02-14 23:50:49 +01:00
|
|
|
{ extern
|
|
|
|
, home
|
|
|
|
, lib
|
2020-08-02 06:08:41 +02:00
|
|
|
, nixos
|
2021-02-14 23:50:49 +01:00
|
|
|
, override
|
2021-01-19 08:51:23 +01:00
|
|
|
, pkgs
|
2020-08-02 06:08:41 +02:00
|
|
|
, self
|
|
|
|
, system
|
|
|
|
, ...
|
|
|
|
}:
|
2019-12-05 06:36:36 +01:00
|
|
|
let
|
2021-03-14 08:10:51 +01:00
|
|
|
inherit (lib) dev;
|
2019-12-05 06:36:36 +01:00
|
|
|
|
2021-02-06 21:26:17 +01:00
|
|
|
suites = import ../suites { inherit lib; };
|
2021-02-02 04:26:47 +01:00
|
|
|
|
2021-03-14 08:10:51 +01:00
|
|
|
modules =
|
|
|
|
let
|
|
|
|
core = ../profiles/core;
|
|
|
|
modOverrides = { config, overrideModulesPath, ... }:
|
2020-07-31 06:17:28 +02:00
|
|
|
let
|
2021-03-14 08:10:51 +01:00
|
|
|
overrides = import ../overrides;
|
|
|
|
inherit (overrides) modules disabledModules;
|
2020-07-31 06:17:28 +02:00
|
|
|
in
|
2021-03-14 08:10:51 +01:00
|
|
|
{
|
|
|
|
disabledModules = modules ++ disabledModules;
|
|
|
|
imports = map
|
|
|
|
(path: "${overrideModulesPath}/${path}")
|
|
|
|
modules;
|
|
|
|
};
|
|
|
|
|
|
|
|
global = {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
|
|
|
|
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
|
|
|
|
|
|
|
nix.nixPath = [
|
|
|
|
"nixpkgs=${nixos}"
|
|
|
|
"nixos-config=${self}/compat/nixos"
|
|
|
|
"home-manager=${home}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs = { inherit pkgs; };
|
|
|
|
|
|
|
|
nix.registry = {
|
|
|
|
devos.flake = self;
|
|
|
|
nixos.flake = nixos;
|
|
|
|
override.flake = override;
|
|
|
|
};
|
|
|
|
|
|
|
|
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Everything in `./modules/list.nix`.
|
|
|
|
flakeModules =
|
|
|
|
builtins.attrValues self.nixosModules;
|
|
|
|
|
|
|
|
in
|
|
|
|
flakeModules ++ [
|
|
|
|
core
|
|
|
|
global
|
|
|
|
modOverrides
|
|
|
|
] ++ extern.modules;
|
|
|
|
|
|
|
|
specialArgs = extern.specialArgs // { inherit suites; };
|
|
|
|
|
|
|
|
mkHostConfig = hostName:
|
|
|
|
let
|
|
|
|
local = {
|
|
|
|
require = [
|
|
|
|
"${toString ./.}/${hostName}.nix"
|
|
|
|
];
|
|
|
|
|
|
|
|
networking = { inherit hostName; };
|
2021-03-16 20:50:38 +01:00
|
|
|
|
|
|
|
_module.args = {
|
|
|
|
inherit self;
|
|
|
|
};
|
2021-03-14 08:10:51 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
dev.os.devosSystem {
|
|
|
|
inherit system specialArgs;
|
|
|
|
|
|
|
|
modules = modules ++ [
|
|
|
|
local
|
|
|
|
{
|
|
|
|
lib = { inherit specialArgs; };
|
|
|
|
lib.testModule = {
|
|
|
|
imports = modules;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2019-12-14 05:30:43 +01:00
|
|
|
};
|
2019-12-18 00:03:44 +01:00
|
|
|
|
2021-03-14 08:10:51 +01:00
|
|
|
hosts = dev.os.recImport
|
|
|
|
{
|
|
|
|
dir = ./.;
|
|
|
|
_import = mkHostConfig;
|
|
|
|
};
|
2020-07-31 06:17:28 +02:00
|
|
|
in
|
|
|
|
hosts
|