Making the host import system take profiles as an argument

This commit is contained in:
kat witch 2021-08-08 02:14:20 +01:00
parent 8446e95a5f
commit 526d03d18e
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
7 changed files with 57 additions and 21 deletions

View file

@ -1,15 +1,11 @@
{ lib }: hostName: with lib; filter builtins.pathExists [
{ lib }: { hostName, profiles }: with lib; filter builtins.pathExists [
(../../config/hosts + "/${hostName}/nixos.nix")
(../../config/trusted/hosts + "/${hostName}/nixos.nix")
../../config/trusted/profile
../../config/profiles/base
] ++ singleton {
options.home-manager.users = mkOption {
type = types.attrsOf (types.submoduleWith {
modules = filter builtins.pathExists [
(../../config/hosts + "/${hostName}/home.nix")
(../../config/trusted/hosts + "/${hostName}/home.nix")
];
});
] ++ profiles.base.imports ++ singleton {
home-manager.users.kat = {
imports = filter builtins.pathExists [
(../../config/hosts + "/${hostName}/home.nix")
(../../config/trusted/hosts + "/${hostName}/home.nix")
];
};
}