Compare commits

..

15 commits

Author SHA1 Message Date
5c159f7393
feat(kanidm): Add SuiteNumerique Drive client
All checks were successful
Check meta / check_dns (pull_request) Successful in 18s
Check workflows / check_workflows (pull_request) Successful in 20s
Build all the nodes / Jaccess01 (pull_request) Successful in 24s
Run pre-commit on all files / pre-commit (push) Successful in 28s
Build all the nodes / Jaccess04 (pull_request) Successful in 31s
Run pre-commit on all files / pre-commit (pull_request) Successful in 32s
Build all the nodes / netcore01 (pull_request) Successful in 25s
Build all the nodes / netcore02 (pull_request) Successful in 27s
Build all the nodes / ap01 (pull_request) Successful in 43s
Build all the nodes / bridge01 (pull_request) Successful in 49s
Build all the nodes / hypervisor02 (pull_request) Successful in 57s
Build all the nodes / hypervisor03 (pull_request) Successful in 1m2s
Build all the nodes / geo01 (pull_request) Successful in 1m2s
Build all the nodes / lab-router01 (pull_request) Successful in 1m2s
Build all the nodes / cof02 (pull_request) Successful in 1m4s
Build all the nodes / geo02 (pull_request) Successful in 1m4s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m5s
Build all the nodes / build01 (pull_request) Successful in 1m8s
Build the shell / build-shell (pull_request) Successful in 27s
Build all the nodes / iso (pull_request) Successful in 1m9s
Build all the nodes / tower01 (pull_request) Successful in 52s
Build all the nodes / vault01 (pull_request) Successful in 1m13s
Build all the nodes / compute01 (pull_request) Successful in 1m38s
Build all the nodes / web02 (pull_request) Successful in 1m8s
Build all the nodes / rescue01 (pull_request) Successful in 1m27s
Build all the nodes / zulip01 (pull_request) Successful in 1m3s
Build all the nodes / web03 (pull_request) Successful in 1m7s
Build all the nodes / web01 (pull_request) Successful in 1m20s
Build all the nodes / storage01 (pull_request) Successful in 1m34s
Build all the nodes / krz01 (pull_request) Successful in 1m50s
2025-06-07 23:11:41 +02:00
f685e7e4ec
fix(librenms): fix kanidm login
All checks were successful
Build all the nodes / netcore02 (push) Successful in 24s
Build all the nodes / Jaccess01 (push) Successful in 26s
Build all the nodes / Jaccess04 (push) Successful in 28s
Build all the nodes / netcore01 (push) Successful in 26s
Run pre-commit on all files / pre-commit (push) Successful in 33s
Build all the nodes / ap01 (push) Successful in 43s
Build all the nodes / bridge01 (push) Successful in 48s
Build all the nodes / geo02 (push) Successful in 49s
Build all the nodes / hypervisor03 (push) Successful in 56s
Build all the nodes / hypervisor01 (push) Successful in 57s
Build all the nodes / geo01 (push) Successful in 1m1s
Build all the nodes / cof02 (push) Successful in 1m4s
Build all the nodes / hypervisor02 (push) Successful in 1m3s
Build all the nodes / lab-router01 (push) Successful in 1m2s
Build all the nodes / build01 (push) Successful in 1m7s
Build all the nodes / iso (push) Successful in 1m6s
Build all the nodes / tower01 (push) Successful in 47s
Build the shell / build-shell (push) Successful in 23s
Build all the nodes / rescue01 (push) Successful in 1m23s
Build all the nodes / krz01 (push) Successful in 1m56s
Build all the nodes / vault01 (push) Successful in 1m21s
Build all the nodes / storage01 (push) Successful in 1m39s
Build all the nodes / zulip01 (push) Successful in 1m7s
Build all the nodes / web02 (push) Successful in 1m12s
Build all the nodes / web03 (push) Successful in 1m10s
Build all the nodes / web01 (push) Successful in 1m20s
Build all the nodes / compute01 (push) Successful in 2m31s
2025-06-07 22:22:05 +02:00
2fe8b66fa2
revert(hackdays): remove all infra dedicated to hackdays
All checks were successful
Build all the nodes / web03 (pull_request) Successful in 58s
Build all the nodes / web01 (pull_request) Successful in 1m10s
Build all the nodes / storage01 (pull_request) Successful in 1m24s
Build all the nodes / Jaccess01 (push) Successful in 20s
Build all the nodes / Jaccess04 (push) Successful in 21s
Run pre-commit on all files / pre-commit (push) Successful in 27s
Build all the nodes / ap01 (push) Successful in 37s
Build all the nodes / bridge01 (push) Successful in 41s
Build all the nodes / build01 (push) Successful in 50s
Build all the nodes / cof02 (push) Successful in 46s
Build all the nodes / geo01 (push) Successful in 41s
Build all the nodes / geo02 (push) Successful in 48s
Build all the nodes / compute01 (push) Successful in 1m16s
Build all the nodes / hypervisor01 (push) Successful in 41s
Build all the nodes / hypervisor03 (push) Successful in 42s
Build all the nodes / hypervisor02 (push) Successful in 49s
Build all the nodes / iso (push) Successful in 58s
Build all the nodes / lab-router01 (push) Successful in 50s
Build all the nodes / netcore01 (push) Successful in 19s
Build all the nodes / netcore02 (push) Successful in 20s
Build all the nodes / krz01 (push) Successful in 1m25s
Build all the nodes / rescue01 (push) Successful in 1m0s
Build all the nodes / tower01 (push) Successful in 42s
Build all the nodes / vault01 (push) Successful in 50s
Build all the nodes / storage01 (push) Successful in 1m47s
Build all the nodes / web01 (push) Successful in 1m0s
Build all the nodes / web02 (push) Successful in 42s
Build all the nodes / web03 (push) Successful in 48s
Build the shell / build-shell (push) Successful in 20s
Build all the nodes / zulip01 (push) Successful in 43s
2025-06-06 10:59:42 +02:00
sinavir
4b6f200c31
fix(kanidm/zulip): disable pkce and allow legacy crypto
All checks were successful
Build all the nodes / swHackdays04 (push) Successful in 25s
Build all the nodes / geo01 (push) Successful in 54s
Build all the nodes / bridge01 (push) Successful in 1m0s
Build all the nodes / swHackdays05 (push) Successful in 22s
Build all the nodes / hypervisor02 (push) Successful in 1m0s
Build all the nodes / geo02 (push) Successful in 1m1s
Build all the nodes / swHackdays06 (push) Successful in 22s
Build all the nodes / hypervisor03 (push) Successful in 1m3s
Build all the nodes / hypervisor01 (push) Successful in 1m4s
Build all the nodes / swHackdays07 (push) Successful in 23s
Build all the nodes / cof02 (push) Successful in 1m8s
Build all the nodes / swHackdays08 (push) Successful in 23s
Build all the nodes / lab-router01 (push) Successful in 1m1s
Build all the nodes / iso (push) Successful in 1m7s
Build all the nodes / build01 (push) Successful in 1m9s
Build all the nodes / swHackdays09 (push) Successful in 23s
Build all the nodes / swHackdays10 (push) Successful in 22s
Build all the nodes / swHackdays11 (push) Successful in 23s
Build all the nodes / rescue01 (push) Successful in 1m16s
Build all the nodes / swHackdays12 (push) Successful in 26s
Build all the nodes / compute01 (push) Successful in 1m27s
Build the shell / build-shell (push) Successful in 26s
Build all the nodes / krz01 (push) Successful in 1m35s
Build all the nodes / tower01 (push) Successful in 46s
Build all the nodes / web02 (push) Successful in 50s
Build all the nodes / zulip01 (push) Successful in 52s
Build all the nodes / vault01 (push) Successful in 1m1s
Build all the nodes / web03 (push) Successful in 58s
Build all the nodes / web01 (push) Successful in 1m9s
Build all the nodes / storage01 (push) Successful in 2m52s
2025-06-05 22:19:08 +02:00
7e39b40b0d
chore(dgsi): Update
All checks were successful
Build all the nodes / geo02 (push) Successful in 47s
Build all the nodes / hypervisor01 (push) Successful in 43s
Build all the nodes / hypervisor02 (push) Successful in 43s
Build all the nodes / hypervisor03 (push) Successful in 44s
Build all the nodes / netcore01 (push) Successful in 21s
Build all the nodes / lab-router01 (push) Successful in 43s
Build all the nodes / iso (push) Successful in 52s
Build all the nodes / netcore02 (push) Successful in 21s
Build all the nodes / swHackdays01 (push) Successful in 20s
Build all the nodes / swHackdays02 (push) Successful in 23s
Build all the nodes / krz01 (push) Successful in 1m24s
Build all the nodes / swHackdays03 (push) Successful in 19s
Build all the nodes / swHackdays04 (push) Successful in 21s
Build all the nodes / rescue01 (push) Successful in 59s
Build all the nodes / swHackdays05 (push) Successful in 20s
Build all the nodes / swHackdays06 (push) Successful in 20s
Build all the nodes / swHackdays07 (push) Successful in 20s
Build all the nodes / swHackdays08 (push) Successful in 20s
Build all the nodes / swHackdays09 (push) Successful in 20s
Build all the nodes / storage01 (push) Successful in 1m23s
Build all the nodes / swHackdays10 (push) Successful in 21s
Build all the nodes / swHackdays11 (push) Successful in 22s
Build all the nodes / swHackdays12 (push) Successful in 21s
Build all the nodes / tower01 (push) Successful in 43s
Build all the nodes / vault01 (push) Successful in 53s
Build all the nodes / web02 (push) Successful in 49s
Build all the nodes / web03 (push) Successful in 50s
Build all the nodes / web01 (push) Successful in 1m2s
Build the shell / build-shell (push) Successful in 22s
Build all the nodes / zulip01 (push) Successful in 43s
2025-06-02 22:05:00 +02:00
37741075d8
fix(dns): Make use of the modularity of meta
All checks were successful
Build all the nodes / swHackdays05 (push) Successful in 24s
Build all the nodes / swHackdays04 (push) Successful in 26s
Build all the nodes / swHackdays06 (push) Successful in 24s
Build all the nodes / bridge01 (push) Successful in 55s
Build all the nodes / geo01 (push) Successful in 57s
Build all the nodes / hypervisor01 (push) Successful in 1m5s
Build all the nodes / hypervisor02 (push) Successful in 1m6s
Build all the nodes / swHackdays09 (push) Successful in 23s
Build all the nodes / lab-router01 (push) Successful in 1m7s
Build all the nodes / geo02 (push) Successful in 1m8s
Build all the nodes / swHackdays07 (push) Successful in 26s
Build all the nodes / swHackdays08 (push) Successful in 24s
Build all the nodes / cof02 (push) Successful in 1m8s
Build all the nodes / hypervisor03 (push) Successful in 1m8s
Build all the nodes / iso (push) Successful in 1m9s
Build all the nodes / build01 (push) Successful in 1m11s
Build all the nodes / swHackdays10 (push) Successful in 26s
Build all the nodes / swHackdays11 (push) Successful in 25s
Build all the nodes / swHackdays12 (push) Successful in 25s
Build all the nodes / rescue01 (push) Successful in 1m22s
Build all the nodes / compute01 (push) Successful in 1m24s
Build all the nodes / storage01 (push) Successful in 1m26s
Build the shell / build-shell (push) Successful in 23s
Build all the nodes / krz01 (push) Successful in 1m37s
Build all the nodes / tower01 (push) Successful in 47s
Build all the nodes / vault01 (push) Successful in 57s
Build all the nodes / web02 (push) Successful in 52s
Build all the nodes / web03 (push) Successful in 55s
Build all the nodes / zulip01 (push) Successful in 53s
Build all the nodes / web01 (push) Successful in 1m7s
Define A and AAAA options in meta.addresses that can be reused later
Also define proxying in the metadata
2025-06-02 20:03:50 +02:00
sinavir
4f7d0e6fdb
feat(zulip): dns records 2025-06-02 20:03:50 +02:00
sinavir
92d8da0673
feat(zulip01): init 2025-06-02 20:03:50 +02:00
sinavir
da808fc305
feat(kanidm): add zulip 2025-06-02 20:03:50 +02:00
c358db30ff
feat(web03): Deploy vector on photos.dgnum.eu
All checks were successful
Build all the nodes / geo01 (push) Successful in 1m5s
Build all the nodes / cof02 (push) Successful in 1m5s
Build all the nodes / hypervisor01 (push) Successful in 1m5s
Build all the nodes / hypervisor02 (push) Successful in 1m5s
Build all the nodes / geo02 (push) Successful in 1m7s
Build all the nodes / build01 (push) Successful in 1m10s
Build all the nodes / iso (push) Successful in 1m12s
Build all the nodes / lab-router01 (push) Successful in 1m1s
Build all the nodes / compute01 (push) Successful in 1m20s
Build all the nodes / swHackdays01 (push) Successful in 22s
Build all the nodes / swHackdays02 (push) Successful in 22s
Build all the nodes / swHackdays03 (push) Successful in 21s
Build all the nodes / swHackdays05 (push) Successful in 22s
Build all the nodes / swHackdays04 (push) Successful in 23s
Build all the nodes / swHackdays06 (push) Successful in 23s
Build all the nodes / swHackdays07 (push) Successful in 23s
Build all the nodes / swHackdays08 (push) Successful in 22s
Build all the nodes / swHackdays09 (push) Successful in 22s
Build all the nodes / swHackdays10 (push) Successful in 22s
Build all the nodes / swHackdays11 (push) Successful in 22s
Build all the nodes / krz01 (push) Successful in 1m31s
Build all the nodes / swHackdays12 (push) Successful in 22s
Build all the nodes / rescue01 (push) Successful in 1m4s
Build the shell / build-shell (push) Successful in 22s
Build all the nodes / tower01 (push) Successful in 44s
Build all the nodes / web02 (push) Successful in 51s
Build all the nodes / vault01 (push) Successful in 55s
Build all the nodes / web03 (push) Successful in 55s
Build all the nodes / web01 (push) Successful in 1m4s
Build all the nodes / storage01 (push) Successful in 1m43s
2025-06-02 18:04:05 +02:00
81ab5ca4ac
fix(vault01/ups): ups is not connected anymore
All checks were successful
Build all the nodes / swHackdays03 (push) Successful in 26s
Build all the nodes / swHackdays04 (push) Successful in 23s
Build all the nodes / swHackdays05 (push) Successful in 24s
Build all the nodes / hypervisor01 (push) Successful in 58s
Build all the nodes / bridge01 (push) Successful in 1m1s
Build all the nodes / geo02 (push) Successful in 1m2s
Build all the nodes / geo01 (push) Successful in 1m2s
Build all the nodes / cof02 (push) Successful in 1m4s
Build all the nodes / hypervisor02 (push) Successful in 1m5s
Build all the nodes / swHackdays06 (push) Successful in 22s
Build all the nodes / lab-router01 (push) Successful in 1m6s
Build all the nodes / hypervisor03 (push) Successful in 1m7s
Build all the nodes / build01 (push) Successful in 1m13s
Build all the nodes / swHackdays07 (push) Successful in 23s
Build all the nodes / swHackdays08 (push) Successful in 24s
Build all the nodes / swHackdays09 (push) Successful in 23s
Build all the nodes / swHackdays10 (push) Successful in 23s
Build all the nodes / iso (push) Successful in 1m18s
Build all the nodes / compute01 (push) Successful in 1m22s
Build all the nodes / swHackdays11 (push) Successful in 23s
Build all the nodes / rescue01 (push) Successful in 1m20s
Build all the nodes / swHackdays12 (push) Successful in 23s
Build the shell / build-shell (push) Successful in 22s
Build all the nodes / krz01 (push) Successful in 1m42s
Build all the nodes / tower01 (push) Successful in 43s
Build all the nodes / web02 (push) Successful in 51s
Build all the nodes / vault01 (push) Successful in 57s
Build all the nodes / web03 (push) Successful in 55s
Build all the nodes / web01 (push) Successful in 1m2s
Build all the nodes / storage01 (push) Successful in 2m22s
2025-06-02 15:41:27 +02:00
e88a9ccda9
feat(hackdays): all switches GO
All checks were successful
Run pre-commit on all files / pre-commit (push) Successful in 23s
2025-06-02 15:41:21 +02:00
276f2f4f7d
feat(hackdays): generic switch config 2025-06-02 15:41:21 +02:00
f8c2f2f5ee
feat(hackdays): hackdays network 2025-06-02 15:41:21 +02:00
78e54b02f1
feat(netconf-junos): added required configuration for dhcp 2025-06-02 15:41:21 +02:00
28 changed files with 621 additions and 38 deletions

