2024-12-05 17:03:42 +01:00
|
|
|
{
|
|
|
|
lib,
|
2024-12-11 17:03:41 +01:00
|
|
|
pkgs,
|
2024-12-05 17:03:42 +01:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
deployment = {
|
|
|
|
targetHost = "son.kat";
|
|
|
|
tags = [ "kat-vms" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
|
|
|
./disks.nix
|
2024-12-11 17:03:41 +01:00
|
|
|
./doc
|
2024-12-05 17:03:42 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
|
|
|
kernelParams = [ "console=ttyS0" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
kat = {
|
|
|
|
fqdn = "son.katvayor.net";
|
|
|
|
proxies.ip = "192.168.122.5";
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.network.enable = lib.mkForce false;
|
|
|
|
networking = {
|
|
|
|
useNetworkd = lib.mkForce false;
|
|
|
|
interfaces."enp1s0" = {
|
|
|
|
useDHCP = false;
|
|
|
|
ipv4.addresses = [
|
|
|
|
{
|
|
|
|
address = "192.168.122.5";
|
|
|
|
prefixLength = 24;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
ipv6.addresses = [
|
|
|
|
{
|
|
|
|
address = "fe80::5";
|
|
|
|
prefixLength = 64;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
defaultGateway = "192.168.122.1";
|
|
|
|
defaultGateway6 = {
|
|
|
|
address = "fe80::1";
|
|
|
|
interface = "enp1s0";
|
|
|
|
};
|
|
|
|
nameservers = [
|
|
|
|
"192.168.122.1"
|
|
|
|
"fe80::1%enp1s0"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.enable = false;
|
|
|
|
|
|
|
|
security.acme = {
|
|
|
|
acceptTerms = true;
|
|
|
|
defaults.email = "root@katvayor.net";
|
|
|
|
};
|
|
|
|
services = {
|
|
|
|
openssh.enable = true;
|
|
|
|
qemuGuest.enable = true;
|
|
|
|
getty.autologinUser = "root";
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
|
|
|
"son.katvayor.net" = {
|
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-12-11 17:03:41 +01:00
|
|
|
extranix = {
|
|
|
|
enable = true;
|
2024-12-11 23:27:47 +01:00
|
|
|
modules = {
|
|
|
|
"netconf" =
|
|
|
|
let
|
|
|
|
netconf = pkgs.fetchgit {
|
|
|
|
url = "https://git.dgnum.eu/DGNum/Netconf-Module.git";
|
|
|
|
rev = "8f58ee21fe9c0ad22e3f16e58c3837c1c97eb5e8";
|
|
|
|
outputHash = "sha256-OXKSFEOjeeRFVbVodJSkhuT+r7+p6QPUzjbw2vs6Xao=";
|
|
|
|
name = "netconf";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
paths = [
|
|
|
|
"${netconf.outPath}/junos"
|
|
|
|
"${netconf.outPath}/dgn-module.nix"
|
|
|
|
];
|
2024-12-12 14:11:49 +01:00
|
|
|
path-translations = [
|
|
|
|
{
|
|
|
|
base = netconf.outPath;
|
|
|
|
url = "https://git.dgnum.eu/DGNum/Netconf-Module/src/branch/master/";
|
|
|
|
}
|
|
|
|
];
|
2024-12-11 23:27:47 +01:00
|
|
|
};
|
|
|
|
"infra DGNum" =
|
|
|
|
let
|
|
|
|
infra = pkgs.fetchgit {
|
|
|
|
url = "https://git.dgnum.eu/DGNum/infrastructure.git";
|
|
|
|
rev = "417ce615079ca26e1251e7f0b6b24c36b293a17d";
|
|
|
|
outputHash = "sha256-LhjQoVZqYARpUxuuWhcNY7HLE64H8PIIBZ0QwlmGD2I=";
|
|
|
|
name = "DGN-infra";
|
|
|
|
};
|
2024-12-12 14:11:49 +01:00
|
|
|
infra-hive = import "${infra}/hive.nix";
|
|
|
|
infra-source = infra-hive.meta.specialArgs.sources;
|
|
|
|
infra-nixpkgs = infra-hive.meta.nixpkgs { };
|
|
|
|
infra-modulesPath = "${infra-nixpkgs.path}/nixos/modules/";
|
2024-12-11 23:27:47 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
paths = [
|
|
|
|
"${infra}/modules/generic"
|
|
|
|
"${infra}/modules/nixos"
|
|
|
|
];
|
2024-12-12 14:11:49 +01:00
|
|
|
ignored-modules = import "${infra-modulesPath}/module-list.nix" ++ [
|
|
|
|
"${infra-source.agenix}/modules/age.nix"
|
|
|
|
"${infra-source.arkheon}/module.nix"
|
|
|
|
"${infra-source."microvm.nix"}/nixos-modules/host"
|
2024-12-15 18:12:44 +01:00
|
|
|
{ system.stateVersion = "25.05"; }
|
2024-12-12 14:11:49 +01:00
|
|
|
];
|
2024-12-11 23:27:47 +01:00
|
|
|
specialArgs = {
|
2024-12-12 14:11:49 +01:00
|
|
|
lib = infra-nixpkgs.lib // {
|
2024-12-11 23:27:47 +01:00
|
|
|
extra = import "${infra}/lib/nix-lib";
|
|
|
|
};
|
2024-12-12 14:11:49 +01:00
|
|
|
modulesPath = infra-modulesPath;
|
|
|
|
pkgs = infra-nixpkgs;
|
2024-12-11 23:27:47 +01:00
|
|
|
name = "<nodeName>";
|
|
|
|
nodeMeta = {
|
|
|
|
nix-modules = [ ];
|
|
|
|
admins = [ ];
|
|
|
|
adminGroups = [ ];
|
|
|
|
};
|
|
|
|
meta = {
|
|
|
|
organization.groups.root = [ ];
|
|
|
|
};
|
2024-12-12 14:11:49 +01:00
|
|
|
sources = infra-source;
|
2024-12-11 23:27:47 +01:00
|
|
|
};
|
2024-12-12 14:11:49 +01:00
|
|
|
path-translations = [
|
|
|
|
{
|
|
|
|
base = infra.outPath;
|
|
|
|
url = "https://git.dgnum.eu/DGNum/infrastructure/src/branch/main/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
base = infra-source.nix-modules;
|
|
|
|
url = "https://git.hubrecht.ovh/hubrecht/nix-modules/src/branch/main/";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
base = infra-modulesPath;
|
|
|
|
url = "https://github.com/NixOS/nixpkgs/tree/master/nixos/modules";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
base = infra-source.cgroup-exporter;
|
|
|
|
url = "https://github.com/arianvp/cgroup-exporter/blob/main/";
|
|
|
|
}
|
|
|
|
];
|
2024-12-11 23:27:47 +01:00
|
|
|
};
|
2024-12-11 17:03:41 +01:00
|
|
|
};
|
|
|
|
static-data = ./static-data;
|
|
|
|
host = "son.katvayor.net";
|
|
|
|
settings = {
|
|
|
|
baseUrl = "https://dgnum.eu/";
|
2024-12-11 23:27:47 +01:00
|
|
|
title = "DGNum module documentation";
|
2024-12-11 17:03:41 +01:00
|
|
|
languageCode = "en-us";
|
|
|
|
params = {
|
2024-12-11 23:27:47 +01:00
|
|
|
release_current_stable = "infra-DGNum";
|
2024-12-11 17:03:41 +01:00
|
|
|
logo = "images/dgnum.png";
|
|
|
|
footer_credits_line = ''
|
|
|
|
Powered by catvayor |
|
|
|
|
Based on <a href="https://github.com/mipmip/home-manager-option-search">Home Manager Option Search</a>
|
|
|
|
'';
|
|
|
|
footer_copyright_line = ''
|
|
|
|
Made by catvayor for the <a href="https://dgnum.eu">DGNum</a>.
|
|
|
|
'';
|
|
|
|
main_menu = [
|
|
|
|
{
|
|
|
|
name = ''<img src="images/forgejo.png" style="display:inline-block; height:2.5em; transform:translate(0, -0.7em)" /> Source'';
|
|
|
|
url = "https://git.dgnum.eu/DGNum/Netconf-Module/";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-12-05 17:03:42 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
}
|