project-wide: Refactored profile system

This commit is contained in:
kat witch 2021-03-28 21:01:01 +01:00
parent dac56f7394
commit 219efa52ba
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
46 changed files with 52 additions and 107 deletions

View file

@ -1,5 +1,4 @@
{ pkgs, hostsDir ? ../hosts, privateHostsDir ? ../private/hosts
, commonImports ? [ ../nixos.nix ../modules/nixos ], pkgsPath ? ../pkgs
{ pkgs, hostsDir ? ../hosts, profiles, pkgsPath ? ../pkgs
, sources ? { }, witch ? { } }:
with pkgs.lib;
@ -12,10 +11,10 @@ rec {
{ config, ... }: {
_module.args = { inherit hosts groups; };
imports = [
(import (hostsDir + "/${hostName}/nixos"))
(import (privateHostsDir + "/${hostName}/nixos"))
../nixos.nix
../modules/nixos
../modules/nixos/deploy
] ++ commonImports;
];
networking = { inherit hostName; };
nixpkgs.pkgs = import pkgsPath {
inherit (config.nixpkgs) config;
@ -32,7 +31,7 @@ rec {
else
{ })
];
specialArgs = { inherit sources witch hostName; };
specialArgs = { inherit sources profiles witch hostName; };
})) hostNames);
groupNames = unique (concatLists