L-Nafaryus 008b4ad3a4
Some checks failed
nix / check (push) Failing after 31s
flake: reformat all
new: packages: bonvim, nixvim configuration of neovim
remove: config: hyprland -> declarative
remove: config: nvim
nixosModules: structure with categories
new: configurations: concept of preconfigured modules
catarina: disable papermc server
catarina: hydra server
flake: hydraJobs outputs
2024-07-08 15:07:24 +05:00

52 lines
1.1 KiB
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.bonfire;
in {
options = {
bonfire = {
home = mkOption {
type = types.path;
default = ../../../.;
description = "Bonfire root directory";
};
configDir = mkOption {
type = types.path;
default = "${cfg.home}/config";
description = "Path to Bonfire static configuration files";
};
withSecrets = mkOption {
type = types.bool;
default = false;
description = "Enables the Bonfire secrets";
};
secrets = mkOption {
type = types.attrs;
description = "Secrets will be here after evaluation";
default = {};
};
};
};
config = {
assertions = mkIf cfg.withSecrets [
{
assertion = builtins.pathExists ./secrets/default.nix;
message = "Missed git submodule 'bonfire-secrets'";
}
];
environment.sessionVariables = {
BONFIRE_HOME = cfg.home;
};
bonfire.secrets = mkIf cfg.withSecrets (import ./secrets {inherit config lib;});
};
}