mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2025-12-14 06:07:15 +01:00
Compare commits
1 Commits
5c77dfbf4d
...
systemd-jo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
112a95c050 |
@@ -26,14 +26,10 @@ Det er sikkert lurt å lage en PR først om du ikke er vandt til nix enda.
|
|||||||
Innen 24h skal alle systemene hente ned den nye konfigurasjonen og deploye den.
|
Innen 24h skal alle systemene hente ned den nye konfigurasjonen og deploye den.
|
||||||
|
|
||||||
Du kan tvinge en maskin til å oppdatere seg før dette ved å kjøre:
|
Du kan tvinge en maskin til å oppdatere seg før dette ved å kjøre:
|
||||||
`nixos-rebuild switch --update-input nixpkgs --update-input nixpkgs-unstable --no-write-lock-file --refresh --upgrade --flake git+https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git`
|
`nixos-rebuild switch --update-input nixpkgs --update-input nixpkgs-unstable --no-write-lock-file --refresh --flake git+https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git --upgrade`
|
||||||
|
|
||||||
som root på maskinen.
|
som root på maskinen.
|
||||||
|
|
||||||
Hvis du ikke har lyst til å oppdatere alle pakkene (og kanskje måtte vente en stund!) kan du kjøre
|
|
||||||
|
|
||||||
`nixos-rebuild switch --override-input nixpkgs nixpkgs --override-input nixpkgs-unstable nixpkgs-unstable --flake git+https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git`
|
|
||||||
|
|
||||||
## Seksjonen for hemmeligheter
|
## Seksjonen for hemmeligheter
|
||||||
|
|
||||||
For at hemmeligheter ikke skal deles med hele verden i git - eller å være world
|
For at hemmeligheter ikke skal deles med hele verden i git - eller å være world
|
||||||
|
|||||||
200
base.nix
Normal file
200
base.nix
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
{ config, lib, pkgs, inputs, values, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./users
|
||||||
|
./modules/snakeoil-certs.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.domain = "pvv.ntnu.no";
|
||||||
|
networking.useDHCP = false;
|
||||||
|
# networking.search = [ "pvv.ntnu.no" "pvv.org" ];
|
||||||
|
# networking.nameservers = lib.mkDefault [ "129.241.0.200" "129.241.0.201" ];
|
||||||
|
# networking.tempAddresses = lib.mkDefault "disabled";
|
||||||
|
# networking.defaultGateway = values.hosts.gateway;
|
||||||
|
|
||||||
|
systemd.network.enable = true;
|
||||||
|
|
||||||
|
services.resolved = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
dnssec = "false"; # Supposdly this keeps breaking and the default is to allow downgrades anyways...
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Oslo";
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
flake = "git+https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git";
|
||||||
|
flags = [
|
||||||
|
"--update-input" "nixpkgs"
|
||||||
|
"--update-input" "nixpkgs-unstable"
|
||||||
|
"--no-write-lock-file"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
nix.gc.automatic = true;
|
||||||
|
nix.gc.options = "--delete-older-than 2d";
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
/* This makes commandline tools like
|
||||||
|
** nix run nixpkgs#hello
|
||||||
|
** and nix-shell -p hello
|
||||||
|
** use the same channel the system
|
||||||
|
** was built with
|
||||||
|
*/
|
||||||
|
nix.registry = {
|
||||||
|
nixpkgs.flake = inputs.nixpkgs;
|
||||||
|
};
|
||||||
|
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
file
|
||||||
|
git
|
||||||
|
gnupg
|
||||||
|
htop
|
||||||
|
nano
|
||||||
|
ripgrep
|
||||||
|
rsync
|
||||||
|
screen
|
||||||
|
tmux
|
||||||
|
vim
|
||||||
|
wget
|
||||||
|
|
||||||
|
kitty.terminfo
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
users.groups."drift".name = "drift";
|
||||||
|
|
||||||
|
# Trusted users on the nix builder machines
|
||||||
|
users.groups."nix-builder-users".name = "nix-builder-users";
|
||||||
|
|
||||||
|
# Let's not thermal throttle
|
||||||
|
services.thermald.enable = lib.mkIf (lib.all (x: x) [
|
||||||
|
(config.nixpkgs.system == "x86_64-linux")
|
||||||
|
(!config.boot.isContainer or false)
|
||||||
|
]) true;
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
PubkeyAcceptedAlgorithms=+ssh-rsa
|
||||||
|
Match Group wheel
|
||||||
|
PasswordAuthentication no
|
||||||
|
Match All
|
||||||
|
'';
|
||||||
|
settings.PermitRootLogin = "yes";
|
||||||
|
};
|
||||||
|
|
||||||
|
# nginx return 444 for all nonexistent virtualhosts
|
||||||
|
|
||||||
|
systemd.services.nginx.after = [ "generate-snakeoil-certs.service" ];
|
||||||
|
|
||||||
|
environment.snakeoil-certs = lib.mkIf config.services.nginx.enable {
|
||||||
|
"/etc/certs/nginx" = {
|
||||||
|
owner = "nginx";
|
||||||
|
group = "nginx";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
recommendedTlsSettings = true;
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
|
||||||
|
appendConfig = ''
|
||||||
|
pcre_jit on;
|
||||||
|
worker_processes auto;
|
||||||
|
worker_rlimit_nofile 100000;
|
||||||
|
'';
|
||||||
|
eventsConfig = ''
|
||||||
|
worker_connections 2048;
|
||||||
|
use epoll;
|
||||||
|
multi_accept on;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.nginx.serviceConfig = lib.mkIf config.services.nginx.enable {
|
||||||
|
LimitNOFILE = 65536;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."_" = lib.mkIf config.services.nginx.enable {
|
||||||
|
sslCertificate = "/etc/certs/nginx.crt";
|
||||||
|
sslCertificateKey = "/etc/certs/nginx.key";
|
||||||
|
addSSL = true;
|
||||||
|
extraConfig = "return 444;";
|
||||||
|
};
|
||||||
|
|
||||||
|
# source: https://github.com/logrotate/logrotate/blob/main/examples/logrotate.service
|
||||||
|
systemd.services.logrotate = {
|
||||||
|
documentation = [ "man:logrotate(8)" "man:logrotate.conf(5)" ];
|
||||||
|
unitConfig.RequiresMountsFor = "/var/log";
|
||||||
|
serviceConfig = {
|
||||||
|
Nice = 19;
|
||||||
|
IOSchedulingClass = "best-effort";
|
||||||
|
IOSchedulingPriority = 7;
|
||||||
|
|
||||||
|
ReadWritePaths = [ "/var/log" ];
|
||||||
|
|
||||||
|
AmbientCapabilities = [ "" ];
|
||||||
|
CapabilityBoundingSet = [ "" ];
|
||||||
|
DeviceAllow = [ "" ];
|
||||||
|
LockPersonality = true;
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
NoNewPrivileges = true; # disable for third party rotate scripts
|
||||||
|
PrivateDevices = true;
|
||||||
|
PrivateNetwork = true; # disable for mail delivery
|
||||||
|
PrivateTmp = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
ProtectHome = true; # disable for userdir logs
|
||||||
|
ProtectHostname = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
ProtectProc = "invisible";
|
||||||
|
ProtectSystem = "full";
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
RestrictRealtime = true;
|
||||||
|
RestrictSUIDSGID = true; # disable for creating setgid directories
|
||||||
|
SocketBindDeny = [ "any" ];
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
SystemCallFilter = [
|
||||||
|
"@system-service"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.journald.upload = {
|
||||||
|
enable = values.services.logcollector.ipv4;
|
||||||
|
settings.Upload = {
|
||||||
|
URL = "https://logcollector.pvv.ntnu.no:19532";
|
||||||
|
ServerKeyFile = "-";
|
||||||
|
ServerCertificateFile = "-";
|
||||||
|
TrustedCertificateFile = "-";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = lib.mkIf config.services.nginx.enable [ 80 443 ];
|
||||||
|
|
||||||
|
security.acme = {
|
||||||
|
acceptTerms = true;
|
||||||
|
defaults.email = "drift@pvv.ntnu.no";
|
||||||
|
};
|
||||||
|
# Let's not spam LetsEncrypt in `nixos-rebuild build-vm` mode:
|
||||||
|
virtualisation.vmVariant = {
|
||||||
|
security.acme.defaults.server = "https://127.0.0.1";
|
||||||
|
security.acme.preliminarySelfsigned = true;
|
||||||
|
|
||||||
|
users.users.root.initialPassword = "root";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
{ pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../users
|
|
||||||
../modules/snakeoil-certs.nix
|
|
||||||
|
|
||||||
./networking.nix
|
|
||||||
./nix.nix
|
|
||||||
|
|
||||||
./services/acme.nix
|
|
||||||
./services/auto-upgrade.nix
|
|
||||||
./services/irqbalance.nix
|
|
||||||
./services/logrotate.nix
|
|
||||||
./services/nginx.nix
|
|
||||||
./services/openssh.nix
|
|
||||||
./services/postfix.nix
|
|
||||||
./services/smartd.nix
|
|
||||||
./services/thermald.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.tmp.cleanOnBoot = lib.mkDefault true;
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Oslo";
|
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
console = {
|
|
||||||
font = "Lat2-Terminus16";
|
|
||||||
keyMap = "no";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
file
|
|
||||||
git
|
|
||||||
gnupg
|
|
||||||
htop
|
|
||||||
nano
|
|
||||||
ripgrep
|
|
||||||
rsync
|
|
||||||
screen
|
|
||||||
tmux
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
|
|
||||||
kitty.terminfo
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
security.sudo.execWheelOnly = true;
|
|
||||||
security.sudo.extraConfig = ''
|
|
||||||
Defaults lecture = never
|
|
||||||
'';
|
|
||||||
|
|
||||||
users.groups."drift".name = "drift";
|
|
||||||
|
|
||||||
# Trusted users on the nix builder machines
|
|
||||||
users.groups."nix-builder-users".name = "nix-builder-users";
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{ lib, values, ... }:
|
|
||||||
{
|
|
||||||
networking.domain = "pvv.ntnu.no";
|
|
||||||
networking.useDHCP = false;
|
|
||||||
# networking.search = [ "pvv.ntnu.no" "pvv.org" ];
|
|
||||||
# networking.nameservers = lib.mkDefault [ "129.241.0.200" "129.241.0.201" ];
|
|
||||||
# networking.tempAddresses = lib.mkDefault "disabled";
|
|
||||||
# networking.defaultGateway = values.hosts.gateway;
|
|
||||||
|
|
||||||
systemd.network.enable = true;
|
|
||||||
|
|
||||||
services.resolved = {
|
|
||||||
enable = lib.mkDefault true;
|
|
||||||
dnssec = "false"; # Supposdly this keeps breaking and the default is to allow downgrades anyways...
|
|
||||||
};
|
|
||||||
}
|
|
||||||
34
base/nix.nix
34
base/nix.nix
@@ -1,34 +0,0 @@
|
|||||||
{ inputs, ... }:
|
|
||||||
{
|
|
||||||
nix = {
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
options = "--delete-older-than 2d";
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
allow-dirty = true;
|
|
||||||
auto-optimise-store = true;
|
|
||||||
builders-use-substitutes = true;
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
log-lines = 50;
|
|
||||||
use-xdg-base-directories = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* This makes commandline tools like
|
|
||||||
** nix run nixpkgs#hello
|
|
||||||
** and nix-shell -p hello
|
|
||||||
** use the same channel the system
|
|
||||||
** was built with
|
|
||||||
*/
|
|
||||||
registry = {
|
|
||||||
"nixpkgs".flake = inputs.nixpkgs;
|
|
||||||
"nixpkgs-unstable".flake = inputs.nixpkgs-unstable;
|
|
||||||
"pvv-nix".flake = inputs.self;
|
|
||||||
};
|
|
||||||
nixPath = [
|
|
||||||
"nixpkgs=${inputs.nixpkgs}"
|
|
||||||
"unstable=${inputs.nixpkgs-unstable}"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
defaults.email = "drift@pvv.ntnu.no";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let's not spam LetsEncrypt in `nixos-rebuild build-vm` mode:
|
|
||||||
virtualisation.vmVariant = {
|
|
||||||
security.acme.defaults.server = "https://127.0.0.1";
|
|
||||||
security.acme.preliminarySelfsigned = true;
|
|
||||||
|
|
||||||
users.users.root.initialPassword = "root";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
system.autoUpgrade = {
|
|
||||||
enable = true;
|
|
||||||
flake = "git+https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git";
|
|
||||||
flags = [
|
|
||||||
"--update-input" "nixpkgs"
|
|
||||||
"--update-input" "nixpkgs-unstable"
|
|
||||||
"--no-write-lock-file"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
services.irqbalance.enable = true;
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
# source: https://github.com/logrotate/logrotate/blob/main/examples/logrotate.service
|
|
||||||
systemd.services.logrotate = {
|
|
||||||
documentation = [ "man:logrotate(8)" "man:logrotate.conf(5)" ];
|
|
||||||
unitConfig.RequiresMountsFor = "/var/log";
|
|
||||||
serviceConfig = {
|
|
||||||
Nice = 19;
|
|
||||||
IOSchedulingClass = "best-effort";
|
|
||||||
IOSchedulingPriority = 7;
|
|
||||||
|
|
||||||
ReadWritePaths = [ "/var/log" ];
|
|
||||||
|
|
||||||
AmbientCapabilities = [ "" ];
|
|
||||||
CapabilityBoundingSet = [ "" ];
|
|
||||||
DeviceAllow = [ "" ];
|
|
||||||
LockPersonality = true;
|
|
||||||
MemoryDenyWriteExecute = true;
|
|
||||||
NoNewPrivileges = true; # disable for third party rotate scripts
|
|
||||||
PrivateDevices = true;
|
|
||||||
PrivateNetwork = true; # disable for mail delivery
|
|
||||||
PrivateTmp = true;
|
|
||||||
ProtectClock = true;
|
|
||||||
ProtectControlGroups = true;
|
|
||||||
ProtectHome = true; # disable for userdir logs
|
|
||||||
ProtectHostname = true;
|
|
||||||
ProtectKernelLogs = true;
|
|
||||||
ProtectKernelModules = true;
|
|
||||||
ProtectKernelTunables = true;
|
|
||||||
ProtectProc = "invisible";
|
|
||||||
ProtectSystem = "full";
|
|
||||||
RestrictNamespaces = true;
|
|
||||||
RestrictRealtime = true;
|
|
||||||
RestrictSUIDSGID = true; # disable for creating setgid directories
|
|
||||||
SocketBindDeny = [ "any" ];
|
|
||||||
SystemCallArchitectures = "native";
|
|
||||||
SystemCallFilter = [
|
|
||||||
"@system-service"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
{
|
|
||||||
# nginx return 444 for all nonexistent virtualhosts
|
|
||||||
|
|
||||||
systemd.services.nginx.after = [ "generate-snakeoil-certs.service" ];
|
|
||||||
|
|
||||||
environment.snakeoil-certs = lib.mkIf config.services.nginx.enable {
|
|
||||||
"/etc/certs/nginx" = {
|
|
||||||
owner = "nginx";
|
|
||||||
group = "nginx";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = lib.mkIf config.services.nginx.enable [ 80 443 ];
|
|
||||||
|
|
||||||
services.nginx = {
|
|
||||||
recommendedTlsSettings = true;
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
recommendedOptimisation = true;
|
|
||||||
recommendedGzipSettings = true;
|
|
||||||
|
|
||||||
appendConfig = ''
|
|
||||||
pcre_jit on;
|
|
||||||
worker_processes auto;
|
|
||||||
worker_rlimit_nofile 100000;
|
|
||||||
'';
|
|
||||||
eventsConfig = ''
|
|
||||||
worker_connections 2048;
|
|
||||||
use epoll;
|
|
||||||
multi_accept on;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.nginx.serviceConfig = lib.mkIf config.services.nginx.enable {
|
|
||||||
LimitNOFILE = 65536;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."_" = lib.mkIf config.services.nginx.enable {
|
|
||||||
sslCertificate = "/etc/certs/nginx.crt";
|
|
||||||
sslCertificateKey = "/etc/certs/nginx.key";
|
|
||||||
addSSL = true;
|
|
||||||
extraConfig = "return 444;";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
startWhenNeeded = true;
|
|
||||||
extraConfig = ''
|
|
||||||
PubkeyAcceptedAlgorithms=+ssh-rsa
|
|
||||||
Match Group wheel
|
|
||||||
PasswordAuthentication no
|
|
||||||
Match All
|
|
||||||
'';
|
|
||||||
settings.PermitRootLogin = "yes";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.services.postfix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.postfix = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
hostname = "${config.networking.hostName}.pvv.ntnu.no";
|
|
||||||
domain = "pvv.ntnu.no";
|
|
||||||
|
|
||||||
relayHost = "smtp.pvv.ntnu.no";
|
|
||||||
relayPort = 465;
|
|
||||||
|
|
||||||
config = {
|
|
||||||
smtp_tls_wrappermode = "yes";
|
|
||||||
smtp_tls_security_level = "encrypt";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Nothing should be delivered to this machine
|
|
||||||
destination = [ ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
services.smartd.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
environment.systemPackages = lib.optionals config.services.smartd.enable (with pkgs; [
|
|
||||||
smartmontools
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
{
|
|
||||||
# Let's not thermal throttle
|
|
||||||
services.thermald.enable = lib.mkIf (lib.all (x: x) [
|
|
||||||
(config.nixpkgs.system == "x86_64-linux")
|
|
||||||
(!config.boot.isContainer or false)
|
|
||||||
]) true;
|
|
||||||
}
|
|
||||||
8
flake.lock
generated
8
flake.lock
generated
@@ -214,11 +214,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725212759,
|
"lastModified": 1722722932,
|
||||||
"narHash": "sha256-yZBsefIarFUEhFRj+rCGMp9Zvag3MCafqV/JfGVRVwc=",
|
"narHash": "sha256-K81a2GQpY2kRX+C9ek9r91THlZB674CqRTSMMb5IO7E=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "e7b66b4bc6a89bab74bac45b87e9434f5165355f",
|
"rev": "6580cfe546c902cdf11e17b0b8aa30b3c412bb34",
|
||||||
"revCount": 473,
|
"revCount": 465,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/nettsiden.git"
|
"url": "https://git.pvv.ntnu.no/Projects/nettsiden.git"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -92,7 +92,6 @@
|
|||||||
heimdal = unstablePkgs.heimdal;
|
heimdal = unstablePkgs.heimdal;
|
||||||
mediawiki-extensions = final.callPackage ./packages/mediawiki-extensions { };
|
mediawiki-extensions = final.callPackage ./packages/mediawiki-extensions { };
|
||||||
simplesamlphp = final.callPackage ./packages/simplesamlphp { };
|
simplesamlphp = final.callPackage ./packages/simplesamlphp { };
|
||||||
bluemap = final.callPackage ./packages/bluemap.nix { };
|
|
||||||
})
|
})
|
||||||
inputs.nix-gitea-themes.overlays.default
|
inputs.nix-gitea-themes.overlays.default
|
||||||
inputs.pvv-nettsiden.overlays.default
|
inputs.pvv-nettsiden.overlays.default
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
../../base
|
../../base.nix
|
||||||
../../misc/metrics-exporters.nix
|
../../misc/metrics-exporters.nix
|
||||||
|
|
||||||
./services/bluemap/default.nix
|
|
||||||
./services/gitea/default.nix
|
./services/gitea/default.nix
|
||||||
./services/idp-simplesamlphp
|
./services/idp-simplesamlphp
|
||||||
./services/kerberos
|
./services/kerberos
|
||||||
@@ -33,8 +32,6 @@
|
|||||||
address = with values.hosts.bekkalokk; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
address = with values.hosts.bekkalokk; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.btrfs.autoScrub.enable = true;
|
|
||||||
|
|
||||||
# Do not change, even during upgrades.
|
# Do not change, even during upgrades.
|
||||||
# See https://search.nixos.org/options?show=system.stateVersion
|
# See https://search.nixos.org/options?show=system.stateVersion
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./module.nix # From danio, pending upstreaming
|
|
||||||
];
|
|
||||||
|
|
||||||
disabledModules = [ "services/web-servers/bluemap.nix" ];
|
|
||||||
|
|
||||||
sops.secrets."bluemap/ssh-key" = { };
|
|
||||||
sops.secrets."bluemap/ssh-known-hosts" = { };
|
|
||||||
|
|
||||||
services.bluemap = {
|
|
||||||
enable = true;
|
|
||||||
eula = true;
|
|
||||||
|
|
||||||
host = "minecraft.pvv.ntnu.no";
|
|
||||||
|
|
||||||
defaultWorld = "/var/lib/bluemap/world";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."minecraft.pvv.ntnu.no" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: render somewhere else lmao
|
|
||||||
systemd.services."render-bluemap-maps" = {
|
|
||||||
preStart = ''
|
|
||||||
mkdir -p /var/lib/bluemap/world
|
|
||||||
${pkgs.rsync}/bin/rsync \
|
|
||||||
-e "${pkgs.openssh}/bin/ssh -o UserKnownHostsFile=$CREDENTIALS_DIRECTORY/ssh-known-hosts -i $CREDENTIALS_DIRECTORY/sshkey" \
|
|
||||||
-avz --no-owner --no-group \
|
|
||||||
root@innovation.pvv.ntnu.no:/ \
|
|
||||||
/var/lib/bluemap/world
|
|
||||||
'';
|
|
||||||
serviceConfig = {
|
|
||||||
LoadCredential = [
|
|
||||||
"sshkey:${config.sops.secrets."bluemap/ssh-key".path}"
|
|
||||||
"ssh-known-hosts:${config.sops.secrets."bluemap/ssh-known-hosts".path}"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,343 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.services.bluemap;
|
|
||||||
format = pkgs.formats.hocon { };
|
|
||||||
|
|
||||||
coreConfig = format.generate "core.conf" cfg.coreSettings;
|
|
||||||
webappConfig = format.generate "webapp.conf" cfg.webappSettings;
|
|
||||||
webserverConfig = format.generate "webserver.conf" cfg.webserverSettings;
|
|
||||||
|
|
||||||
storageFolder = pkgs.linkFarm "storage"
|
|
||||||
(lib.attrsets.mapAttrs' (name: value:
|
|
||||||
lib.nameValuePair "${name}.conf"
|
|
||||||
(format.generate "${name}.conf" value))
|
|
||||||
cfg.storage);
|
|
||||||
|
|
||||||
mapsFolder = pkgs.linkFarm "maps"
|
|
||||||
(lib.attrsets.mapAttrs' (name: value:
|
|
||||||
lib.nameValuePair "${name}.conf"
|
|
||||||
(format.generate "${name}.conf" value.settings))
|
|
||||||
cfg.maps);
|
|
||||||
|
|
||||||
webappConfigFolder = pkgs.linkFarm "bluemap-config" {
|
|
||||||
"maps" = mapsFolder;
|
|
||||||
"storages" = storageFolder;
|
|
||||||
"core.conf" = coreConfig;
|
|
||||||
"webapp.conf" = webappConfig;
|
|
||||||
"webserver.conf" = webserverConfig;
|
|
||||||
"packs" = cfg.resourcepacks;
|
|
||||||
"addons" = cfg.resourcepacks; # TODO
|
|
||||||
};
|
|
||||||
|
|
||||||
renderConfigFolder = name: value: pkgs.linkFarm "bluemap-${name}-config" {
|
|
||||||
"maps" = pkgs.linkFarm "maps" {
|
|
||||||
"${name}.conf" = (format.generate "${name}.conf" value.settings);
|
|
||||||
};
|
|
||||||
"storages" = storageFolder;
|
|
||||||
"core.conf" = coreConfig;
|
|
||||||
"webapp.conf" = format.generate "webapp.conf" (cfg.webappSettings // { "update-settings-file" = false; });
|
|
||||||
"webserver.conf" = webserverConfig;
|
|
||||||
"packs" = value.resourcepacks;
|
|
||||||
"addons" = cfg.resourcepacks; # TODO
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit (lib) mkOption;
|
|
||||||
in {
|
|
||||||
options.services.bluemap = {
|
|
||||||
enable = lib.mkEnableOption "bluemap";
|
|
||||||
|
|
||||||
eula = mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
description = ''
|
|
||||||
By changing this option to true you confirm that you own a copy of minecraft Java Edition,
|
|
||||||
and that you agree to minecrafts EULA.
|
|
||||||
'';
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
defaultWorld = mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = ''
|
|
||||||
The world used by the default map ruleset.
|
|
||||||
If you configure your own maps you do not need to set this.
|
|
||||||
'';
|
|
||||||
example = lib.literalExpression "\${config.services.minecraft.dataDir}/world";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableRender = mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
description = "Enable rendering";
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
webRoot = mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = "/var/lib/bluemap/web";
|
|
||||||
description = "The directory for saving and serving the webapp and the maps";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableNginx = mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable configuring a virtualHost for serving the bluemap webapp";
|
|
||||||
};
|
|
||||||
|
|
||||||
host = mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "bluemap.${config.networking.domain}";
|
|
||||||
defaultText = lib.literalExpression "bluemap.\${config.networking.domain}";
|
|
||||||
description = "Domain to configure nginx for";
|
|
||||||
};
|
|
||||||
|
|
||||||
onCalendar = mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = ''
|
|
||||||
How often to trigger rendering the map,
|
|
||||||
in the format of a systemd timer onCalendar configuration.
|
|
||||||
See {manpage}`systemd.timer(5)`.
|
|
||||||
'';
|
|
||||||
default = "*-*-* 03:10:00";
|
|
||||||
};
|
|
||||||
|
|
||||||
coreSettings = mkOption {
|
|
||||||
type = lib.types.submodule {
|
|
||||||
freeformType = format.type;
|
|
||||||
options = {
|
|
||||||
data = mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = "Folder for where bluemap stores its data";
|
|
||||||
default = "/var/lib/bluemap";
|
|
||||||
};
|
|
||||||
metrics = lib.mkEnableOption "Sending usage metrics containing the version of bluemap in use";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
description = "Settings for the core.conf file, [see upstream docs](https://github.com/BlueMap-Minecraft/BlueMap/blob/master/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/core.conf).";
|
|
||||||
};
|
|
||||||
|
|
||||||
webappSettings = mkOption {
|
|
||||||
type = lib.types.submodule {
|
|
||||||
freeformType = format.type;
|
|
||||||
};
|
|
||||||
default = {
|
|
||||||
enabled = true;
|
|
||||||
webroot = cfg.webRoot;
|
|
||||||
};
|
|
||||||
defaultText = lib.literalExpression ''
|
|
||||||
{
|
|
||||||
enabled = true;
|
|
||||||
webroot = config.services.bluemap.webRoot;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
description = "Settings for the webapp.conf file, see [upstream docs](https://github.com/BlueMap-Minecraft/BlueMap/blob/master/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/webapp.conf).";
|
|
||||||
};
|
|
||||||
|
|
||||||
webserverSettings = mkOption {
|
|
||||||
type = lib.types.submodule {
|
|
||||||
freeformType = format.type;
|
|
||||||
options = {
|
|
||||||
enabled = mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
description = ''
|
|
||||||
Enable bluemap's built-in webserver.
|
|
||||||
Disabled by default in nixos for use of nginx directly.
|
|
||||||
'';
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
default = { };
|
|
||||||
description = ''
|
|
||||||
Settings for the webserver.conf file, usually not required.
|
|
||||||
[See upstream docs](https://github.com/BlueMap-Minecraft/BlueMap/blob/master/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/webserver.conf).
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
maps = mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
resourcepacks = mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = cfg.resourcepacks;
|
|
||||||
defaultText = lib.literalExpression "config.services.bluemap.resourcepacks";
|
|
||||||
description = "A set of resourcepacks/mods to extract models from loaded in alphabetical order";
|
|
||||||
};
|
|
||||||
settings = mkOption {
|
|
||||||
type = (lib.types.submodule {
|
|
||||||
freeformType = format.type;
|
|
||||||
options = {
|
|
||||||
world = mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = "Path to world folder containing the dimension to render";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
description = ''
|
|
||||||
Settings for files in `maps/`.
|
|
||||||
See the default for an example with good options for the different world types.
|
|
||||||
For valid values [consult upstream docs](https://github.com/BlueMap-Minecraft/BlueMap/blob/master/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/maps/map.conf).
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
default = {
|
|
||||||
"overworld".settings = {
|
|
||||||
world = "${cfg.defaultWorld}";
|
|
||||||
ambient-light = 0.1;
|
|
||||||
cave-detection-ocean-floor = -5;
|
|
||||||
};
|
|
||||||
|
|
||||||
"nether".settings = {
|
|
||||||
world = "${cfg.defaultWorld}/DIM-1";
|
|
||||||
sorting = 100;
|
|
||||||
sky-color = "#290000";
|
|
||||||
void-color = "#150000";
|
|
||||||
ambient-light = 0.6;
|
|
||||||
world-sky-light = 0;
|
|
||||||
remove-caves-below-y = -10000;
|
|
||||||
cave-detection-ocean-floor = -5;
|
|
||||||
cave-detection-uses-block-light = true;
|
|
||||||
max-y = 90;
|
|
||||||
};
|
|
||||||
|
|
||||||
"end".settings = {
|
|
||||||
world = "${cfg.defaultWorld}/DIM1";
|
|
||||||
sorting = 200;
|
|
||||||
sky-color = "#080010";
|
|
||||||
void-color = "#080010";
|
|
||||||
ambient-light = 0.6;
|
|
||||||
world-sky-light = 0;
|
|
||||||
remove-caves-below-y = -10000;
|
|
||||||
cave-detection-ocean-floor = -5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
defaultText = lib.literalExpression ''
|
|
||||||
{
|
|
||||||
"overworld".settings = {
|
|
||||||
world = "''${cfg.defaultWorld}";
|
|
||||||
ambient-light = 0.1;
|
|
||||||
cave-detection-ocean-floor = -5;
|
|
||||||
};
|
|
||||||
|
|
||||||
"nether".settings = {
|
|
||||||
world = "''${cfg.defaultWorld}/DIM-1";
|
|
||||||
sorting = 100;
|
|
||||||
sky-color = "#290000";
|
|
||||||
void-color = "#150000";
|
|
||||||
ambient-light = 0.6;
|
|
||||||
world-sky-light = 0;
|
|
||||||
remove-caves-below-y = -10000;
|
|
||||||
cave-detection-ocean-floor = -5;
|
|
||||||
cave-detection-uses-block-light = true;
|
|
||||||
max-y = 90;
|
|
||||||
};
|
|
||||||
|
|
||||||
"end".settings = {
|
|
||||||
world = "''${cfg.defaultWorld}/DIM1";
|
|
||||||
sorting = 200;
|
|
||||||
sky-color = "#080010";
|
|
||||||
void-color = "#080010";
|
|
||||||
ambient-light = 0.6;
|
|
||||||
world-sky-light = 0;
|
|
||||||
remove-caves-below-y = -10000;
|
|
||||||
cave-detection-ocean-floor = -5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
map-specific configuration.
|
|
||||||
These correspond to views in the webapp and are usually
|
|
||||||
different dimension of a world or different render settings of the same dimension.
|
|
||||||
If you set anything in this option you must configure all dimensions yourself!
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
storage = mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule {
|
|
||||||
freeformType = format.type;
|
|
||||||
options = {
|
|
||||||
storage-type = mkOption {
|
|
||||||
type = lib.types.enum [ "FILE" "SQL" ];
|
|
||||||
description = "Type of storage config";
|
|
||||||
default = "FILE";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
description = ''
|
|
||||||
Where the rendered map will be stored.
|
|
||||||
Unless you are doing something advanced you should probably leave this alone and configure webRoot instead.
|
|
||||||
[See upstream docs](https://github.com/BlueMap-Minecraft/BlueMap/tree/master/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/storages)
|
|
||||||
'';
|
|
||||||
default = {
|
|
||||||
"file" = {
|
|
||||||
root = "${cfg.webRoot}/maps";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
defaultText = lib.literalExpression ''
|
|
||||||
{
|
|
||||||
"file" = {
|
|
||||||
root = "''${config.services.bluemap.webRoot}/maps";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
resourcepacks = mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = pkgs.linkFarm "resourcepacks" { };
|
|
||||||
description = ''
|
|
||||||
A set of resourcepacks/mods to extract models from loaded in alphabetical order.
|
|
||||||
Can be overriden on a per-map basis with `services.bluemap.maps.<name>.resourcepacks`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
assertions =
|
|
||||||
[ { assertion = config.services.bluemap.eula;
|
|
||||||
message = ''
|
|
||||||
You have enabled bluemap but have not accepted minecraft's EULA.
|
|
||||||
You can achieve this through setting `services.bluemap.eula = true`
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.bluemap.coreSettings.accept-download = cfg.eula;
|
|
||||||
|
|
||||||
systemd.services."render-bluemap-maps" = lib.mkIf cfg.enableRender {
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
Group = "nginx";
|
|
||||||
UMask = "026";
|
|
||||||
};
|
|
||||||
script = lib.strings.concatStringsSep "\n" ((lib.attrsets.mapAttrsToList
|
|
||||||
(name: value: "${lib.getExe pkgs.bluemap} -c ${renderConfigFolder name value} -r")
|
|
||||||
cfg.maps) ++ [ "${lib.getExe pkgs.bluemap} -c ${webappConfigFolder} -gs" ]);
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.timers."render-bluemap-maps" = lib.mkIf cfg.enableRender {
|
|
||||||
wantedBy = [ "timers.target" ];
|
|
||||||
timerConfig = {
|
|
||||||
OnCalendar = cfg.onCalendar;
|
|
||||||
Persistent = true;
|
|
||||||
Unit = "render-bluemap-maps.service";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts = lib.mkIf cfg.enableNginx {
|
|
||||||
"${cfg.host}" = {
|
|
||||||
root = config.services.bluemap.webRoot;
|
|
||||||
locations = {
|
|
||||||
"~* ^/maps/[^/]*/tiles/".extraConfig = ''
|
|
||||||
error_page 404 = @empty;
|
|
||||||
'';
|
|
||||||
"@empty".return = "204";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
maintainers = with lib.maintainers; [ dandellion h7x4 ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
../../base
|
../../base.nix
|
||||||
../../misc/metrics-exporters.nix
|
../../misc/metrics-exporters.nix
|
||||||
./services/nginx
|
./services/nginx
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
services.mjolnir = {
|
services.mjolnir = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pantalaimon.enable = false;
|
pantalaimon.enable = false;
|
||||||
homeserverUrl = "https://matrix.pvv.ntnu.no";
|
homeserverUrl = "http://127.0.0.1:8008";
|
||||||
accessTokenFile = config.sops.secrets."matrix/mjolnir/access_token".path;
|
accessTokenFile = config.sops.secrets."matrix/mjolnir/access_token".path;
|
||||||
managementRoom = "!gsdeCoWjvYRBrzuiRq:pvv.ntnu.no";
|
managementRoom = "!gsdeCoWjvYRBrzuiRq:pvv.ntnu.no";
|
||||||
protectedRooms = map (a: "https://matrix.to/#/${a}") [
|
protectedRooms = map (a: "https://matrix.to/#/${a}") [
|
||||||
|
|||||||
@@ -157,18 +157,6 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
|
||||||
locations."/_synapse/admin" = {
|
|
||||||
proxyPass = "http://$synapse_backend";
|
|
||||||
extraConfig = ''
|
|
||||||
allow 127.0.0.1;
|
|
||||||
allow ::1;
|
|
||||||
allow ${values.hosts.bicep.ipv4};
|
|
||||||
allow ${values.hosts.bicep.ipv6};
|
|
||||||
deny all;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
locations = let
|
locations = let
|
||||||
connectionInfo = w: matrix-lib.workerConnectionResource "metrics" w;
|
connectionInfo = w: matrix-lib.workerConnectionResource "metrics" w;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../base
|
../../base.nix
|
||||||
../../misc/metrics-exporters.nix
|
../../misc/metrics-exporters.nix
|
||||||
./disks.nix
|
./disks.nix
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../base
|
../../base.nix
|
||||||
../../misc/metrics-exporters.nix
|
../../misc/metrics-exporters.nix
|
||||||
|
|
||||||
./services/grzegorz.nix
|
./services/grzegorz.nix
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../base
|
../../base.nix
|
||||||
../../misc/metrics-exporters.nix
|
../../misc/metrics-exporters.nix
|
||||||
|
|
||||||
./services/libvirt.nix
|
./services/libvirt.nix
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../base
|
../../base.nix
|
||||||
../../misc/metrics-exporters.nix
|
../../misc/metrics-exporters.nix
|
||||||
|
|
||||||
../../modules/grzegorz.nix
|
../../modules/grzegorz.nix
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../base
|
../../base.nix
|
||||||
../../misc/metrics-exporters.nix
|
../../misc/metrics-exporters.nix
|
||||||
|
|
||||||
./services/monitoring
|
./services/monitoring
|
||||||
|
|||||||
18
hosts/ildkule/services/journald-remote.nix
Normal file
18
hosts/ildkule/services/journald-remote.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services.journald.remote = {
|
||||||
|
enable = true;
|
||||||
|
settings.Remote = {
|
||||||
|
# ServerKeyFile = "/run/credentials/systemd-journald-remote.service/key.pem";
|
||||||
|
# ServerCertificateFile = "/run/credentials/systemd-journald-remote.service/.pem";
|
||||||
|
ServerKeyFile = "/etc/journald-remote-certs/key.pem";
|
||||||
|
ServerCertificateFile = "/etc/journald-remote-certs/cert.pem";
|
||||||
|
TrustedCertificateFile = "-";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# systemd.services.systemd-journal-remote.serviceConfig.LoadCredential = [
|
||||||
|
# "key.pem:/etc/journald-remote-certs/key.pem"
|
||||||
|
# "cert.pem:/etc/journald-remote-certs/cert.pem"
|
||||||
|
# ];
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../base
|
../../base.nix
|
||||||
../../misc/metrics-exporters.nix
|
../../misc/metrics-exporters.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
{ lib, stdenvNoCC, fetchurl, makeWrapper, jre }:
|
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation rec {
|
|
||||||
pname = "bluemap";
|
|
||||||
version = "5.2";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/BlueMap-Minecraft/BlueMap/releases/download/v${version}/BlueMap-${version}-cli.jar";
|
|
||||||
hash = "sha256-4vld+NBwzBxdwbMtsKuqvO6immkbh4HB//6wdjXaxoU=";
|
|
||||||
};
|
|
||||||
|
|
||||||
dontUnpack = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
makeWrapper ${jre}/bin/java $out/bin/bluemap --add-flags "-jar $src"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "3D minecraft map renderer";
|
|
||||||
homepage = "https://bluemap.bluecolored.de/";
|
|
||||||
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
maintainers = with lib.maintainers; [ dandellion ];
|
|
||||||
mainProgram = "bluemap";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -32,9 +32,6 @@ nettsiden:
|
|||||||
admin_password: ENC[AES256_GCM,data:SADr/zN3F0tW339kSK1nD9Pb38rw7hz8,iv:s5jgl1djXd5JKwx1WG/w2Q4STMMpjJP91qxOwAoNcL0=,tag:N8bKnO9N0ei06HDkSGt6XQ==,type:str]
|
admin_password: ENC[AES256_GCM,data:SADr/zN3F0tW339kSK1nD9Pb38rw7hz8,iv:s5jgl1djXd5JKwx1WG/w2Q4STMMpjJP91qxOwAoNcL0=,tag:N8bKnO9N0ei06HDkSGt6XQ==,type:str]
|
||||||
vaultwarden:
|
vaultwarden:
|
||||||
environ: ENC[AES256_GCM,data:CST5I8x8qAkrTy/wbMLL6aFSPDPIU7aWsD1L1MnIATRmk7fcUhfTSFds7quJmIpb2znsIT/WxNI/V/7UW+9ZdPKI64hfPR8MtvrJcbOhU5Fe2IiytFymFbhcOgWAXjbGzs7knQmpfMxSl98sU71oLkRuFdkousdnh4VQFZhUCYM=,iv:Is6xQ7DGdcAQgrrXCS9NbJk67O2uR82rbKOXBTzZHWw=,tag:XVEjCEM5t8qJl6jL89zrkw==,type:str]
|
environ: ENC[AES256_GCM,data:CST5I8x8qAkrTy/wbMLL6aFSPDPIU7aWsD1L1MnIATRmk7fcUhfTSFds7quJmIpb2znsIT/WxNI/V/7UW+9ZdPKI64hfPR8MtvrJcbOhU5Fe2IiytFymFbhcOgWAXjbGzs7knQmpfMxSl98sU71oLkRuFdkousdnh4VQFZhUCYM=,iv:Is6xQ7DGdcAQgrrXCS9NbJk67O2uR82rbKOXBTzZHWw=,tag:XVEjCEM5t8qJl6jL89zrkw==,type:str]
|
||||||
bluemap:
|
|
||||||
ssh-key: ENC[AES256_GCM,data:nPwsT4RYbMbGp2MChLUh6NXW4ckYr7SQcd6Gy2G8CEU+ugew5pt4d6GOK1fyekspDtet3EkPL2F1AsoPFBB2Rv0boARMslAhBqwWSsbBJTXeTEgAABSMxTPJRBtfJucvv426nyIj3uApoknz6mDCQh1OI6mER0fis7MPaM1506HlDlnIT0FV9EairEsaAmbd0yddByGJSccKIza2vW0qWqrz83P+xrakEONxFz0fJlkO5PRXCcQJVBCqWQfnaHNrWeBWv0QA7vAHlT0yjqJCpDRxN2KYrPWsz7sUbB4UZOtykCRM5kKFq73GUaOKqVECJQhcJi6tERhpJELwjjS8MSqvBD90UTKTshGugfuygTaOyUx4wou3atxMR2Rah9+uZ6mBrLAOLX3JKiAtyhFewPMWjd/UhbMPuzNageVBNz2EMpa4POSVwz5MyViKNSgr9cPcNGqmrnjvr/W/lnj6Ec+W80RiXQlADSE4Q6diLLwB9nlHvKs8NTDgv6sUafcPHpJ2+N4Jkb96dE14bMffQ385SI4vLDcQ8xCQ,iv:WdJIHRzjlm8bEldolCx1Q7pZJvjxGkNZALSOy3IjizU=,tag:5ZAikiqttq/76+thG+4LMw==,type:str]
|
|
||||||
ssh-known-hosts: ENC[AES256_GCM,data:J6V+NJ9TvYUL2gmcqWWYt8X+n0M7i0RpDpBelWAbFMH64+e9ztHNnC491sm+RogDxqKk0kwQyX2Mz00iq3Gc3wDYyozGOdv3tBKrp7/LcfjUQ9T9hi0yTD3eNV0LAjlAWMTdlW65VGHqGst8ncKbUuVxbBASVlh3A321toZgD+xxUAtNz7qKFa6fDbOS0xLD1+CmTwVp+aPos//QIKzjuk1HqxfBNK82maKtD4JHPS+Y3be2wIEjGWq3H6JYN/RDojD88D/jzo9RwvEjpqLXoOVfy8uX/fbEsgkgfAmPiaG+ePCnchSExEe3a6Y0E+I6YIzvP+tGThJpu4HaT/yW2Rww/jvsxKrXSUhtBZI/SIX5ZAIFB3sFjJXQefJjfNpQTQWhbspLfdemafGaRiDnzVgKDhNL1HNMNsXKDfWa0SLs4//dqerom/QCCNsaqV+4HVzv5x44srChGERadQI/Wh4UG2R19xxbdyIsKPHzv7BhEKufJkjc5upBjWygQrGAkTRHugFpw2Tdkz9yUQSujMkaeRKhVkA+ZUAjwnY5TwqNZBj7U3K2JXoNVHAq194XmrA2dNghh0OmRrvKGwM3HKexX22SXT0bPlpdWRQpMbUgV+uHLMerlDpNMFTIueEBkaF/FWeSW2N5WUrUb1uJ91QcJ8JBgN1riuD1Oxv9RRPrY9VVNJMrYjpAAREN8i8brMTOCJ35s7jnqIei0dNmnNXOoQZPs9kUMeEtUc/Df1E8/aO2Y4yU9gHUuevXnAJWFAiu2IxssgPk6CcNxvapJEmlwkLK/JyuDsWwFxVOHfw5QIEsoDVWXt6eMhquqUgzJI1q7QrTWUQsBb5A5sQKYWQHempOaXuQn1bzA7mU3Gzsr8bNNc6tpy+6j3zTXYR067EX00yqPG+kqRn4QVIuhByxXP3cwXLUG9uD1lsqWrGzs6WCnHr7txhRBXf4WbBVmXModO3uf36cDYEwrUa6yBsARtSl8PJ0UadfY/xULcT5PFvu9+Hi2qj3vp4IU3JCJa9AvXB+11pbSdawprjuDhwQtPwkJ4CQyvZsom3/BOrmwYM5+EyMDIluEQ0z6eDE5buiIVbX6IvXnDCKbrnqVwavX2wqyiDduFLjRfWL/3U2O1yRim78smrDMJABJZvtW+a+GfmlnTd/gnFvS70Fmm/lgtY051ISL/iFx6toJRoBMMiI/Zvy13uQry+w/HbyFl42DIank8tf7kuN3E9M7ADGMubRJJ0AZOcQddrFnR4Gl2nU2+3RS5fLHaBf9QHK6W92/n//xmPkYqrkPacew4eBjUqM32jVGuBpDc964fK9kdtIdw8q5P1s/ph3I79Y24kGeuO1AVJuZvkaTv1Z7GgI9+K9TstKJ9XpRCidLpLSP+uHOWkqcNsQlt6ilTlfHj+MKoD85dKZ315QMmpiuYEvzCSP1aYTb9dpd61Su/IVuM3r2NuINNEZ166YlHQVsLNpDn8E5ahk3ZInOAg6/kaKTmjUI8KEvX4BR3PbbViAlJJb3suJ0oZBGPUlrW5uLRmADvf2mMDVO5zY7/m9DQwxjt4Miu0l8ZaUc0YJQ850lBKucQ==,iv:GI8w7h7xX8gMHuAoWUyrW+BQb85LNlASoYvGBPlCZaI=,tag:WnHNMevfFSMc0ikBZwWn/g==,type:str]
|
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
@@ -95,8 +92,8 @@ sops:
|
|||||||
UHpLRkdQTnhkeGlWVG9VS1hkWktyckEKAdwnA9URLYZ50lMtXrU9Q09d0L3Zfsyr
|
UHpLRkdQTnhkeGlWVG9VS1hkWktyckEKAdwnA9URLYZ50lMtXrU9Q09d0L3Zfsyr
|
||||||
4UsvjjdnFtsXwEZ9ZzOQrpiN0Oz24s3csw5KckDni6kslaloJZsLGg==
|
4UsvjjdnFtsXwEZ9ZzOQrpiN0Oz24s3csw5KckDni6kslaloJZsLGg==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-09-01T01:33:50Z"
|
lastmodified: "2024-08-26T19:38:58Z"
|
||||||
mac: ENC[AES256_GCM,data:PkcOD9hJWD5tILO9PuZkOgIoujt4q2qtHBB9KF8ikrNKo0yw24Jf1ceI5/+BHCxhdi8sF4qQM/zty61zqwNaBsvrsLUkdWDwUDsuJQa1KKZiCEZPqYBc+qGIQ5wNPsU2zJ0c8+wU8H0LtGqKOH9GmaQtTdm0Rt2IcexV823uTjQ=,iv:GYTI85OgqnN8iUc6OOXO7Sz2XIthWJtz8zwMuWutEYs=,tag:2rhfhjXXzZLzoVlkINo0ZQ==,type:str]
|
mac: ENC[AES256_GCM,data:3FyfZPmJ7znQEul+IwqN1ZaM53n6os3grquJwJ9vfyDSc2h8UZBhqYG+2uW9Znp9DSIjuhCUI8iqGKRJE0M/6IDICeXms/5+ynVFOS9bA2cdzPvWaj0FFAd2x3g4Vhs47+vRlsnIe/tMiKU3IOvzOfI6KAUHc9L2ySrzH7z2+fo=,iv:1iZSR9qOIEtf+fNbtWSwJBIUEQGKadfHSVOnkFzOwq8=,tag:Sk6JEU1B6Rd1GXLYC6rQtQ==,type:str]
|
||||||
pgp:
|
pgp:
|
||||||
- created_at: "2024-08-04T00:03:28Z"
|
- created_at: "2024-08-04T00:03:28Z"
|
||||||
enc: |-
|
enc: |-
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ in rec {
|
|||||||
ipv4 = pvv-ipv4 213;
|
ipv4 = pvv-ipv4 213;
|
||||||
ipv6 = pvv-ipv6 213;
|
ipv6 = pvv-ipv6 213;
|
||||||
};
|
};
|
||||||
|
log-collector = {
|
||||||
|
inherit (hosts.ildkule) ipv4 ipv6;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hosts = {
|
hosts = {
|
||||||
|
|||||||
Reference in New Issue
Block a user