Compare commits

...

3 commits

Author SHA1 Message Date
13524c20f6 feat(machines): Init vault01
Some checks failed
build configuration / build_storage01 (push) Successful in 2m35s
build configuration / build_vault01 (push) Successful in 1m19s
build configuration / build_web01 (push) Successful in 1m25s
build configuration / build_compute01 (push) Has been cancelled
2024-01-10 15:00:18 +01:00
9ecf65aeba chore(npins): Update nixos-23.11 2024-01-10 14:59:50 +01:00
50368c56dd fix(modules/dgn-console): Only try to create the psql migrate script if postgres is enabled 2024-01-10 14:59:39 +01:00
9 changed files with 99 additions and 3 deletions

View file

@ -29,6 +29,16 @@ jobs:
# Enter the shell # Enter the shell
nix-shell --run 'colmena build --on storage01' nix-shell --run 'colmena build --on storage01'
build_vault01:
runs-on: nix
steps:
- uses: actions/checkout@v3
- name: Build vault01
run: |
# Enter the shell
nix-shell --run 'colmena build --on vault01'
build_web01: build_web01:
runs-on: nix runs-on: nix
steps: steps:

View file

@ -0,0 +1,21 @@
{ lib, ... }:
lib.extra.mkConfig {
enabledModules = [
# List of modules to enable
"dgn-fail2ban"
];
enabledServices = [
# List of services to enable
];
extraConfig = {
dgn-fail2ban.jails =
lib.extra.enableAttrs' "enabled" [ "sshd-bruteforce" "sshd-timeout" ];
services.netbird.enable = true;
};
root = ./.;
}

View file

@ -0,0 +1,35 @@
# 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.
{ pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules =
[ "xhci_pci" "megaraid_sas" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
kernelPackages = pkgs.linuxKernel.packages.linux_6_7;
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/cfa2a9fd-f053-42ce-9d9a-65cdd773272d";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/33AE-7115";
fsType = "vfat";
};
};
swapDevices =
[{ device = "/dev/disk/by-uuid/954ecb9c-ccd1-4e98-9eb6-3514bd3c01d1"; }];
}

View file

@ -0,0 +1,6 @@
let
lib = import ../../../lib { };
publicKeys = lib.getNodeKeys "vault01";
in lib.setDefault { inherit publicKeys; } [
]

View file

@ -7,6 +7,11 @@
"storage01" "storage01"
]; ];
# Jourdan
par02 = [
"vault01"
];
# VMs du SPI/NPS/Whatever # VMs du SPI/NPS/Whatever
dmi01 = [ dmi01 = [
"web01" "web01"

View file

@ -60,6 +60,20 @@ builtins.mapAttrs mkNet {
hostId = "d4e7c369"; hostId = "d4e7c369";
}; };
vault01 = {
interfaces = {
enp130s0f0 = {
ipv4 = [
{ address = "129.199.210.85"; prefixLength = 24; }
];
gateways = [ "129.199.210.254" ];
};
};
hostId = "e83b600d";
};
web01 = { web01 = {
interfaces = { interfaces = {
ens3 = { ens3 = {

View file

@ -37,4 +37,8 @@ builtins.mapAttrs mkNode {
storage01 = { storage01 = {
stateVersion = "23.11"; stateVersion = "23.11";
}; };
vault01 = {
stateVersion = "23.11";
};
} }

View file

@ -71,7 +71,8 @@ in {
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
environment.systemPackages = (with pkgs; [ neovim wget kitty.terminfo ]) environment.systemPackages = (with pkgs; [ neovim wget kitty.terminfo ])
++ lib.optional (config.services.postgresql.package != cfg.pg-upgrade-to) ++ lib.optional (config.services.postgresql.enable
&& config.services.postgresql.package != cfg.pg-upgrade-to)
(pkgs.writeScriptBin "upgrade-pg-cluster" '' (pkgs.writeScriptBin "upgrade-pg-cluster" ''
set -eux set -eux
# XXX it's perhaps advisable to stop all services that depend on postgresql # XXX it's perhaps advisable to stop all services that depend on postgresql

View file

@ -127,8 +127,8 @@
"nixos-23.11": { "nixos-23.11": {
"type": "Channel", "type": "Channel",
"name": "nixos-23.11", "name": "nixos-23.11",
"url": "https://releases.nixos.org/nixos/23.11/nixos-23.11.2596.c1be43e8e837/nixexprs.tar.xz", "url": "https://releases.nixos.org/nixos/23.11/nixos-23.11.2728.6723fa4e4f1a/nixexprs.tar.xz",
"hash": "036ghzm8r0s5xn7492k3ld0pf46mw7bjnmbal42csqk8k2cj0mxh" "hash": "1iv40b5kiyajhdf6psf4fzajgn7mgb3a4m2hrdmllas1h2xdxh38"
}, },
"nixpkgs": { "nixpkgs": {
"type": "Channel", "type": "Channel",