mirror of https://gitlab.crans.org/nounous/nixos
Ajout configuration réseau + restic
parent
539c9f61ac
commit
b5e505bebf
|
@ -6,6 +6,8 @@
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
|
||||||
../../../modules
|
../../../modules
|
||||||
|
../../../modules/services/nginx.nix
|
||||||
|
../../../modules/services/restic.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostId = "bbdd1133";
|
networking.hostId = "bbdd1133";
|
||||||
|
|
|
@ -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" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue