This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

networking module: add internet

+45
+45
clan_modules/internet.nix
··· 1 + { 2 + _class = "clan.service"; 3 + manifest.name = "internet"; 4 + manifest.description = "direct access (or via ssh jumphost) to server"; 5 + manifest.categories = [ "networking" ]; 6 + roles.default = { 7 + interface = 8 + { lib, ... }: 9 + { 10 + options = { 11 + host = lib.mkOption { 12 + type = lib.types.str; 13 + description = '' 14 + ip address or hostname (domain) of the machine 15 + ''; 16 + }; 17 + jumphosts = lib.mkOption { 18 + type = lib.types.listOf lib.types.str; 19 + default = [ ]; 20 + description = '' 21 + optional list of jumphosts to use to connect to the machine 22 + ''; 23 + }; 24 + }; 25 + }; 26 + perInstance = 27 + { 28 + roles, 29 + lib, 30 + settings, 31 + ... 32 + }: 33 + { 34 + # nix run .#clan.inventory.instances.<instanceName>.actions.build-docker-container 35 + exports.networking = { 36 + # TODO add user space network support to clan-cli 37 + technology = "direct"; 38 + peers = lib.mapAttrs (_name: _machine: { 39 + host.plain = settings.host; 40 + SSHOptions = map (_x: "-J x") settings.jumphosts; 41 + }) roles.default.machines; 42 + }; 43 + }; 44 + }; 45 + }