mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
Apparently, depot could be stopped. Who knew?
This commit is contained in:
parent
c3fe9a355e
commit
b383c70492
196 changed files with 21 additions and 21 deletions
41
config/modules/meta/imports.nix
Normal file
41
config/modules/meta/imports.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ config, lib, profiles, root, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options = {
|
||||
lib = mkOption {
|
||||
type = types.attrsOf (types.attrsOf types.unspecified);
|
||||
};
|
||||
network.importing = {
|
||||
nixosImports = mkOption {
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
homeImports = mkOption {
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
users = mkOption {
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
network.importing = {
|
||||
nixosImports = mkDefault (map (path: toString path) [
|
||||
(root + "/config/hosts/HN/nixos.nix")
|
||||
(root + "/config/trusted/hosts/HN/nixos.nix")
|
||||
]);
|
||||
homeImports = mkDefault (map (path: toString path) [
|
||||
(root + "/config/hosts/HN/home.nix")
|
||||
(root + "/config/trusted/hosts/HN/home.nix")
|
||||
]);
|
||||
users = mkDefault (singleton "kat");
|
||||
};
|
||||
lib.kw.nodeImport = hostName: lib.nodeImport {
|
||||
inherit (config.network.importing) nixosImports homeImports users;
|
||||
inherit profiles hostName;
|
||||
};
|
||||
|
||||
_module.args = { inherit (config.lib) kw; };
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue