20 lines
380 B
Nix
20 lines
380 B
Nix
|
{ lib, config, ... }:
|
||
|
let
|
||
|
cfg = config.bagel.baremetal.storage;
|
||
|
in
|
||
|
{
|
||
|
options = {
|
||
|
bagel.baremetal.storage = {
|
||
|
enable = lib.mkEnableOption "storage role";
|
||
|
num = lib.mkOption {
|
||
|
type = lib.types.int;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
networking.hostName = "storage-${toString cfg.num}";
|
||
|
deployment.tags = [ "storage" ];
|
||
|
};
|
||
|
}
|