alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
networking module: add internet
author
lassulus
date
1 year ago
(Jul 9, 2025, 8:41 PM CEST)
commit
ec321f86
ec321f866a9e46c130979b4f4d452a80488f0e20
parent
d9a698b3
d9a698b39b88871dc92bdd898220ffd9876eceb4
+45
1 changed file
Expand all
Collapse all
Unified
Split
clan_modules
internet.nix
+45
clan_modules/internet.nix
View file
Reviewed
···
1
1
+
{
2
2
+
_class = "clan.service";
3
3
+
manifest.name = "internet";
4
4
+
manifest.description = "direct access (or via ssh jumphost) to server";
5
5
+
manifest.categories = [ "networking" ];
6
6
+
roles.default = {
7
7
+
interface =
8
8
+
{ lib, ... }:
9
9
+
{
10
10
+
options = {
11
11
+
host = lib.mkOption {
12
12
+
type = lib.types.str;
13
13
+
description = ''
14
14
+
ip address or hostname (domain) of the machine
15
15
+
'';
16
16
+
};
17
17
+
jumphosts = lib.mkOption {
18
18
+
type = lib.types.listOf lib.types.str;
19
19
+
default = [ ];
20
20
+
description = ''
21
21
+
optional list of jumphosts to use to connect to the machine
22
22
+
'';
23
23
+
};
24
24
+
};
25
25
+
};
26
26
+
perInstance =
27
27
+
{
28
28
+
roles,
29
29
+
lib,
30
30
+
settings,
31
31
+
...
32
32
+
}:
33
33
+
{
34
34
+
# nix run .#clan.inventory.instances.<instanceName>.actions.build-docker-container
35
35
+
exports.networking = {
36
36
+
# TODO add user space network support to clan-cli
37
37
+
technology = "direct";
38
38
+
peers = lib.mapAttrs (_name: _machine: {
39
39
+
host.plain = settings.host;
40
40
+
SSHOptions = map (_x: "-J x") settings.jumphosts;
41
41
+
}) roles.default.machines;
42
42
+
};
43
43
+
};
44
44
+
};
45
45
+
}