View file

@ -457,6 +457,25 @@ jobs:
name: Cache web03
run: "nix-shell -A eval-nodes --run 'set -o pipefail\nset -o nounset\nset -o
errexit\npush-to-cache \"$STORE_PATH\"\n'"
zulip01:
runs-on: nix-infra
steps:
- uses: actions/checkout@v3
- env:
BUILD_NODE: zulip01
name: Eval zulip01
run: "nix-shell -A eval-nodes --run 'set -o pipefail\nset -o nounset\nset -o
errexit\nDRV=$(instantiate-node)\necho \"DRV=$DRV\" >> $GITHUB_ENV\n'"
- name: Build zulip01
run: "STORE_PATH=\"$(nix-store --realise \"$DRV\")\"\necho \"STORE_PATH=$STORE_PATH\"\
\ >> $GITHUB_ENV\n"
- env:
STORE_ENDPOINT: https://snix-store.dgnum.eu/infra.signing/
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
STORE_USER: admin
name: Cache zulip01
run: "nix-shell -A eval-nodes --run 'set -o pipefail\nset -o nounset\nset -o
errexit\npush-to-cache \"$STORE_PATH\"\n'"
name: Build all the nodes
on:
pull_request:

View file

@ -0,0 +1,141 @@
# SPDX-FileCopyrightText: 2025 Lubin Bailly <lubin.bailly@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ config, lib, ... }:
let
inherit (lib)
concatImapStringsSep
concatMapAttrsStringSep
concatMapStrings
mkOption
;
inherit (lib.types)
attrsOf
ints
listOf
str
submodule
;
in
{
options = {
access.address-assignment.pool = mkOption {
type = attrsOf (
submodule (
{ name, config, ... }:
{
options = {
family.inet = {
network = mkOption {
type = str;
description = ''
Network where this pool is located.
'';
};
ranges = mkOption {
type = listOf (submodule {
options = {
low = mkOption {
type = str;
description = ''
Lowest IP of this range.
'';
};
high = mkOption {
type = str;
description = ''
Highest IP of this range.
'';
};
};
});
description = ''
IP ranges in this pool.
'';
};
dhcp-attributes = {
maximum-lease-time = mkOption {
type = ints.unsigned;
description = ''
Maximum lease time for leases in this pool.
'';
};
name-server = mkOption {
type = listOf str;
default = [ ];
description = ''
DNS servers to propose.
'';
};
router = mkOption {
type = listOf str;
default = [ ];
description = ''
Router IP for default route.
'';
};
};
};
xml = mkOption {
type = str;
readOnly = true;
visible = false;
};
};
config.xml =
let
inet-cfg = config.family.inet;
in
''
<pool>
<name>${name}</name>
<family>
<inet>
<network>${inet-cfg.network}</network>
${concatImapStringsSep "\n" (
idx:
{ low, high }:
''
<range>
<name>${name}-${toString idx}</name>
<low>${low}</low>
<high>${high}</high>
</range>
''
) inet-cfg.ranges}
<dhcp-attributes>
<maximum-lease-time>${toString inet-cfg.dhcp-attributes.maximum-lease-time}</maximum-lease-time>
${concatMapStrings (
dns: "<name-server><name>${dns}</name></name-server>"
) inet-cfg.dhcp-attributes.name-server}
${concatMapStrings (
router: "<router><name>${router}</name></router>"
) inet-cfg.dhcp-attributes.router}
</dhcp-attributes>
</inet>
</family>
</pool>
'';
}
)
);
default = { };
description = ''
Address pools for DHCP configuration.
'';
};
netconf.xmls.access = mkOption {
type = str;
visible = false;
readOnly = true;
};
};
config.netconf.xmls.access = ''
<access operation="replace">
<address-assignment>
${concatMapAttrsStringSep "\n" (_: pool: pool.xml) config.access.address-assignment.pool}
</address-assignment>
</access>
'';
}

