services/clanServices/k3s/default.nix

47 lines
1.4 KiB
Nix

{ lib, pkgs, ... }:
let
inherit (builtins) readFile;
in
{
_class = "clan.service";
manifest = {
name = "amarth-services/k3s";
description = "K3s service in order to set up a cluster";
categories = [ "System" "Network" "Containers" "Virtualisation" ];
readme = readFile ./README.md;
};
#==============================================================================================================
# Server configuration
#==============================================================================================================
roles.server = {
interface = { lib, ... }: {
options.name = lib.mkOption {
type = lib.types.str;
default = "";
example = "some-name";
description = ''
Temporary option till I figure out something useful
'';
};
};
perInstance = instanceArgs: {
nixosModule = lib.modules.importApply ./roles/server.nix (instanceArgs // { inherit pkgs; });
};
};
#==============================================================================================================
# Agent configuration
#==============================================================================================================
roles.agent = {
interface = { lib, ... }: {
options = {};
};
perInstance = instanceArgs: {
nixosModule = lib.modules.importApply ./roles/agent.nix (instanceArgs // { inherit pkgs; });
};
};
}