Add configs for a new kubernetes cluster on NixOS.
This commit is contained in:
30
nix/kubernetes/roles/image_based_appliance/default.nix
Normal file
30
nix/kubernetes/roles/image_based_appliance/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
image_based_appliance.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install image_based_appliance.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.image_based_appliance.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
# Do not install nix. A full new image must be built to update
|
||||
# the machine.
|
||||
nix.enable = false;
|
||||
system.switch.enable = false;
|
||||
nix.gc.automatic = lib.mkForce false;
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user