View file

@ -34,11 +34,13 @@ let
in
{
imports = [
./access.nix
./interfaces.nix
./poe.nix
./protocols.nix
./system.nix
./vlans.nix
./routing-options.nix
];
options = {
@ -98,6 +100,8 @@ in
${protocols}
${vlans}
${poe}
${access}
${routing-options}
</configuration>
'';
rpc = pkgs.writeText "${name}.rpc" ''

View file

@ -97,17 +97,17 @@ let
</ethernet-switching>
'';
addr4 = map (addr: "<name>${addr}</name>") config.family.inet.addresses;
addr4 = map (addr: "<address><name>${addr}</name></address>") config.family.inet.addresses;
inet = optionalString config.family.inet.enable ''
<inet>
<address>${builtins.concatStringsSep "" addr4}</address>
${builtins.concatStringsSep "" addr4}
</inet>
'';
addr6 = map (addr: "<name>${addr}</name>") config.family.inet6.addresses;
addr6 = map (addr: "<address><name>${addr}</name></address>") config.family.inet6.addresses;
inet6 = optionalString config.family.inet6.enable ''
<inet6>
<address>${builtins.concatStringsSep "" addr6}</address>
${builtins.concatStringsSep "" addr6}
</inet6>
'';
in

View file

@ -0,0 +1,59 @@
# SPDX-FileCopyrightText: 2025 Lubin Bailly <lubin.bailly@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ config, lib, ... }:
let
inherit (lib)
concatMapStringsSep
mkOption
;
inherit (lib.types)
str
listOf
submodule
;
in
{
options = {
routing-options.static.route = mkOption {
type = listOf (submodule {
options = {
destination = mkOption {
type = str;
description = ''
Destination network.
'';
};
next-hop = mkOption {
type = str;
description = ''
Gateway for this network.
'';
};
};
});
default = [ ];
description = ''
Static routes.
'';
};
netconf.xmls.routing-options = mkOption {
type = str;
readOnly = true;
visible = false;
};
};
config.netconf.xmls.routing-options = ''
<routing-options operation="replace">
<static>
${concatMapStringsSep "\n" (route: ''
<route>
<name>${route.destination}</name>
<next-hop>${route.next-hop}</next-hop>
</route>
'') config.routing-options.static.route}
</static>
</routing-options>
'';
}

View file

@ -6,20 +6,25 @@
let
inherit (lib)
concatMapAttrsStringSep
concatMapStrings
concatStrings
concatStringsSep
filter
hasPrefix
length
mkOption
optionalString
splitString
;
inherit (lib.types)
attrsOf
enum
listOf
port
str
submodule
;
in
@ -55,6 +60,20 @@ in
description = "Port to use for netconf.";
default = 830;
};
dhcp-local-server.group = mkOption {
type = attrsOf (submodule {
options.interfaces = mkOption {
type = listOf str;
description = ''
Interfaces managed by this group.
'';
};
});
default = { };
description = ''
Groups of configuration for DHCP server.
'';
};
};
};
netconf.xmls.system = mkOption {
@ -75,6 +94,19 @@ in
ed25519 = map (key: "<ssh-ed25519><name>${key}</name></ssh-ed25519>") (
filter (hasPrefix "ssh-ed25519 ") ssh-keys
);
dhcp-local = optionalString (config.system.services.dhcp-local-server.group != { }) ''
<dhcp-local-server>
${concatMapAttrsStringSep "\n" (name: cfg: ''
<group>
<name>${name}</name>
<interface>
${concatMapStrings (intf: "<name>${intf}</name>") cfg.interfaces}
</interface>
</group>
'') config.system.services.dhcp-local-server.group}
</dhcp-local-server>
'';
in
''
<system>
@ -89,6 +121,7 @@ in
<ssh><port>${toString config.system.services.netconf.port}</port></ssh>
<rfc-compliant/><yang-compliant/>
</netconf>
${dhcp-local}
</services>
</system>
'';

View file

@ -217,6 +217,15 @@ in
"email"
];
};
dgn_zulip = {
displayName = "Zulip [Chat]";
originUrl = "https://zulip.dgnum.eu/complete/oidc/";
originLanding = "https://zulip.dgnum.eu";
preferShortUsername = true;
allowInsecureClientDisablePkce = true;
enableLegacyCrypto = true;
};
};
};
};

