You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkIf mkMerge mkThenElse;
|
|
|
|
cfg = config.r6d.config-generator;
|
|
|
|
computers = config.r6d.computers;
|
|
|
|
profiles = config.r6d.profiles;
|
|
|
|
in
|
|
|
|
|
|
|
|
mkIf cfg.nix-serve-server {
|
|
|
|
|
|
|
|
# Cache http pour le store
|
|
|
|
|
|
|
|
# Services
|
|
|
|
services.nix-serve = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Réseau
|
|
|
|
networking.firewall = {
|
|
|
|
allowedTCPPorts = [
|
|
|
|
#5000 # ouvert sur tinc
|
|
|
|
];
|
|
|
|
allowedUDPPorts = [
|
|
|
|
];
|
|
|
|
extraCommands = ''
|
|
|
|
iptables -A INPUT -i tinc.grudunet -p tcp --dport 5000 -j ACCEPT
|
|
|
|
ip6tables -A INPUT -i tinc.grudunet -p tcp --dport 5000 -j ACCEPT
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|