From bb9ab4a501d35339fb6c1ef97fbc1ff7f33ecde6 Mon Sep 17 00:00:00 2001 From: korenstin Date: Sat, 7 Dec 2024 15:24:23 +0100 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20livre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.nix | 4 +++ hosts/vm/livre/default.nix | 15 ++++++++++ hosts/vm/livre/networking.nix | 53 +++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 hosts/vm/livre/default.nix create mode 100644 hosts/vm/livre/networking.nix diff --git a/flake.nix b/flake.nix index 557f281..7a8ab67 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,10 @@ apprentix = nixosSystem { specialArgs = inputs; modules = [ ./hosts/vm/apprentix ]; + + livre = nixosSystem { + specialArgs = inputs; + modules = [ ./hosts/vm/livre ]; }; neo = nixosSystem { diff --git a/hosts/vm/livre/default.nix b/hosts/vm/livre/default.nix new file mode 100644 index 0000000..7ca14c1 --- /dev/null +++ b/hosts/vm/livre/default.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + imports = [ + ./hardware-configuration.nix + ./networking.nix + + ../../../modules + ]; + + networking.hostName = "livre"; + boot.loader.grub.devices = [ "/dev/sda" ]; + + system.stateVersion = "24.11"; +} diff --git a/hosts/vm/livre/networking.nix b/hosts/vm/livre/networking.nix new file mode 100644 index 0000000..ae7302c --- /dev/null +++ b/hosts/vm/livre/networking.nix @@ -0,0 +1,53 @@ +{ ... }: + +{ + networking = { + interfaces = { + ens18 = { + + ipv4 = { + addresses = [{ + address = "172.16.10.140"; + prefixLength = 24; + }]; + }; + + ipv6 = { + addresses = [{ + address = "fd00::10:0:ff:fe01:4010"; + prefixLength = 64; + }]; + }; + + }; + + ens19 = { + + ipv4 = { + addresses = [{ + address = "172.16.3.140"; + prefixLength = 24; + }]; + routes = [{ + address = "0.0.0.0"; + via = "172.16.3.99"; + prefixLength = 0; + }]; + }; + + ipv6 = { + addresses = [{ + address = "2a0c:700:3::ff:fe01:4003"; + prefixLength = 64; + }]; + routes = [{ + address = "::"; + via = "2a0c:700:3::ff:fe00:9903"; + prefixLength = 0; + }]; + }; + + }; + }; + }; +}