View file

@ -23,7 +23,15 @@ in
hostname = host;
settings = { };
settings = {
auth.socialite.configs.kanidm = {
listener = "\\SocialiteProviders\\Kanidm\\KanidmExtendSocialite";
client_id = "$KANIDM_CLIENT_ID";
client_secret = "$KANIDM_CLIENT_SECRET";
redirect = "$KANIDM_REDIRECT_URI";
base_url = "$KANIDM_BASE_URL";
};
};
database = {
createLocally = true;

View file

@ -80,3 +80,11 @@ index 3d89a1530..a00c5f307 100644
{
"name": "socialiteproviders/manager",
"version": "v4.6.0",
index 3d89a1530..a00c5f307 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -33,3 +33,4 @@
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
+ \SocialiteProviders\Kanidm\KanidmExtendSocialite::class.'@handle',
\App\Listeners\SocialiteWasCalledListener::class,
],

View file

@ -12,6 +12,7 @@
# Becareful, jool will not translate ips. Prefer ipv6 proxy target
redirects = {
"kfet.lab.dgnum.eu" = "v6.labcore01.pav01.infra.lab.dgnum.eu:443";
"zulip.dgnum.eu" = "v6.zulip01.pav01.infra.lab.dgnum.eu:443";
};
};
};

View file

