mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
remove dead modules/retiolum.nix
This was an old copy of the krebs retiolum module with NIX_PATH lookups (<retiolum/hosts>, <system-secrets/...>). It was never imported — the upstream retiolum.nixosModules.retiolum from the flake input is used instead (in profiles.default), with configs/retiolum.nix overriding the key paths to agenix secrets.
This commit is contained in:
@@ -1,73 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
netname = "retiolum";
|
||||
cfg = config.networking.retiolum;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
networking.retiolum.ipv4 = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
own ipv4 address
|
||||
'';
|
||||
};
|
||||
networking.retiolum.ipv6 = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
own ipv6 address
|
||||
'';
|
||||
};
|
||||
networking.retiolum.nodename = mkOption {
|
||||
type = types.str;
|
||||
default = config.networking.hostName;
|
||||
description = ''
|
||||
tinc network name
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services.tinc.networks.${netname} = {
|
||||
name = cfg.nodename;
|
||||
hosts = builtins.mapAttrs (name: _: builtins.readFile "${<retiolum/hosts>}/${name}") (
|
||||
builtins.readDir <retiolum/hosts>
|
||||
);
|
||||
rsaPrivateKeyFile = toString <system-secrets/retiolum.key>;
|
||||
ed25519PrivateKeyFile = toString <system-secrets/retiolum.ed25519>;
|
||||
extraConfig = ''
|
||||
LocalDiscovery = yes
|
||||
AutoConnect = yes
|
||||
'';
|
||||
};
|
||||
|
||||
networking.extraHosts = builtins.readFile (toString <retiolum/etc.hosts>);
|
||||
|
||||
environment.systemPackages = [ config.services.tinc.networks.${netname}.package ];
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 655 ];
|
||||
allowedUDPPorts = [ 655 ];
|
||||
};
|
||||
#services.netdata.portcheck.checks.tinc.port = 655;
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks = {
|
||||
"${netname}".extraConfig = ''
|
||||
[Match]
|
||||
Name = tinc.${netname}
|
||||
|
||||
[Network]
|
||||
Address=${cfg.ipv4}/12
|
||||
Address=${cfg.ipv6}/16
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user