chore: add vm-simple-network to all eligible machines

This commit is contained in:
Julien Malka 2024-08-14 22:21:07 +02:00
parent b8db804e38
commit b096882d4a
Signed by: Luj
GPG key ID: 6FC74C847011FD83
4 changed files with 13 additions and 45 deletions

View file

@ -2,6 +2,7 @@
pkgs, pkgs,
lib, lib,
inputs, inputs,
profiles,
... ...
}: }:
@ -15,6 +16,7 @@
arch = "x86_64-linux"; arch = "x86_64-linux";
nixpkgs_version = inputs.nixpkgs; nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager; hm_version = inputs.home-manager;
profiles = with profiles; [ vm-simple-network ];
ips = { ips = {
public.ipv4 = "82.67.34.230"; public.ipv4 = "82.67.34.230";
local.ipv4 = "192.168.0.66"; local.ipv4 = "192.168.0.66";
@ -31,17 +33,6 @@
luj.nginx.enable = true; luj.nginx.enable = true;
systemd.network.enable = true;
systemd.network.networks."10-wan" = {
matchConfig.Name = "ens18";
networkConfig = {
DHCP = "ipv4";
Address = "2a01:e0a:de4:a0e1:be24:11ff:fe09:638d";
};
linkConfig.RequiredForOnline = "routable";
};
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false; systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;

View file

@ -3,6 +3,7 @@
pkgs, pkgs,
lib, lib,
inputs, inputs,
profiles,
... ...
}: }:
@ -16,6 +17,7 @@
arch = "x86_64-linux"; arch = "x86_64-linux";
nixpkgs_version = inputs.nixpkgs; nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager; hm_version = inputs.home-manager;
profiles = with profiles; [ vm-simple-network ];
ips = { ips = {
public.ipv4 = "82.67.34.230"; public.ipv4 = "82.67.34.230";
local.ipv4 = "192.168.0.175"; local.ipv4 = "192.168.0.175";
@ -31,19 +33,6 @@
deployment.tags = [ "server" ]; deployment.tags = [ "server" ];
systemd.network.enable = true;
systemd.network.networks."10-wan" = {
matchConfig.Name = "ens18";
networkConfig = {
# start a DHCP Client for IPv4 Addressing/Routing
DHCP = "ipv4";
# accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC)
IPv6AcceptRA = true;
};
# make routing on this interface a dependency for network-online.target
linkConfig.RequiredForOnline = "routable";
};
services.openssh.enable = true; services.openssh.enable = true;
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;

View file

@ -2,6 +2,7 @@
config, config,
pkgs, pkgs,
inputs, inputs,
profiles,
... ...
}: }:
@ -15,6 +16,7 @@
arch = "x86_64-linux"; arch = "x86_64-linux";
nixpkgs_version = inputs.nixpkgs; nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager; hm_version = inputs.home-manager;
profiles = with profiles; [ vm-simple-network ];
ips = { ips = {
public.ipv4 = "82.67.34.230"; public.ipv4 = "82.67.34.230";
local.ipv4 = "192.168.0.101"; local.ipv4 = "192.168.0.101";
@ -22,7 +24,6 @@
public.ipv6 = "2a01:e0a:de4:a0e1:95c9:b2e2:e999:1a45"; public.ipv6 = "2a01:e0a:de4:a0e1:95c9:b2e2:e999:1a45";
vpn.ipv6 = "fd7a:115c:a1e0::1c"; vpn.ipv6 = "fd7a:115c:a1e0::1c";
}; };
}; };
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
@ -33,17 +34,6 @@
luj.nginx.enable = true; luj.nginx.enable = true;
systemd.network.enable = true;
systemd.network.networks."10-wan" = {
matchConfig.Name = "ens18";
networkConfig = {
DHCP = "ipv4";
Address = "2a01:e0a:de4:a0e1:95c9:b2e2:e999:1a45";
};
linkConfig.RequiredForOnline = "routable";
};
services.mysql.enable = true; services.mysql.enable = true;
services.mysql.package = pkgs.mysql; services.mysql.package = pkgs.mysql;
services.nextcloud = { services.nextcloud = {

View file

@ -1,4 +1,9 @@
{ pkgs, inputs, ... }: {
pkgs,
inputs,
profiles,
...
}:
{ {
imports = [ imports = [
@ -11,6 +16,7 @@
arch = "x86_64-linux"; arch = "x86_64-linux";
nixpkgs_version = inputs.nixpkgs; nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager; hm_version = inputs.home-manager;
profiles = with profiles; [ vm-simple-network ];
ips = { ips = {
public.ipv4 = "82.67.34.230"; public.ipv4 = "82.67.34.230";
local.ipv4 = "192.168.0.103"; local.ipv4 = "192.168.0.103";
@ -28,14 +34,6 @@
networking.hostName = "tower"; networking.hostName = "tower";
networking.useNetworkd = true; networking.useNetworkd = true;
systemd.network.networks."10-wan" = {
matchConfig.Name = "ens18";
networkConfig = {
DHCP = "ipv4";
Address = "2a01:e0a:de4:a0e1:8ec7:b5d2:f663:a67a";
};
linkConfig.RequiredForOnline = "routable";
};
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";