@ -14,7 +14,7 @@ lib.extra.mkConfig {
"k-radius"
"monitoring"
"networking"
"ups"
# "ups"
"ulogd"
];

View file

@ -12,7 +12,12 @@
}:
let
inherit (lib) mapAttrs' mkOption nameValuePair;
inherit (lib)
genList
mapAttrs'
mkOption
nameValuePair
;
inherit (lib.types) listOf attrs;
uplink = {
@ -348,6 +353,7 @@ in
chain postrouting {
type nat hook postrouting priority 100;
ip saddr 10.0.0.0/16 ip daddr != 10.0.0.0/16 snat ip to 129.199.195.130-129.199.195.157
ip saddr 192.168.0.0/17 ip daddr != 192.168.0.0/17 snat ip to 129.199.195.130-129.199.195.157
}
'';
};
@ -383,7 +389,7 @@ in
ip saddr 10.0.255.0/24 jump forward_reject;
# We only forward for ISP clients and our stuff
ip saddr != 10.0.0.0/16 jump forward_reject;
ip saddr != 10.0.0.0/16 ip saddr != 192.168.0.0/17 jump forward_reject;
# Can talk to us
ip daddr 10.0.0.0/27 accept;

View file

@ -11,6 +11,7 @@
./gestiocof.nix
./gestiojeux.nix
./interludes.nix
./vector.nix
./wikiens.nix
];

