From 07322a9e9a1d030bb72a9949e751f9021b32c67a Mon Sep 17 00:00:00 2001 From: Asyncnomi Date: Thu, 24 Jul 2025 20:36:09 +0200 Subject: [PATCH] add aurore for real --- README.md | 13 +++++++++ nodes.nix | 60 ++++++++++++++++++++++++++++++++++++++++- shared/commons/boot.nix | 14 ++++++++-- 3 files changed, 84 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 77cd2f6..47bdf6c 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,19 @@ Endpoint = 193.54.193.176:51920 PersistentKeepalive = 25 AllowedIPs = 172.19.0.0/17,fc00::/96 ``` + +``` +[interface] +Address = 172.19.130./32 +Address = fc00:f::130:/128 +PrivateKey = + +[Peer] +PublicKey = 6zt1TmDgpOoTYhJVhfJTEWr0HhWcXrpXvtCr7Xldyhg= +Endpoint = 45.66.111.188:51920 +PersistentKeepalive = 25 +AllowedIPs = 172.19.0.0/17,fc00::/96 +``` Only one need to be up at a time ### SSH diff --git a/nodes.nix b/nodes.nix index 7148b31..0ad6372 100644 --- a/nodes.nix +++ b/nodes.nix @@ -581,4 +581,62 @@ wg-pub = "wUUK+ZfLXMeJLKlcfNpjWEoOR8qI3/1BBazNzUY4rxg="; }; -} \ No newline at end of file + + ###################### + # Aurore Inventory # + ###################### + + bastion-aur-lasuite-federez = { + zone = 3; + id = 1; + system = "x86_64-linux"; + ver = "25.05"; + modules = [ + ./shared/bastion.nix + ]; + + ip4 = "45.66.111.188/24"; + gIp4 = "45.66.111.254"; + + dev = "ens18"; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/4c3698a5-6c56-4f67-9c8c-775021605ff5"; + fsType = "ext4"; + }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/38F5-01F3"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + wg-pub = "evbfIgNwP4yJ9l4SPyxcmNLcJAbjEezssCdFtNq9TXk="; + }; + + master-dns-aur-lasuite-federez = { + zone = 3; + id = 2; + system = "x86_64-linux"; + ver = "25.05"; + modules = [ + # TODO + ]; + + ip4 = "45.66.111.189/24"; + gIp4 = "45.66.111.254"; + + dev = "ens18"; + + fileSystems."/" = { + device = ""; + fsType = "ext4"; + }; + fileSystems."/boot" = { + device = ""; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + wg-pub = "dUWcl8dn7dN0WWZWho7ehmv5uFubm/XG+MQxn4lonV8="; + }; +} diff --git a/shared/commons/boot.nix b/shared/commons/boot.nix index aa33f76..0d2500a 100644 --- a/shared/commons/boot.nix +++ b/shared/commons/boot.nix @@ -4,6 +4,16 @@ let # Import nodes nodes = import ./../../nodes.nix; myNode = nodes."${config.hostName}"; + + hasGrub = nd: lib.hasAttr "grubDevice" nd; + + bootLoader = if hasGrub myNode then { + grub.enable = true; + grub.device = myNode.grubDevice; + } else { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; in { imports = [ @@ -15,8 +25,8 @@ in fileSystems = myNode.fileSystems; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; - boot.loader.grub.enable = true; - boot.loader.grub.device = myNode.grubDevice; + + boot.loader = bootLoader; nixpkgs.hostPlatform = lib.mkDefault myNode.system; } \ No newline at end of file