getting started with clan
This commit is contained in:
parent
edd05398bd
commit
ccad6b4798
2 changed files with 13 additions and 32 deletions
45
clan.nix
45
clan.nix
|
@ -1,57 +1,38 @@
|
||||||
{
|
{
|
||||||
# Ensure this is unique among all clans you want to use.
|
# Ensure this is unique among all clans you want to use.
|
||||||
meta.name = "__CHANGE_ME__";
|
meta = {
|
||||||
|
name = "amarth";
|
||||||
|
description = "Amarth cloud";
|
||||||
|
};
|
||||||
|
|
||||||
inventory.machines = {
|
inventory.machines = {
|
||||||
# Define machines here.
|
m1 = {};
|
||||||
# jon = { };
|
c1 = {};
|
||||||
|
c2 = {};
|
||||||
|
c3 = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Docs: See https://docs.clan.lol/reference/clanServices
|
# Docs: See https://docs.clan.lol/reference/clanServices
|
||||||
inventory.instances = {
|
inventory.instances = {
|
||||||
|
|
||||||
# Docs: https://docs.clan.lol/reference/clanServices/admin/
|
|
||||||
# Admin service for managing machines
|
|
||||||
# This service adds a root password and SSH access.
|
|
||||||
admin = {
|
admin = {
|
||||||
roles.default.tags.all = { };
|
roles.default.tags.all = { };
|
||||||
roles.default.settings.allowedKeys = {
|
roles.default.settings.allowedKeys = {
|
||||||
# Insert the public key that you want to use for SSH access.
|
"chris" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICE+TFkjJ8p8fMOddvg/waKAjKJ6DRvvouj1MdXc1Taj";
|
||||||
# All keys will have ssh access to all machines ("tags.all" means 'all machines').
|
|
||||||
# Alternatively set 'users.users.root.openssh.authorizedKeys.keys' in each machine
|
|
||||||
"admin-machine-1" = "__YOUR_PUBLIC_KEY__";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Docs: https://docs.clan.lol/reference/clanServices/zerotier/
|
|
||||||
# The lines below will define a zerotier network and add all machines as 'peer' to it.
|
|
||||||
# !!! Manual steps required:
|
|
||||||
# - Define a controller machine for the zerotier network.
|
|
||||||
# - Deploy the controller machine first to initilize the network.
|
|
||||||
zerotier = {
|
zerotier = {
|
||||||
# Replace with the name (string) of your machine that you will use as zerotier-controller
|
roles.controller.machines."m1" = { };
|
||||||
# See: https://docs.zerotier.com/controller/
|
|
||||||
# Deploy this machine first to create the network secrets
|
|
||||||
roles.controller.machines."__YOUR_CONTROLLER__" = { };
|
|
||||||
# Peers of the network
|
|
||||||
# tags.all means 'all machines' will joined
|
|
||||||
roles.peer.tags.all = { };
|
roles.peer.tags.all = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
# Docs: https://docs.clan.lol/reference/clanServices/tor/
|
|
||||||
# Tor network provides secure, anonymous connections to your machines
|
|
||||||
# All machines will be accessible via Tor as a fallback connection method
|
|
||||||
tor = {
|
|
||||||
roles.server.tags.nixos = { };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Additional NixOS configuration can be added here.
|
# Additional NixOS configuration can be added here.
|
||||||
# machines/jon/configuration.nix will be automatically imported.
|
# machines/jon/configuration.nix will be automatically imported.
|
||||||
# See: https://docs.clan.lol/guides/more-machines/#automatic-registration
|
# See: https://docs.clan.lol/guides/more-machines/#automatic-registration
|
||||||
machines = {
|
machines = {
|
||||||
# jon = { config, ... }: {
|
m1 = { config, pkgs, ... }: {
|
||||||
# environment.systemPackages = [ pkgs.asciinema ];
|
environment.systemPackages = [ pkgs.asciinema ];
|
||||||
# };
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
0
machines/m1/configuration.nix
Normal file
0
machines/m1/configuration.nix
Normal file
Reference in a new issue