View file

@ -0,0 +1,48 @@
# SPDX-FileCopyrightText: 2025 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ config, ... }:
{
services.django-apps.sites.vector = {
source = "https://git.dgnum.eu/DGNum/vector";
branch = "main";
domain = "photos.dgnum.eu";
nginx = {
enableACME = true;
forceSSL = true;
};
webHookSecret = config.age.secrets."webhook-vector_token".path;
overlays.nix-pkgs = [
# Required packages
"authens"
"django-browser-reload"
"django-bulma-forms"
"django-unfold"
"loadcredential"
# Dependencies
"python-cas"
];
dependencies = ps: [
ps.authens
ps.django
ps.django-browser-reload
ps.django-bulma-forms
ps.django-import-export
ps.django-sesame
ps.django-unfold
ps.loadcredential
ps.pillow
];
credentials = {
SECRET_KEY = config.age.secrets."dj_vector-secret_key_file".path;
};
};
}

View file

@ -0,0 +1,34 @@
age-encryption.org/v1
-> ssh-ed25519 ZIo4kw U9Awj0lxgjMUgaAzQL2WzYiMgfD+86sKsvNnbd7g1lY
ss6ZQIANobWXxHjTykQE3nZqXJ+i+x3x6f7kAzWNbh0
-> ssh-ed25519 9/PCvA Yzdb3ff9BW1AAL5JqprCiyAByqsaSmyyUt5DVFq1IBw
UxTfF4o9wSk3+XKKTNuWGSLMOPYrgA+ipumR5AzlNgk
-> ssh-ed25519 prNEsA VkEG8GR5wWU+V3Dne9UtNK8lOPnMy7lbh9ea+kiTLik
gY8l0Uj3ayMkPIVuMHG+BGvm+BYCR1n3HOEcAZWVLWs
-> ssh-ed25519 jIXfPA mzhgIxTRN7ZtlRuZTkz0P/Zdl/QVetQHylH6KgL5fQE
6dJo93aqlNqC6Kno8958r6+c552CPCW0sPD+sf9x678
-> ssh-ed25519 QlRB9Q 8GZjCubDXSt/uNfchgoY4nC+nmq7h0mHH5PzaVwS8Gw
WfCIpHHSL/ZzCrCGonXzov5aiEG8nEabRYc61Sot6W0
->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- 6tPIZn536nfhB/4+hiKitxMpYKdj42N+Xxw7gz+cCuQ
¾Ú‡u™ŒhŠhŠ%Å$<24>¯^þrÒ3Üëi¯ð8§qK§½9‡ˆd®Ø&±<>X4ŠØ'lœ%ršCƒ™„€“R”Ÿß=®ëƒ_ïì>XÙilO

