2023-08-28 09:09:05 +00:00
|
|
|
{ self, inputs, lib, ... }: {
|
2023-09-02 16:28:31 +00:00
|
|
|
flake.nixosModules.clanCore = { pkgs, options, ... }: {
|
|
|
|
imports = [
|
|
|
|
./secrets
|
|
|
|
./zerotier.nix
|
|
|
|
inputs.sops-nix.nixosModules.sops
|
|
|
|
];
|
|
|
|
options.clanSchema = lib.mkOption {
|
|
|
|
type = lib.types.attrs;
|
|
|
|
description = "The json schema for the .clan options namespace";
|
|
|
|
default = self.lib.jsonschema.parseOptions options.clan;
|
|
|
|
};
|
2023-08-30 13:24:33 +00:00
|
|
|
options.clanCore = {
|
2023-08-28 09:09:05 +00:00
|
|
|
clanDir = lib.mkOption {
|
2023-09-02 16:28:31 +00:00
|
|
|
type = lib.types.either lib.types.path lib.types.str;
|
2023-08-28 09:09:05 +00:00
|
|
|
description = ''
|
|
|
|
the location of the flake repo, used to calculate the location of facts and secrets
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
machineName = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
description = ''
|
|
|
|
the name of the machine
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
clanPkgs = lib.mkOption {
|
|
|
|
default = self.packages.${pkgs.system};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
options.system.clan = lib.mkOption {
|
|
|
|
type = lib.types.lazyAttrsOf lib.types.raw;
|
|
|
|
description = ''
|
|
|
|
utility outputs for clan management of this machine
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|