mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2025-12-21 17:07:13 +01:00
Compare commits
11 Commits
7e95b77e15
...
openstack-
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a6b6cfdb7 | |||
| 871a24947c | |||
|
|
5a76b62700 | ||
|
|
0f77a42e34 | ||
|
|
c64d28fc26 | ||
|
|
179d0743ce | ||
|
|
47fa3759c3 | ||
|
|
3a37fefd4d | ||
|
|
47d7b88a05 | ||
| 78456063ba | |||
| ca287b95c9 |
37
flake.lock
generated
37
flake.lock
generated
@@ -156,6 +156,42 @@
|
|||||||
"url": "https://git.pvv.ntnu.no/oysteikt/nix-gitea-themes.git"
|
"url": "https://git.pvv.ntnu.no/oysteikt/nix-gitea-themes.git"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixlib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725757153,
|
||||||
|
"narHash": "sha256-c1a6iLmCVPFI9EUVMrBN8xdmFxFXEjcVwiTSVmqajOs=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "68584f89dd0eb16fea5d80ae127f3f681f6a5df7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-generators": {
|
||||||
|
"inputs": {
|
||||||
|
"nixlib": "nixlib",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726102718,
|
||||||
|
"narHash": "sha256-u89QyfjtXryLHrO3Wre4kuWK5KDKiXe8lgRi6+cUOEw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"rev": "5ae384b83b91080f0fead6bc1add1cff8277cb3f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725198597,
|
"lastModified": 1725198597,
|
||||||
@@ -250,6 +286,7 @@
|
|||||||
"matrix-next": "matrix-next",
|
"matrix-next": "matrix-next",
|
||||||
"minecraft-data": "minecraft-data",
|
"minecraft-data": "minecraft-data",
|
||||||
"nix-gitea-themes": "nix-gitea-themes",
|
"nix-gitea-themes": "nix-gitea-themes",
|
||||||
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"pvv-calendar-bot": "pvv-calendar-bot",
|
"pvv-calendar-bot": "pvv-calendar-bot",
|
||||||
|
|||||||
40
flake.nix
40
flake.nix
@@ -29,9 +29,12 @@
|
|||||||
grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs";
|
grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
minecraft-data.url = "git+https://git.pvv.ntnu.no/Drift/minecraft-data.git";
|
minecraft-data.url = "git+https://git.pvv.ntnu.no/Drift/minecraft-data.git";
|
||||||
|
|
||||||
|
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||||
|
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, ... }@inputs:
|
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, nixos-generators, ... }@inputs:
|
||||||
let
|
let
|
||||||
nixlib = nixpkgs.lib;
|
nixlib = nixpkgs.lib;
|
||||||
systems = [
|
systems = [
|
||||||
@@ -126,7 +129,6 @@
|
|||||||
inputs.grzegorz-clients.nixosModules.grzegorz-webui
|
inputs.grzegorz-clients.nixosModules.grzegorz-webui
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
buskerud = stableNixosConfig "buskerud" { };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
@@ -150,6 +152,40 @@
|
|||||||
|
|
||||||
simplesamlphp = pkgs.callPackage ./packages/simplesamlphp { };
|
simplesamlphp = pkgs.callPackage ./packages/simplesamlphp { };
|
||||||
|
|
||||||
|
openstack-image = nixos-generators.nixosGenerate {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
format = "openstack";
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
({config, lib, pkgs, modulesPath, ... }: {
|
||||||
|
system.build.openstackImage = lib.mkForce (import "${modulesPath}/../lib/make-disk-image.nix" {
|
||||||
|
inherit config lib pkgs;
|
||||||
|
additionalSpace = "1024M";
|
||||||
|
copyChannel = true;
|
||||||
|
diskSize = "auto";
|
||||||
|
format = "raw";
|
||||||
|
partitionTableType = "efi";
|
||||||
|
configFile = pkgs.writeText "configuration.nix"
|
||||||
|
''
|
||||||
|
{
|
||||||
|
imports = [ <nixpkgs/nixos/modules/virtualisation/openstack-config.nix> ];
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
boot.loader.grub = lib.mkForce {
|
||||||
|
device = "nodev";
|
||||||
|
efiSupport = true;
|
||||||
|
efiInstallAsRemovable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/ESP";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
} //
|
} //
|
||||||
(nixlib.pipe null [
|
(nixlib.pipe null [
|
||||||
(_: pkgs.callPackage ./packages/mediawiki-extensions { })
|
(_: pkgs.callPackage ./packages/mediawiki-extensions { })
|
||||||
|
|||||||
@@ -55,6 +55,11 @@ in {
|
|||||||
USER = "gitea@pvv.ntnu.no";
|
USER = "gitea@pvv.ntnu.no";
|
||||||
SUBJECT_PREFIX = "[pvv-git]";
|
SUBJECT_PREFIX = "[pvv-git]";
|
||||||
};
|
};
|
||||||
|
metrics = {
|
||||||
|
ENABLED = true;
|
||||||
|
ENABLED_ISSUE_BY_LABEL = true;
|
||||||
|
ENABLED_ISSUE_BY_REPOSITORY = true;
|
||||||
|
};
|
||||||
indexer.REPO_INDEXER_ENABLED = true;
|
indexer.REPO_INDEXER_ENABLED = true;
|
||||||
service = {
|
service = {
|
||||||
DISABLE_REGISTRATION = true;
|
DISABLE_REGISTRATION = true;
|
||||||
@@ -109,12 +114,21 @@ in {
|
|||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
kTLS = true;
|
kTLS = true;
|
||||||
locations."/" = {
|
locations = {
|
||||||
|
"/" = {
|
||||||
proxyPass = "http://unix:${cfg.settings.server.HTTP_ADDR}";
|
proxyPass = "http://unix:${cfg.settings.server.HTTP_ADDR}";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 512M;
|
client_max_body_size 512M;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
"/metrics" = {
|
||||||
|
proxyPass = "http://unix:${cfg.settings.server.HTTP_ADDR}";
|
||||||
|
extraConfig = ''
|
||||||
|
allow ${values.hosts.ildkule.ipv4}/32;
|
||||||
|
deny all;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||||
|
|||||||
@@ -182,8 +182,6 @@ in {
|
|||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
allow ${values.hosts.ildkule.ipv4};
|
allow ${values.hosts.ildkule.ipv4};
|
||||||
allow ${values.hosts.ildkule.ipv6};
|
allow ${values.hosts.ildkule.ipv6};
|
||||||
allow ${values.hosts.ildkule.ipv4_global};
|
|
||||||
allow ${values.hosts.ildkule.ipv6_global};
|
|
||||||
deny all;
|
deny all;
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
@@ -195,8 +193,6 @@ in {
|
|||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
allow ${values.hosts.ildkule.ipv4};
|
allow ${values.hosts.ildkule.ipv4};
|
||||||
allow ${values.hosts.ildkule.ipv6};
|
allow ${values.hosts.ildkule.ipv6};
|
||||||
allow ${values.hosts.ildkule.ipv4_global};
|
|
||||||
allow ${values.hosts.ildkule.ipv6_global};
|
|
||||||
deny all;
|
deny all;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
{ config, pkgs, values, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../../base
|
|
||||||
../../misc/metrics-exporters.nix
|
|
||||||
|
|
||||||
./services/libvirt.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# buskerud does not support efi?
|
|
||||||
# boot.loader.systemd-boot.enable = true;
|
|
||||||
# boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
boot.loader.grub.enable = true;
|
|
||||||
boot.loader.grub.device = "/dev/sdb";
|
|
||||||
|
|
||||||
networking.hostName = "buskerud";
|
|
||||||
networking.search = [ "pvv.ntnu.no" "pvv.org" ];
|
|
||||||
networking.nameservers = [ "129.241.0.200" "129.241.0.201" ];
|
|
||||||
networking.tempAddresses = "disabled";
|
|
||||||
|
|
||||||
systemd.network.networks."enp3s0f0" = values.defaultNetworkConfig // {
|
|
||||||
matchConfig.Name = "enp3s0f0";
|
|
||||||
address = with values.hosts.buskerud; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# List packages installed in system profile
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
];
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
# 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 + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "hpsa" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/ed9654fe-575a-4fb3-b6ff-1b059479acff";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp14s0f0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp14s0f1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp3s0f0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp3s0f1.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp4s0f0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp4s0f1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
|
|
||||||
# On a gui-enabled machine, connect with:
|
|
||||||
# $ virt-manager --connect "qemu+ssh://buskerud/system?socket=/var/run/libvirt/libvirt-sock"
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, values, ... }:
|
{ config, pkgs, lib, values, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
@@ -19,27 +19,28 @@
|
|||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
networking.hostName = "ildkule"; # Define your hostname.
|
# Openstack Neutron and systemd-networkd are not best friends, use something else:
|
||||||
|
systemd.network.enable = lib.mkForce false;
|
||||||
|
networking = let
|
||||||
|
hostConf = values.hosts.ildkule;
|
||||||
|
in {
|
||||||
|
hostName = "ildkule";
|
||||||
|
tempAddresses = "disabled";
|
||||||
|
useDHCP = lib.mkForce true;
|
||||||
|
|
||||||
# Main connection, using the global/floatig IP, for communications with the world
|
search = values.defaultNetworkConfig.domains;
|
||||||
systemd.network.networks."30-ntnu-global" = values.openstackGlobalNetworkConfig // {
|
nameservers = values.defaultNetworkConfig.dns;
|
||||||
matchConfig.Name = "ens4";
|
defaultGateway.address = hostConf.ipv4_internal_gw;
|
||||||
|
|
||||||
# Add the global addresses in addition to the local address learned from DHCP
|
interfaces."ens4" = {
|
||||||
addresses = [
|
ipv4.addresses = [
|
||||||
{ addressConfig.Address = "${values.hosts.ildkule.ipv4_global}/32"; }
|
{ address = hostConf.ipv4; prefixLength = 32; }
|
||||||
{ addressConfig.Address = "${values.hosts.ildkule.ipv6_global}/128"; }
|
{ address = hostConf.ipv4_internal; prefixLength = 24; }
|
||||||
|
];
|
||||||
|
ipv6.addresses = [
|
||||||
|
{ address = hostConf.ipv6; prefixLength = 64; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Secondary connection only for use within the university network
|
|
||||||
systemd.network.networks."40-ntnu-internal" = values.openstackLocalNetworkConfig // {
|
|
||||||
matchConfig.Name = "ens3";
|
|
||||||
# Add the ntnu-internal addresses in addition to the local address learned from DHCP
|
|
||||||
addresses = [
|
|
||||||
{ addressConfig.Address = "${values.hosts.ildkule.ipv4}/32"; }
|
|
||||||
{ addressConfig.Address = "${values.hosts.ildkule.ipv6}/128"; }
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile
|
# List packages installed in system profile
|
||||||
|
|||||||
1546
hosts/ildkule/services/monitoring/dashboards/gitea-dashbaord.json
Normal file
1546
hosts/ildkule/services/monitoring/dashboards/gitea-dashbaord.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -75,6 +75,12 @@ in {
|
|||||||
url = "https://grafana.com/api/dashboards/240/revisions/3/download";
|
url = "https://grafana.com/api/dashboards/240/revisions/3/download";
|
||||||
options.path = dashboards/go-processes.json;
|
options.path = dashboards/go-processes.json;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "Gitea Dashbaord";
|
||||||
|
type = "file";
|
||||||
|
url = "https://grafana.com/api/dashboards/17802/revisions/3/download";
|
||||||
|
options.path = dashboards/gitea-dashbaord.json;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
{ config, ... }: {
|
{ config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./gogs.nix
|
./gitea.nix
|
||||||
./matrix-synapse.nix
|
./matrix-synapse.nix
|
||||||
# TODO: enable once https://github.com/NixOS/nixpkgs/pull/242365 gets merged
|
# TODO: enable once https://github.com/NixOS/nixpkgs/pull/242365 gets merged
|
||||||
# ./mysqld.nix
|
# ./mysqld.nix
|
||||||
./node.nix
|
|
||||||
./postgres.nix
|
./postgres.nix
|
||||||
./systemd.nix
|
./machines.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
|
|||||||
16
hosts/ildkule/services/monitoring/prometheus/gitea.nix
Normal file
16
hosts/ildkule/services/monitoring/prometheus/gitea.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services.prometheus.scrapeConfigs = [{
|
||||||
|
job_name = "gitea";
|
||||||
|
scrape_interval = "60s";
|
||||||
|
scheme = "https";
|
||||||
|
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [
|
||||||
|
"git.pvv.ntnu.no:443"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
}
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{ config, ... }: let
|
|
||||||
cfg = config.services.prometheus;
|
|
||||||
in {
|
|
||||||
services.prometheus.scrapeConfigs = [{
|
|
||||||
job_name = "git-gogs";
|
|
||||||
scheme = "https";
|
|
||||||
metrics_path = "/-/metrics";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [
|
|
||||||
"essendrop.pvv.ntnu.no:443"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
54
hosts/ildkule/services/monitoring/prometheus/machines.nix
Normal file
54
hosts/ildkule/services/monitoring/prometheus/machines.nix
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{ config, ... }: let
|
||||||
|
cfg = config.services.prometheus;
|
||||||
|
in {
|
||||||
|
services.prometheus.scrapeConfigs = [{
|
||||||
|
job_name = "base_info";
|
||||||
|
static_configs = [
|
||||||
|
{ labels.hostname = "ildkule";
|
||||||
|
targets = [
|
||||||
|
"ildkule.pvv.ntnu.no:${toString cfg.exporters.node.port}"
|
||||||
|
"ildkule.pvv.ntnu.no:${toString cfg.exporters.systemd.port}"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{ labels.hostname = "bekkalokk";
|
||||||
|
targets = [
|
||||||
|
"bekkalokk.pvv.ntnu.no:9100"
|
||||||
|
"bekkalokk.pvv.ntnu.no:9101"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{ labels.hostname = "bicep";
|
||||||
|
targets = [
|
||||||
|
"bicep.pvv.ntnu.no:9100"
|
||||||
|
"bicep.pvv.ntnu.no:9101"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{ labels.hostname = "brzeczyszczykiewicz";
|
||||||
|
targets = [
|
||||||
|
"brzeczyszczykiewicz.pvv.ntnu.no:9100"
|
||||||
|
"brzeczyszczykiewicz.pvv.ntnu.no:9101"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{ labels.hostname = "georg";
|
||||||
|
targets = [
|
||||||
|
"georg.pvv.ntnu.no:9100"
|
||||||
|
"georg.pvv.ntnu.no:9101"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{ labels.hostname = "hildring";
|
||||||
|
targets = [
|
||||||
|
"hildring.pvv.ntnu.no:9100"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{ labels.hostname = "isvegg";
|
||||||
|
targets = [
|
||||||
|
"isvegg.pvv.ntnu.no:9100"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{ labels.hostname = "microbel";
|
||||||
|
targets = [
|
||||||
|
"microbel.pvv.ntnu.no:9100"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{ config, ... }: let
|
|
||||||
cfg = config.services.prometheus;
|
|
||||||
in {
|
|
||||||
services.prometheus.scrapeConfigs = [{
|
|
||||||
job_name = "node";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [
|
|
||||||
"ildkule.pvv.ntnu.no:${toString cfg.exporters.node.port}"
|
|
||||||
"microbel.pvv.ntnu.no:9100"
|
|
||||||
"isvegg.pvv.ntnu.no:9100"
|
|
||||||
"knakelibrak.pvv.ntnu.no:9100"
|
|
||||||
"hildring.pvv.ntnu.no:9100"
|
|
||||||
"bicep.pvv.ntnu.no:9100"
|
|
||||||
"essendrop.pvv.ntnu.no:9100"
|
|
||||||
"andresbu.pvv.ntnu.no:9100"
|
|
||||||
"bekkalokk.pvv.ntnu.no:9100"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{ config, ... }: let
|
|
||||||
cfg = config.services.prometheus;
|
|
||||||
in {
|
|
||||||
services.prometheus.scrapeConfigs = [{
|
|
||||||
job_name = "systemd";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [
|
|
||||||
"ildkule.pvv.ntnu.no:${toString cfg.exporters.node.port}"
|
|
||||||
"bicep.pvv.ntnu.no:9101"
|
|
||||||
"bekkalokk.pvv.ntnu.no:9101"
|
|
||||||
"brzeczyszczykiewicz.pvv.ntnu.no:9101"
|
|
||||||
"georg.pvv.ntnu.no:9101"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
@@ -14,8 +14,6 @@
|
|||||||
"::1"
|
"::1"
|
||||||
values.hosts.ildkule.ipv4
|
values.hosts.ildkule.ipv4
|
||||||
values.hosts.ildkule.ipv6
|
values.hosts.ildkule.ipv6
|
||||||
values.hosts.ildkule.ipv4_global
|
|
||||||
values.hosts.ildkule.ipv6_global
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -36,8 +34,6 @@
|
|||||||
"::1"
|
"::1"
|
||||||
values.hosts.ildkule.ipv4
|
values.hosts.ildkule.ipv4
|
||||||
values.hosts.ildkule.ipv6
|
values.hosts.ildkule.ipv6
|
||||||
values.hosts.ildkule.ipv4_global
|
|
||||||
values.hosts.ildkule.ipv6_global
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
42
values.nix
42
values.nix
@@ -30,11 +30,10 @@ in rec {
|
|||||||
ipv6 = pvv-ipv6 168;
|
ipv6 = pvv-ipv6 168;
|
||||||
};
|
};
|
||||||
ildkule = {
|
ildkule = {
|
||||||
ipv4 = "10.212.25.209";
|
ipv4 = "129.241.153.213";
|
||||||
ipv6 = "2001:700:300:6025:f816:3eff:feee:812d";
|
ipv4_internal = "192.168.12.209";
|
||||||
|
ipv4_internal_gw = "192.168.12.1";
|
||||||
ipv4_global = "129.241.153.213";
|
ipv6 = "2001:700:300:6026:f816:3eff:fe58:f1e8";
|
||||||
ipv6_global = "2001:700:300:6026:f816:3eff:fe58:f1e8";
|
|
||||||
};
|
};
|
||||||
bicep = {
|
bicep = {
|
||||||
ipv4 = pvv-ipv4 209;
|
ipv4 = pvv-ipv4 209;
|
||||||
@@ -59,39 +58,14 @@ in rec {
|
|||||||
ipv4 = pvv-ipv4 204;
|
ipv4 = pvv-ipv4 204;
|
||||||
ipv6 = pvv-ipv6 "1:4f"; # Wtf øystein og daniel why
|
ipv6 = pvv-ipv6 "1:4f"; # Wtf øystein og daniel why
|
||||||
};
|
};
|
||||||
buskerud = {
|
|
||||||
ipv4 = pvv-ipv4 231;
|
|
||||||
ipv6 = pvv-ipv6 231;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultNetworkConfig = {
|
defaultNetworkConfig = {
|
||||||
networkConfig.IPv6AcceptRA = "no";
|
dns = [ "129.241.0.200" "129.241.0.201" "2001:700:300:1900::200" "2001:700:300:1900::201" ];
|
||||||
gateway = [ hosts.gateway ];
|
|
||||||
dns = [ "129.241.0.200" "129.241.0.201" ];
|
|
||||||
domains = [ "pvv.ntnu.no" "pvv.org" ];
|
domains = [ "pvv.ntnu.no" "pvv.org" ];
|
||||||
|
gateway = [ hosts.gateway ];
|
||||||
|
|
||||||
|
networkConfig.IPv6AcceptRA = "no";
|
||||||
DHCP = "no";
|
DHCP = "no";
|
||||||
};
|
};
|
||||||
|
|
||||||
openstackGlobalNetworkConfig = {
|
|
||||||
networkConfig.IPv6AcceptRA = "yes";
|
|
||||||
dns = [ "129.241.0.200" "129.241.0.201" ];
|
|
||||||
domains = [ "pvv.ntnu.no" "pvv.org" ];
|
|
||||||
DHCP = "yes";
|
|
||||||
};
|
|
||||||
|
|
||||||
openstackLocalNetworkConfig = {
|
|
||||||
networkConfig.IPv6AcceptRA = "no";
|
|
||||||
dns = [ "129.241.0.200" "129.241.0.201" ];
|
|
||||||
domains = [ "pvv.ntnu.no" "pvv.org" ];
|
|
||||||
DHCP = "yes";
|
|
||||||
|
|
||||||
# Only use this network for link-local networking, not global/default routes
|
|
||||||
dhcpV4Config.UseRoutes = "no";
|
|
||||||
routes = [
|
|
||||||
{ routeConfig = { Destination = "10.0.0.0/8"; Gateway = "_dhcp4"; }; }
|
|
||||||
];
|
|
||||||
|
|
||||||
linkConfig.RequiredForOnline = "no";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user