View file

@ -27,6 +27,7 @@
"dj_gestiojeux-secret_key_file"
"dj_interludes-email_host_password_file"
"dj_interludes-secret_key_file"
"dj_vector-secret_key_file"
"dj_wikiens-secret_key_file"
"webhook-annuaire_token"
"webhook-bocal_token"
@ -35,5 +36,6 @@
"webhook-gestiocof_token"
"webhook-gestiojeux_token"
"webhook-interludes_token"
"webhook-vector_token"
"webhook-wikiens_token"
]

View file

@ -0,0 +1,36 @@
age-encryption.org/v1
-> ssh-ed25519 ZIo4kw nixtliB448Qelkkhdy4Njr4V5gGJtlzR5z2mdjxENhs
529gFsnjUhI/yFnphje0jhoszNrRoc1OmV1tc8QgTVk
-> ssh-ed25519 9/PCvA eFSvkx9G++qeJWsAusXUz+V5IyVoW3kRuhL8M6LITSs
Die/10zkmScdj5wmWKlVHtbIZ3n7Tw5O9xvmLrNittM
-> ssh-ed25519 prNEsA +GGlW+gSP7WEvvjBNpNhzG8FSV3cVLu6A/2IbD51Wzo
wTNAoE5Wk/ZzhuKPLuBbE40rHpuXqOFuTE2fn1Nw1kQ
-> ssh-ed25519 jIXfPA qROvOffeaatJSsqQ+bNgXcZc0tlZDhNawcUsybu0YQo
GgsBWLQuFbL4CghDOxbyaJ4dMJtuWV5IJWxr/aNDE5I
-> ssh-ed25519 QlRB9Q K07kQAeVxZlkp4RFRPgAbX8ny5bqB9klZEGUyLaUtzg
Oe7IAxrU+4onN8V6M178yTbXPPqkh++JSB+WKEXocQ8
-> ssh-ed25519 r+nK/Q RFCuFtv3kdHjFHT4PcbVFfLUdD3kUBoO1XSfqB4ae2Q
39RVcTVbte9KNt3vEHE0aEcSLJyhASqlNp+/+AFkrB0
-> ssh-rsa krWCLQ
LEFifhwK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(&²
N'3¡¢œD-Íè‰_V¯î

View file

@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ lib, ... }:
lib.extra.mkConfig {
enabledModules = [
# List of modules to enable
"dgn-web"
];
enabledServices = [
# List of services to enable
];
extraConfig = {
# Disable monitoring
dgn-monitoring.enable = false;
dgn-records.enable = false;
dgn-notify.enable = false;
dgn-backups.jobs = lib.mkForce { };
};
root = ./.;
}

View file

