diff options
| author | Mel <mel@rnrd.eu> | 2026-08-16 20:27:36 +0200 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2026-09-05 20:06:01 +0200 |
| commit | fa49e4a5d8ec8287fbd51046c26a84e8c99a4ec5 (patch) | |
| tree | aecc4a141396f1f19e11703c9b8b658fb7325b7c | |
| parent | 72083343b49c35c3098e5b239d8e407cf581660a (diff) | |
| download | network-fa49e4a5d8ec8287fbd51046c26a84e8c99a4ec5.tar.zst network-fa49e4a5d8ec8287fbd51046c26a84e8c99a4ec5.zip | |
Move out Renard configuration as Renne
Signed-off-by: Mel <mel@rnrd.eu>
| -rw-r--r-- | flake.nix | 3 | ||||
| -rw-r--r-- | machines/renne/default.nix | 109 | ||||
| -rw-r--r-- | machines/renne/devices.nix | 27 | ||||
| -rw-r--r-- | machines/renne/hardware.nix | 23 | ||||
| -rw-r--r-- | machines/renne/home.nix | 9 | ||||
| -rw-r--r-- | secrets/keys.nix | 5 | ||||
| -rw-r--r-- | secrets/secrets.nix | 1 |
7 files changed, 176 insertions, 1 deletions
@@ -72,7 +72,8 @@ machines = with systems; mkMachines [ { name = "corsac"; system = x86; tailscale.ip = "100.64.100.100"; } { name = "lapin"; system = arm; tailscale.ip = "100.83.254.27"; } - { name = "renard"; system = x86; tailscale.ip = "100.75.17.75"; } + { name = "renard"; system = x86; tailscale.ip = "100.123.100.75"; } + { name = "renne"; system = x86; tailscale.ip = "100.75.17.75"; } { name = "loup"; system = x86; tailscale.ip = "100.70.108.22"; } { name = "fourmi"; system = arm; tailscale.ip = "100.99.119.83"; } { name = "taupe"; system = arm; tailscale.ip = "100.103.211.75"; } diff --git a/machines/renne/default.nix b/machines/renne/default.nix new file mode 100644 index 0000000..8473613 --- /dev/null +++ b/machines/renne/default.nix @@ -0,0 +1,109 @@ +{ me, machines, ... }: + +{ + imports = [ + ../../modules/common.nix + + ./hardware.nix + ./devices.nix + + ../../services/minecraft.nix + ]; + + foundation = { + www = { + enable = true; + + public = true; + tailnet = true; + }; + + monitoring = { + client.enable = true; + + services = [ + "base" + "tailnet" + "mel" + "shorest" + ]; + }; + }; + + services.nginx.virtualHosts = { + base.locations = { + "/stuff/" = { + alias = "/var/www/html/"; + }; + + # redirect to akkoma on lapin + "/.well-known/webfinger" = { + return = "301 https://soc.rnrd.eu$request_uri"; + }; + + # delegate matrix to subdomain `matrix.rnrd.eu` + "/.well-known/matrix/server" = { + return = "200 '{ \"m.server\": \"matrix.rnrd.eu:443\" }'"; + extraConfig = '' + default_type application/json; + ''; + }; + "/.well-known/matrix/client" = { + return = '' + 200 '{ + "m.homeserver": { + "base_url": "https://matrix.rnrd.eu/" + }, + "org.matrix.msc3575.proxy": { + "url": "https://matrix.rnrd.eu/" + } + }' + ''; + extraConfig = '' + default_type application/json; + add_header "Access-Control-Allow-Origin" *; + ''; + }; + }; + + "sho.rest" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:5000"; + }; + extraConfig = '' + access_log /var/log/nginx/shorest.access.log json_combined; + ''; + }; + + "mel.gg" = { + enableACME = true; + forceSSL = true; + root = "/srv/mel"; + extraConfig = '' + access_log /var/log/nginx/mel.access.log json_combined; + ''; + }; + + "catskill.dev" = { + enableACME = true; + forceSSL = true; + root = "/srv/catskill"; + extraConfig = '' + access_log /var/log/nginx/catskill.access.log json_combined; + ''; + }; + + "moth.run" = { + enableACME = true; + forceSSL = true; + root = "/srv/moth"; + extraConfig = '' + access_log /var/log/nginx/moth.access.log json_combined; + ''; + }; + }; + + system.stateVersion = "24.05"; +} diff --git a/machines/renne/devices.nix b/machines/renne/devices.nix new file mode 100644 index 0000000..d952488 --- /dev/null +++ b/machines/renne/devices.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + boot.initrd = { + availableKernelModules = [ "virtio_pci" "virtio_scsi" ]; + kernelModules = [ "dm-snapshot" ]; + }; + + boot.loader.grub = { + enable = true; + device = "/dev/sda"; + }; + + zramSwap = { + enable = true; + algorithm = "zstd"; + swapDevices = 1; + memoryPercent = 50; + }; + + systemd.network.networks."10-wan" = { + name = "ens18"; + DHCP = "ipv4"; + address = [ "2a02:c207:2042:1313::1" ]; + routes = [ { Gateway = "fe80::1"; } ]; + }; +} diff --git a/machines/renne/hardware.nix b/machines/renne/hardware.nix new file mode 100644 index 0000000..f7d1d6b --- /dev/null +++ b/machines/renne/hardware.nix @@ -0,0 +1,23 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/258bcc4c-22a7-4c4c-a264-568b7194dffc"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + +} diff --git a/machines/renne/home.nix b/machines/renne/home.nix new file mode 100644 index 0000000..dce0783 --- /dev/null +++ b/machines/renne/home.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + imports = [ + ../../modules/home/common.nix + ]; + + home.stateVersion = "24.05"; +} diff --git a/secrets/keys.nix b/secrets/keys.nix index 5786879..a720d74 100644 --- a/secrets/keys.nix +++ b/secrets/keys.nix @@ -1,6 +1,11 @@ let machines = { renard = { + user = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILb8Mp1GCV2nD/VbIusgOKAlx7CzB6stvnz7RTnE0DS5"; + system = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEJUlOFCmrscfstDFL1QOP2mp70T/maqZhtAzfOONmX8"; + }; + + renne = { user = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINs2TTjnQvDNr/S3lPLWYOnZi00YIMrRUDH8cpBz1k1m"; system = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/qDL7+86+0H6NkPs/w4GYiWQwT/4YAx9O2J7sLkKmf"; }; diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 24a4abb..8b3e165 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -4,6 +4,7 @@ let inherit (keys) allAdmins allSystems; inherit (keys.system) renard + renne lapin corsac fourmi |
