Ajout configuration réseau + restic

4-message-d-erreur-en-cas-d-echec-de-sudo
pigeonmoelleux 2024-11-09 19:27:34 +01:00
parent 539c9f61ac
commit b5e505bebf
No known key found for this signature in database
GPG Key ID: B3BE02E379E6E8E2
4 changed files with 70 additions and 0 deletions

View File

@ -6,6 +6,8 @@
./networking.nix
../../../modules
../../../modules/services/nginx.nix
../../../modules/services/restic.nix
];
networking.hostId = "bbdd1133";

View File

@ -1,5 +1,44 @@
{ ... }:
{
networking = {
dhcpcd.enable = false;
vlans = {
vlan3 = {
id = 3;
interface = "eno1";
};
vlan10 = {
id = 10;
interface = "eno1";
};
};
interfaces = {
vlan3 = {
ipv4 = {
addresses = [
{
address = "172.16.3.14";
prefixLength = 24;
}
];
};
};
vlan10 = {
ipv4 = {
addresses = [
{
address = "172.16.10.14";
prefixLength = 24;
}
];
};
};
};
defaultGateway = "172.16.3.99";
nameservers = [ "172.16.10.128" ];
};
}

View File

@ -0,0 +1,10 @@
{ ... }:
{
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedOptimisation = true;
};
}

View File

@ -0,0 +1,19 @@
{ config, ... }:
{
services.restic.server = {
enable = true;
dataDir = "/backups";
listenAddress = "localhost:4242";
privateRepos = true;
};
services.nginx.virtualHosts = {
"${config.networking.hostName}.adm.crans.org" = {
locations."/" = {
proxyPass = "http://${config.services.restic.server.listenAddress}";
};
};
};
}