@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ modulesPath, sources, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
(sources.disko + "/module.nix")
./disko.nix
];
boot = {
initrd = {
availableKernelModules = [
"ata_piix"
"uhci_hcd"
"ehci_pci"
"virtio_pci"
"sr_mod"
"virtio_blk"
];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
}

View file

@ -0,0 +1,37 @@
# SPDX-FileCopyrightText: 2024 Maurice Debray <maurice.debray@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
_: {
disko.devices = {
disk = {
main = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "1G";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}

View file

@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: 2024 La Délégation Générale Numérique <contact@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
(import ../../../../keys.nix).mkSecrets [ "zulip01" ] [ ]

View file

@ -12,6 +12,7 @@ let
mapAttrs'
nameValuePair
optional
optionalAttrs
;
inherit (lib.extra) fuseAttrs mapSingleFuse;
@ -28,6 +29,7 @@ let
dual ? [ ],
v4 ? [ ],
v6 ? [ ],
proxied ? [ ],
}:
let
base = "${server}.${meta.nodes.${server}.site}.infra";
@ -37,6 +39,7 @@ let
(mkHost base dual)
(mkHost "v4.${base}" v4)
(mkHost "v6.${base}" v6)
(mkHost "proxied.${base}" proxied)
];
cnames = builtins.mapAttrs (_: to: { CNAME = [ to ]; }) {
@ -167,10 +170,17 @@ let
];
web03.dual = [
"photos" # Vector
# Django Apps
"*.webapps"
"apps-webhook"
];
zulip01.proxied = [
"zulip"
"z"
];
}
)
);
@ -249,23 +259,21 @@ in
{ site, ... }:
let
net = meta.network.${host};
f =
x:
if x == [ ] then
[ ]
else if net.singleIpRecord then
[ (builtins.head x) ]
else
x;
inherit (net.addresses) ipv4 ipv6;
inherit (net.addresses) A AAAA;
in
nameValuePair "${host}.${site}" {
A = f ipv4;
AAAA = f ipv6;
inherit A AAAA;
subdomains = {
v4.A = f ipv4;
v6.AAAA = f ipv6;
v4 = { inherit A; };
v6 = { inherit AAAA; };
private.A = optional (net.netbirdIp != null) net.netbirdIp;
proxied = optionalAttrs (net.proxy != null) {
# NOTE: We assume that we want to proxy ipv4 to an ipv6-only node
# This might change in the future but is not planned yet.
inherit (meta.network.${net.proxy}.addresses) A;
inherit AAAA;
};
};
}
) (filterAttrs (_: { nixpkgs, ... }: nixpkgs.system == "nixos") meta.nodes);

View file

@ -425,5 +425,27 @@
netbirdIp = "100.80.157.46";
singleIpRecord = true;
};
zulip01 = {
interfaces = {
ens18 = {
ipv6 = [
{
address = "2a0e:e701:1120:1000::dead:beef";
prefixLength = 64;
}
];
gateways = [ "2a0e:e701:1120:1000::1" ];
dns = [ "2a0e:e701:1120:1000::f:1" ];
};
};
hostId = "b551861d";
netbirdIp = null; # zulip01 is not to be connected on the VPN for now
# This node does not have ipv4 connectivity
proxy = "lab-router01";
};
};
}

View file

@ -27,7 +27,7 @@ let
];
};
nixpkgs = {
version = "24.05";
version = "unstable";
system = "netconf";
};
};

View file

@ -395,5 +395,20 @@
admins = [ "catvayor" ];
};
zulip01 = {
site = "pav01";
hashedPassword = "$y$j9T$7NuClEAftCG0O7AA0KLK10$/ZLXV73tiZVMXFdgKfa4yVeYk.Qdea6uIgQTrtWHIbA";
sshKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDnYjoGAfJGeMAds7RoqtqRJlfm2f6aBbb9SIPNizIof" ];
stateVersion = "24.11";
nixpkgs = {
version = "unstable";
system = "nixos";
};
};
};
}

View file

@ -412,22 +412,50 @@ in
);
};
addresses = {
ipv4 = mkOption {
type = listOf str;
default = [ ];
description = ''
List of public ipv4 addresses of the node.
'';
addresses =
let
select = b: x: if (b && x != [ ]) then [ (builtins.head x) ] else x;
in
{
ipv4 = mkOption {
type = listOf str;
default = [ ];
description = ''
List of public ipv4 addresses of the node.
'';
};
ipv6 = mkOption {
type = listOf str;
default = [ ];
description = ''
List of public ipv6 addresses of the node.
'';
};
A = mkOption {
type = listOf str;
default = select config.singleIpRecord config.addresses.ipv4;
description = ''
List of ipv4 addresses used for the A record.
'';
};
AAAA = mkOption {
type = listOf str;
default = select config.singleIpRecord config.addresses.ipv6;
description = ''
List of ipv6 addresses used for the AAAA record.
'';
};
};
ipv6 = mkOption {
type = listOf str;
default = [ ];
description = ''
List of public ipv6 addresses of the node.
'';
};
proxy = mkOption {
type = nullOr str;
default = null;
description = ''
If not `null`, then a SNI proxy will be created to passthrough ipv4 traffic to this node via ipv6.
'';
};
hostId = mkOption {

View file

@ -74,9 +74,9 @@
},
"branch": "main",
"submodules": false,
"revision": "904eb7058b9a61250fbfcb0b0bfa71e214bf1067",
"revision": "fbf6385e65400802a3f9f75f7cd91d5c01373d1b",
"url": null,
"hash": "sha256-tDqte7MuOn0Gcj0a94m//wcjJvssnEZprtt5o/IpXlU="
"hash": "sha256-aOUI69wbMm9+KVWwcMw5TgVnk3DfjOzE4OEyYTD8XPU="
},
"disko": {
"type": "GitRelease",