Compare commits

..

59 Commits

Author SHA1 Message Date
h7x4
20f9a8a582 WIP: cross compile skrott 2026-01-26 02:41:36 +09:00
h7x4
15004829a8 flake.lock: bump dibbler 2026-01-26 02:30:53 +09:00
h7x4
48ffb3cda1 skrott/dibbler: fix postgres url 2026-01-26 02:27:21 +09:00
h7x4
9bbc64afc8 skrott: disable promtail, documentation 2026-01-26 02:25:12 +09:00
h7x4
1cf956f37b skrott: disable thermald 2026-01-26 02:04:03 +09:00
h7x4
38a1d38c7f skrott: disable zfs, udisks2 2026-01-26 01:31:46 +09:00
h7x4
f1a6e47e67 skrott: disable smartd 2026-01-26 00:48:36 +09:00
h7x4
c061c5be0c base: re-enable mutableUsers (absolute state) 2026-01-26 00:25:20 +09:00
h7x4
08e3e1a287 README: add skrott to machine overview 2026-01-25 23:30:41 +09:00
h7x4
034f6540d9 secrets/skrott: add database password 2026-01-25 23:30:41 +09:00
h7x4
695fe48ba8 skrott: set gateway 2026-01-25 23:30:41 +09:00
h7x4
b37551209a flake.nix: bump dibbler 2026-01-25 22:54:52 +09:00
19059b742e users/felixalb: update SSH keys 2026-01-25 13:17:39 +01:00
h7x4
e336c119a5 skrott: bump stateVersion 2026-01-25 21:08:28 +09:00
h7x4
52ac4ca775 skrott: update dibbler + config 2026-01-25 20:56:33 +09:00
Vegard Bieker Matthey
6b352507a3 Merge pull request 'gluttony: use grub as bootloader because of no uefi support' (!121) from gluttony-boot into main
Reviewed-on: https://git.pvv.ntnu.no/Drift/pvv-nixos-config/pulls/121
2026-01-24 22:25:28 +01:00
Vegard Bieker Matthey
604b528dd3 use grub as bootloader because of no uefi support 2026-01-24 22:04:54 +01:00
h7x4
689d6582ae topology: fix ntnu gateway <-> knutsen connection network 2026-01-23 00:56:32 +09:00
h7x4
ccdaeaf4a3 topology: fix gluttony network interface 2026-01-23 00:51:30 +09:00
h7x4
72fdca4998 topology: more connections to powerpuff cluster 2026-01-23 00:50:16 +09:00
h7x4
9ccdeb6ac9 topology: fix new machines 2026-01-23 00:43:20 +09:00
h7x4
8072121b3c skrott: fix sops file location 2026-01-22 19:44:05 +09:00
h7x4
95f6463171 temmie: set up httpd 2026-01-22 19:41:52 +09:00
h7x4
39d3773a10 skrott: move networking config to values, add ipv6 address 2026-01-22 19:30:04 +09:00
h7x4
0e963f8cf0 gluttony: fix eval 2026-01-22 19:17:28 +09:00
h7x4
ba6c1c8205 temmie/nfs-mounts: generate systemd units ourselves 2026-01-22 19:10:30 +09:00
h7x4
1d47409d96 base: configure sops 2026-01-22 16:48:59 +09:00
h7x4
f7757d697d base: don't install dynamic loader stub 2026-01-22 16:13:36 +09:00
h7x4
9f43ea887e base: OOM early on nixos rebuilds 2026-01-22 16:13:20 +09:00
h7x4
5f94345a91 hosts/various: enable qemu guest agent, disable smartd for vms by default 2026-01-22 16:05:36 +09:00
h7x4
28baf322ce hosts/various: formatting, add consistent warnings to stateVersion 2026-01-22 15:57:12 +09:00
h7x4
12477aeb34 flake.nix: set default hostname for most nixos hosts 2026-01-22 15:49:50 +09:00
h7x4
e2d553af19 bikkje: set hostName 2026-01-22 15:49:50 +09:00
h7x4
89ea5b321a hosts/various: use systemd-boot as default bootloader 2026-01-22 15:49:50 +09:00
h7x4
3940f52760 hosts/various: remove empty environment.systemPackages lists 2026-01-22 15:45:43 +09:00
h7x4
e2f3c81ecd base: move package list to separate file 2026-01-22 15:35:18 +09:00
h7x4
a4c3aaa402 base: provide reasoning for packages, add a few new ones 2026-01-22 15:31:48 +09:00
h7x4
5714efc668 modules/grzegorz: override base certificate config 2026-01-22 15:10:50 +09:00
h7x4
d5199779a6 base: disable fontconfig by default 2026-01-22 14:57:00 +09:00
h7x4
ae3c7019ef base: disable hibernation and sleep 2026-01-22 14:54:35 +09:00
h7x4
73dc9306f1 base: no mutable users by default 2026-01-22 14:51:24 +09:00
h7x4
09d72305e2 base/nginx: return 444 on fqdn virtualHost by default 2026-01-21 23:17:47 +09:00
h7x4
2ace7b649f nix-topology: remove postgresql icon override 2026-01-21 14:56:41 +09:00
h7x4
7703a94b19 flake.lock: bump 2026-01-21 14:49:00 +09:00
h7x4
ebd40fc2d7 bekkalokk/well-known: reply to well-known for all domains 2026-01-21 14:47:31 +09:00
h7x4
9eb5cd869a bicep/element: fetch correct well-known file 2026-01-21 14:34:35 +09:00
h7x4
fa37f34028 packages/ooye: bump 2026-01-21 13:46:06 +09:00
h7x4
7111d00df8 modules/ooye: calm yo ass (set restart timer + counter) 2026-01-21 13:17:28 +09:00
h7x4
833a74a6fb bicep/matrix: remove some whitespace lol 2026-01-21 13:14:41 +09:00
h7x4
d82cc2e605 update and fix `packages.out-of-your-element 2026-01-21 12:49:13 +09:00
h7x4
93cf6f4a63 bicep/sshguard: disable
sshguard doesn't actually work as it currently stands, also the builtin
PerSourcePenalty functionality in SSH is more aggressive than sshguard
is able to catch anyway. It might've been reasonable if we were using it
for anything other than SSH, but it doesn't seem like we are.
2026-01-21 11:13:27 +09:00
h7x4
0f11cca8ec bicep/matrix: use sops templates to render structured files 2026-01-21 11:08:26 +09:00
h7x4
d892acb331 bicep/matrix: have element-web source well-known from config 2026-01-21 10:49:09 +09:00
h7x4
aa07687a94 bicep/matrix: add synapse config to help with livekit 2026-01-21 10:48:37 +09:00
h7x4
e5dd5b6325 bicep/matrix: attempt to set up livekit 2026-01-21 10:14:08 +09:00
h7x4
75c52f63cc bicep/matrix: add module for adding stuff to well-known 2026-01-21 10:14:07 +09:00
Felix Albrigtsen
6b5c12a4b8 Merge pull request 'Fix the heccin quotes - mikrobel 2026' (!120) from fix-quotes into main
Reviewed-on: https://git.pvv.ntnu.no/Drift/pvv-nixos-config/pulls/120
Reviewed-by: Oystein Kristoffer Tveit <oysteikt@pvv.ntnu.no>
2026-01-20 09:43:33 +01:00
h7x4
633efc1a7d ildkule: unbreak eval 2026-01-20 17:12:25 +09:00
14e2ed7e32 Fix the heccin quotes 2026-01-19 21:09:41 +01:00
61 changed files with 2896 additions and 413 deletions

View File

@@ -43,6 +43,7 @@ revert the changes on the next nightly rebuild (tends to happen when everybody i
| [kommode][kom] | Virtual | Gitea + Gitea pages |
| [lupine][lup] | Physical | Gitea CI/CD runners |
| shark | Virtual | Test host for authentication, absolutely horrendous |
| [skrott][skr] | Physical | Kiosk, snacks and soda |
| [wenche][wen] | Virtual | Nix-builders, general purpose compute |
## Documentation
@@ -59,4 +60,5 @@ revert the changes on the next nightly rebuild (tends to happen when everybody i
[ild]: https://wiki.pvv.ntnu.no/wiki/Maskiner/ildkule
[kom]: https://wiki.pvv.ntnu.no/wiki/Maskiner/kommode
[lup]: https://wiki.pvv.ntnu.no/wiki/Maskiner/lupine
[skr]: https://wiki.pvv.ntnu.no/wiki/Maskiner/Skrott
[wen]: https://wiki.pvv.ntnu.no/wiki/Maskiner/wenche

View File

@@ -10,10 +10,12 @@
(fp /users)
(fp /modules/snakeoil-certs.nix)
./flake-input-exporter.nix
./networking.nix
./nix.nix
./programs.nix
./sops.nix
./vm.nix
./flake-input-exporter.nix
./services/acme.nix
./services/auto-upgrade.nix
@@ -40,6 +42,9 @@
boot.tmp.cleanOnBoot = lib.mkDefault true;
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = lib.mkDefault true;
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
time.timeZone = "Europe/Oslo";
i18n.defaultLocale = "en_US.UTF-8";
@@ -48,22 +53,8 @@
keyMap = "no";
};
environment.systemPackages = with pkgs; [
file
git
gnupg
htop
nano
net-tools
ripgrep
rsync
screen
tmux
vim
wget
kitty.terminfo
];
# Don't install the /lib/ld-linux.so.2 stub
environment.ldso32 = null;
# .bash_profile already works, but lets also use .bashrc like literally every other distro
# https://man.archlinux.org/man/core/bash/bash.1.en#INVOCATION
@@ -77,8 +68,6 @@
fi
'';
programs.zsh.enable = true;
# security.lockKernelModules = true;
security.protectKernelImage = true;
security.sudo.execWheelOnly = true;
@@ -86,6 +75,14 @@
Defaults lecture = never
'';
# These are servers, sleep is for the weak
systemd.sleep.extraConfig = lib.mkDefault ''
AllowSuspend=no
AllowHibernation=no
'';
# users.mutableUsers = lib.mkDefault false;
users.groups."drift".name = "drift";
# Trusted users on the nix builder machines

View File

@@ -37,4 +37,9 @@
"unstable=${inputs.nixpkgs-unstable}"
];
};
# Make builds to be more likely killed than important services.
# 100 is the default for user slices and 500 is systemd-coredumpd@
# We rather want a build to be killed than our precious user sessions as builds can be easily restarted.
systemd.services.nix-daemon.serviceConfig.OOMScoreAdjust = lib.mkDefault 250;
}

60
base/programs.nix Normal file
View File

@@ -0,0 +1,60 @@
{ pkgs, lib, ... }:
{
# We don't need fonts on headless machines
fonts.fontconfig.enable = lib.mkDefault false;
# Extra packags for better terminal emulator compatibility in SSH sessions
environment.enableAllTerminfo = true;
environment.systemPackages = with pkgs; [
# Debug dns outside resolvectl
dig
# Debug and find files
file
# Check computer specs
lshw
# Scan for open ports with netstat
net-tools
# Grep for files quickly
ripgrep
# Copy files over the network
rsync
# Access various state, often in /var/lib
sqlite-interactive
# Debug software which won't debug itself
strace
# Download files from the internet
wget
];
# Clone/push nix config and friends
programs.git.enable = true;
# Gitea gpg, oysteikt sops, etc.
programs.gnupg.agent.enable = true;
# Monitor the wellbeing of the machines
programs.htop.enable = true;
# Keep sessions running during work over SSH
programs.tmux.enable = true;
# Same reasoning as tmux
programs.screen.enable = true;
# Edit files on the system without resorting to joe(1)
programs.nano.enable = true;
# Same reasoning as nano
programs.vim.enable = true;
# Some people like this shell for some reason
programs.zsh.enable = true;
}

View File

@@ -39,7 +39,8 @@
SystemCallFilter = lib.mkForce null;
};
services.nginx.virtualHosts."_" = lib.mkIf config.services.nginx.enable {
services.nginx.virtualHosts = lib.mkIf config.services.nginx.enable {
"_" = {
listen = [
{
addr = "0.0.0.0";
@@ -64,4 +65,12 @@
addSSL = true;
extraConfig = "return 444;";
};
${config.networking.fqdn} = {
sslCertificate = lib.mkDefault "/etc/certs/nginx.crt";
sslCertificateKey = lib.mkDefault "/etc/certs/nginx.key";
addSSL = lib.mkDefault true;
extraConfig = lib.mkDefault "return 444;";
};
};
}

View File

@@ -1,7 +1,9 @@
{ config, pkgs, lib, ... }:
{
services.smartd = {
enable = lib.mkDefault true;
# NOTE: qemu guests tend not to have SMART-reporting disks. Please override for the
# hosts with disk passthrough.
enable = lib.mkDefault (!config.services.qemuGuest.enable);
notifications = {
mail = {
enable = true;

12
base/sops.nix Normal file
View File

@@ -0,0 +1,12 @@
{ config, fp, lib, ... }:
{
sops.defaultSopsFile = let
secretsFilePath = fp /secrets/${config.networking.hostName}/${config.networking.hostName}.yaml;
in lib.mkIf (builtins.pathExists secretsFilePath) secretsFilePath;
sops.age = lib.mkIf (config.sops.defaultSopsFile != null) {
sshKeyPaths = lib.mkDefault [ "/etc/ssh/ssh_host_ed25519_key" ];
keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true;
};
}

36
flake.lock generated
View File

@@ -8,11 +8,11 @@
]
},
"locked": {
"lastModified": 1768138611,
"narHash": "sha256-KfZX6wpuwE2IRKLjh0DrEviE4f6kqLJWwKIE5QJSqa4=",
"lastModified": 1769362210,
"narHash": "sha256-QCQD7Ofin5UYL0i5Sv34gfJ0p5pv1hwZspE/Ufe84L8=",
"ref": "main",
"rev": "cb385097dcda5fb9772f903688d078b30a66ccd4",
"revCount": 221,
"rev": "1d01e1b2cb8fb2adee96c0b4f065c43c45eae290",
"revCount": 229,
"type": "git",
"url": "https://git.pvv.ntnu.no/Projects/dibbler.git"
},
@@ -235,11 +235,11 @@
]
},
"locked": {
"lastModified": 1768068512,
"narHash": "sha256-pH5wkcNOiXy4MBjDTe6A1gml+7m+ULC3lYMBPMqdS1w=",
"lastModified": 1768955766,
"narHash": "sha256-V9ns1OII7sWSbIDwPkiqmJ3Xu/bHgQzj+asgH9cTpOo=",
"owner": "oddlama",
"repo": "nix-topology",
"rev": "4367a2093c5ff74fc478466aebf41d47ce0cacb4",
"rev": "71f27de56a03f6d8a1a72cf4d0dfd780bcc075bc",
"type": "github"
},
"original": {
@@ -251,11 +251,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1768555036,
"narHash": "sha256-qJTh3xrFsqrXDzUmjPGV0VC70vpsq/YP25Jo6Fh7PTs=",
"rev": "1d2851ebcd64734ef057e8c80e05dd5600323792",
"lastModified": 1768877948,
"narHash": "sha256-Bq9Hd6DWCBaZ2GkwvJCWGnpGOchaD6RWPSCFxmSmupw=",
"rev": "43b2e61c9d09cf6c1c9c192fe6da08accc9bfb1d",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/25.11-small/nixos-25.11.4104.1d2851ebcd64/nixexprs.tar.xz"
"url": "https://releases.nixos.org/nixos/25.11-small/nixos-25.11.4368.43b2e61c9d09/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
@@ -279,11 +279,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1768553552,
"narHash": "sha256-YeNMZDAxdQUMLcqZmoc+/WzYrJxTEg6Y7uNALUcF1dE=",
"rev": "a6b8b0f0ceb6d4f5da70808e26c68044099460fd",
"lastModified": 1768886240,
"narHash": "sha256-HUAAI7AF+/Ov1u3Vvjs4DL91zTxMkWLC4xJgQ9QxOUQ=",
"rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable-small/nixos-26.05pre928681.a6b8b0f0ceb6/nixexprs.tar.xz"
"url": "https://releases.nixos.org/nixos/unstable-small/nixos-26.05pre930839.80e4adbcf899/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
@@ -466,11 +466,11 @@
]
},
"locked": {
"lastModified": 1768481291,
"narHash": "sha256-NjKtkJraCZEnLHAJxLTI+BfdU//9coAz9p5TqveZwPU=",
"lastModified": 1768863606,
"narHash": "sha256-1IHAeS8WtBiEo5XiyJBHOXMzECD6aaIOJmpQKzRRl64=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "e085e303dfcce21adcb5fec535d65aacb066f101",
"rev": "c7067be8db2c09ab1884de67ef6c4f693973f4a2",
"type": "github"
},
"original": {

View File

@@ -69,8 +69,7 @@
in {
inputs = lib.mapAttrs (_: src: src.outPath) inputs;
pkgs = forAllSystems (system:
import nixpkgs {
pkgs = forAllSystems (system: import nixpkgs {
inherit system;
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg)
[
@@ -80,39 +79,22 @@
});
nixosConfigurations = let
unstablePkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
nixosConfig =
nixpkgs:
name:
configurationPath:
extraArgs@{
system ? "x86_64-linux",
localSystem ? "x86_64-linux", # buildPlatform
crossSystem ? "x86_64-linux", # hostPlatform
specialArgs ? { },
modules ? [ ],
overlays ? [ ],
enableDefaults ? true,
...
}:
lib.nixosSystem (lib.recursiveUpdate
{
inherit system;
specialArgs = {
inherit unstablePkgs inputs;
values = import ./values.nix;
fp = path: ./${path};
} // specialArgs;
modules = [
configurationPath
] ++ (lib.optionals enableDefaults [
sops-nix.nixosModules.sops
inputs.roowho2.nixosModules.default
]) ++ modules;
pkgs = import nixpkgs {
inherit system;
let
commonPkgsConfig = {
inherit localSystem crossSystem;
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg)
[
"nvidia-x11"
@@ -123,9 +105,35 @@
inputs.roowho2.overlays.default
]) ++ overlays;
};
pkgs = import nixpkgs commonPkgsConfig;
unstablePkgs = import nixpkgs-unstable commonPkgsConfig;
in
lib.nixosSystem (lib.recursiveUpdate
{
system = crossSystem;
inherit pkgs;
specialArgs = {
inherit inputs unstablePkgs;
values = import ./values.nix;
fp = path: ./${path};
} // specialArgs;
modules = [
{
networking.hostName = lib.mkDefault name;
}
configurationPath
] ++ (lib.optionals enableDefaults [
sops-nix.nixosModules.sops
inputs.roowho2.nixosModules.default
]) ++ modules;
}
(builtins.removeAttrs extraArgs [
"system"
"localSystem"
"crossSystem"
"modules"
"overlays"
"specialArgs"
@@ -160,7 +168,6 @@
bekkalokk = stableNixosConfig "bekkalokk" {
overlays = [
(final: prev: {
heimdal = unstablePkgs.heimdal;
mediawiki-extensions = final.callPackage ./packages/mediawiki-extensions { };
simplesamlphp = final.callPackage ./packages/simplesamlphp { };
bluemap = final.callPackage ./packages/bluemap.nix { };
@@ -219,7 +226,7 @@
];
};
skrott = stableNixosConfig "skrott" {
system = "aarch64-linux";
crossSystem = "aarch64-linux";
modules = [
(nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix")
inputs.dibbler.nixosModules.default
@@ -275,7 +282,7 @@
bluemap = pkgs.callPackage ./packages/bluemap.nix { };
out-of-your-element = pkgs.callPackage ./packages/out-of-your-element.nix { };
out-of-your-element = pkgs.callPackage ./packages/ooye/package.nix { };
}
//
# Mediawiki extensions

View File

@@ -6,20 +6,13 @@
./filesystems.nix
];
sops.defaultSopsFile = ../../secrets/bakke/bakke.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "bakke";
networking.hostId = "99609ffc";
systemd.network.networks."30-enp2s0" = values.defaultNetworkConfig // {
matchConfig.Name = "enp2s0";
address = with values.hosts.bakke; [ (ipv4 + "/25") (ipv6 + "/64") ];
};
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "24.05";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -19,16 +19,6 @@
./services/qotd
];
sops.defaultSopsFile = fp /secrets/bekkalokk/bekkalokk.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "bekkalokk";
systemd.network.networks."30-enp2s0" = values.defaultNetworkConfig // {
matchConfig.Name = "enp2s0";
address = with values.hosts.bekkalokk; [ (ipv4 + "/25") (ipv6 + "/64") ];
@@ -36,7 +26,7 @@
services.btrfs.autoScrub.enable = true;
# Do not change, even during upgrades.
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "22.11";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -1,6 +1,12 @@
{ ... }:
{ lib, ... }:
{
services.nginx.virtualHosts."www.pvv.ntnu.no".locations = {
services.nginx.virtualHosts = lib.genAttrs [
"pvv.ntnu.no"
"www.pvv.ntnu.no"
"pvv.org"
"www.pvv.org"
] (_: {
locations = {
"^~ /.well-known/" = {
alias = (toString ./root) + "/";
};
@@ -15,4 +21,5 @@
'';
};
};
});
}

View File

@@ -15,16 +15,6 @@
./services/matrix
];
sops.defaultSopsFile = fp /secrets/bicep/bicep.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "bicep";
#systemd.network.networks."30-enp6s0f0" = values.defaultNetworkConfig // {
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
#matchConfig.Name = "enp6s0f0";
@@ -36,17 +26,9 @@
anyInterface = true;
};
# There are no smart devices
services.smartd.enable = false;
# we are a vm now
services.qemuGuest.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.sshguard.enable = true;
# Do not change, even during upgrades.
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "22.11";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -1,13 +1,6 @@
{ config, lib, fp, pkgs, secrets, values, ... }:
{
sops.secrets."matrix/synapse/turnconfig" = {
sopsFile = fp /secrets/bicep/matrix.yaml;
key = "synapse/turnconfig";
owner = config.users.users.matrix-synapse.name;
group = config.users.users.matrix-synapse.group;
restartUnits = [ "coturn.service" ];
};
sops.secrets."matrix/coturn/static-auth-secret" = {
sopsFile = fp /secrets/bicep/matrix.yaml;
key = "coturn/static-auth-secret";
@@ -16,9 +9,18 @@
restartUnits = [ "coturn.service" ];
};
sops.templates."matrix-synapse-turnconfig" = {
owner = config.users.users.matrix-synapse.name;
group = config.users.users.matrix-synapse.group;
content = ''
turn_shared_secret: ${config.sops.placeholder."matrix/coturn/static-auth-secret"}
'';
restartUnits = [ "matrix-synapse.target" ];
};
services.matrix-synapse-next = {
extraConfigFiles = [
config.sops.secrets."matrix/synapse/turnconfig".path
config.sops.templates."matrix-synapse-turnconfig".path
];
settings = {

View File

@@ -1,19 +1,16 @@
{ config, ... }:
{
imports = [
./synapse.nix
./synapse-admin.nix
./element.nix
./coturn.nix
./livekit.nix
./mjolnir.nix
./well-known.nix
# ./discord.nix
./out-of-your-element.nix
./hookshot
];
}

View File

@@ -2,6 +2,13 @@
let
synapse-cfg = config.services.matrix-synapse-next;
in {
services.pvv-matrix-well-known.client = {
"m.homeserver" = {
base_url = "https://matrix.pvv.ntnu.no";
server_name = "pvv.ntnu.no";
};
};
services.nginx.virtualHosts."chat.pvv.ntnu.no" = {
enableACME = true;
forceSSL = true;
@@ -9,10 +16,10 @@ in {
root = pkgs.element-web.override {
conf = {
default_server_config."m.homeserver" = {
base_url = "https://matrix.pvv.ntnu.no";
server_name = "pvv.ntnu.no";
};
# Tries to look up well-known first, else uses bundled config.
default_server_name = "matrix.pvv.ntnu.no";
default_server_config = config.services.pvv-matrix-well-known.client;
disable_3pid_login = true;
# integrations_ui_url = "https://dimension.dodsorf.as/riot";
# integrations_rest_url = "https://dimension.dodsorf.as/api/v1/scalar";

View File

@@ -0,0 +1,67 @@
{ config, lib, fp, ... }:
let
synapseConfig = config.services.matrix-synapse-next;
matrixDomain = "matrix.pvv.ntnu.no";
cfg = config.services.livekit;
in
{
sops.secrets."matrix/livekit/keyfile/lk-jwt-service" = {
sopsFile = fp /secrets/bicep/matrix.yaml;
key = "livekit/keyfile/lk-jwt-service";
};
sops.templates."matrix-livekit-keyfile" = {
restartUnits = [
"livekit.service"
"lk-jwt-service.service"
];
content = ''
lk-jwt-service: ${config.sops.placeholder."matrix/livekit/keyfile/lk-jwt-service"}
'';
};
services.pvv-matrix-well-known.client = lib.mkIf cfg.enable {
"org.matrix.msc4143.rtc_foci" = [{
type = "livekit";
livekit_service_url = "https://${matrixDomain}/livekit/jwt";
}];
};
services.livekit = {
enable = true;
openFirewall = true;
keyFile = config.sops.templates."matrix-livekit-keyfile".path;
# NOTE: needed for ingress/egress workers
# redis.createLocally = true;
# settings.room.auto_create = false;
};
services.lk-jwt-service = lib.mkIf cfg.enable {
enable = true;
livekitUrl = "wss://${matrixDomain}/livekit/sfu";
keyFile = config.sops.templates."matrix-livekit-keyfile".path;
};
systemd.services.lk-jwt-service.environment.LIVEKIT_FULL_ACCESS_HOMESERVERS = lib.mkIf cfg.enable matrixDomain;
services.nginx.virtualHosts.${matrixDomain} = lib.mkIf cfg.enable {
locations."^~ /livekit/jwt/" = {
proxyPass = "http://localhost:${toString config.services.lk-jwt-service.port}/";
};
# TODO: load balance to multiple livekit ingress/egress workers
locations."^~ /livekit/sfu/" = {
proxyPass = "http://localhost:${toString config.services.livekit.settings.port}/";
proxyWebsockets = true;
extraConfig = ''
proxy_send_timeout 120;
proxy_read_timeout 120;
proxy_buffering off;
proxy_set_header Accept-Encoding gzip;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
}

View File

@@ -15,11 +15,16 @@ in {
group = config.users.users.matrix-synapse.group;
};
sops.secrets."matrix/synapse/user_registration" = {
sops.secrets."matrix/synapse/user_registration/registration_shared_secret" = {
sopsFile = fp /secrets/bicep/matrix.yaml;
key = "synapse/signing_key";
key = "synapse/user_registration/registration_shared_secret";
};
sops.templates."matrix-synapse-user-registration" = {
owner = config.users.users.matrix-synapse.name;
group = config.users.users.matrix-synapse.group;
content = ''
registration_shared_secret: ${config.sops.placeholder."matrix/synapse/user_registration/registration_shared_secret"}
'';
};
services.matrix-synapse-next = {
@@ -83,7 +88,7 @@ in {
mau_stats_only = true;
enable_registration = false;
registration_shared_secret_path = config.sops.secrets."matrix/synapse/user_registration".path;
registration_shared_secret_path = config.sops.templates."matrix-synapse-user-registration".path;
password_config.enabled = true;
@@ -95,6 +100,32 @@ in {
}
];
experimental_features = {
# MSC3266: Room summary API. Used for knocking over federation
msc3266_enabled = true;
# MSC4222 needed for syncv2 state_after. This allow clients to
# correctly track the state of the room.
msc4222_enabled = true;
};
# The maximum allowed duration by which sent events can be delayed, as
# per MSC4140.
max_event_delay_duration = "24h";
rc_message = {
# This needs to match at least e2ee key sharing frequency plus a bit of headroom
# Note key sharing events are bursty
per_second = 0.5;
burst_count = 30;
};
rc_delayed_event_mgmt = {
# This needs to match at least the heart-beat frequency plus a bit of headroom
# Currently the heart-beat is every 5 seconds which translates into a rate of 0.2s
per_second = 1;
burst_count = 20;
};
trusted_key_servers = [
{ server_name = "matrix.org"; }
{ server_name = "dodsorf.as"; }
@@ -132,21 +163,12 @@ in {
services.redis.servers."".enable = true;
services.pvv-matrix-well-known.server."m.server" = "matrix.pvv.ntnu.no:443";
services.nginx.virtualHosts."matrix.pvv.ntnu.no" = lib.mkMerge [
{
kTLS = true;
}
{
locations."/.well-known/matrix/server" = {
return = ''
200 '{"m.server": "matrix.pvv.ntnu.no:443"}'
'';
extraConfig = ''
default_type application/json;
add_header Access-Control-Allow-Origin *;
'';
};
}
{
locations."/_synapse/admin" = {
proxyPass = "http://$synapse_backend";

View File

@@ -0,0 +1,44 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.pvv-matrix-well-known;
format = pkgs.formats.json { };
matrixDomain = "matrix.pvv.ntnu.no";
in
{
options.services.pvv-matrix-well-known = {
client = lib.mkOption {
type = lib.types.submodule { freeformType = format.type; };
default = { };
example = {
"m.homeserver".base_url = "https://${matrixDomain}/";
};
};
server = lib.mkOption {
type = lib.types.submodule { freeformType = format.type; };
default = { };
example = {
"m.server" = "https://${matrixDomain}/";
};
};
};
config = {
services.nginx.virtualHosts.${matrixDomain} = {
locations."= /.well-known/matrix/client" = lib.mkIf (cfg.client != { }) {
alias = format.generate "nginx-well-known-matrix-server.json" cfg.client;
extraConfig = ''
default_type application/json;
add_header Access-Control-Allow-Origin *;
'';
};
locations."= /.well-known/matrix/server" = lib.mkIf (cfg.server != { }) {
alias = format.generate "nginx-well-known-matrix-server.json" cfg.server;
extraConfig = ''
default_type application/json;
add_header Access-Control-Allow-Origin *;
'';
};
};
};
}

View File

@@ -25,6 +25,7 @@
];
networking = {
hostName = "bikkje";
firewall = {
enable = true;
# Allow SSH and HTTP and ports for email and irc
@@ -36,9 +37,11 @@
useHostResolvConf = mkForce false;
};
system.stateVersion = "23.11";
services.resolved.enable = true;
};
};
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "23.11";
};
};
};

View File

@@ -8,28 +8,14 @@
./services/grzegorz.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "brzeczyszczykiewicz";
systemd.network.networks."30-eno1" = values.defaultNetworkConfig // {
matchConfig.Name = "eno1";
address = with values.hosts.brzeczyszczykiewicz; [ (ipv4 + "/25") (ipv6 + "/64") ];
};
# List packages installed in system profile
environment.systemPackages = with pkgs; [
];
# List services that you want to enable:
# 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. Its 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?
fonts.fontconfig.enable = true;
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "23.05";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -8,24 +8,11 @@
(fp /modules/grzegorz.nix)
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "georg";
systemd.network.networks."30-eno1" = values.defaultNetworkConfig // {
matchConfig.Name = "eno1";
address = with values.hosts.georg; [ (ipv4 + "/25") (ipv6 + "/64") ];
};
# List packages installed in system profile
environment.systemPackages = with pkgs; [
];
# List services that you want to enable:
services.spotifyd = {
enable = true;
settings.global = {
@@ -41,15 +28,9 @@
5353 # spotifyd is its own mDNS service wtf
];
fonts.fontconfig.enable = true;
# 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. Its 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?
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "23.05";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -10,16 +10,21 @@
(fp /base)
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
systemd.network.enable = lib.mkForce false;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.loader = {
systemd-boot.enable = false; # no uefi support on this device
grub.device = "/dev/sda";
grub.enable = true;
};
boot.tmp.cleanOnBoot = true;
networking =
let
hostConf = values.hosts.gluttony;
in
{
hostName = "gluttony";
tempAddresses = "disabled";
useDHCP = false;
@@ -47,5 +52,9 @@
};
};
system.stateVersion = "25.11"; # Don't change unless you know what you are doing.
services.qemuGuest.enable = true;
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "25.11";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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.
{

View File

@@ -10,11 +10,7 @@
./services/journald-remote.nix
];
sops.defaultSopsFile = fp /secrets/ildkule/ildkule.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
boot.loader.systemd-boot.enable = false;
boot.loader.grub.device = "/dev/vda";
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
@@ -24,7 +20,6 @@
networking = let
hostConf = values.hosts.ildkule;
in {
hostName = "ildkule";
tempAddresses = "disabled";
useDHCP = lib.mkForce true;
@@ -43,13 +38,9 @@
};
};
# List packages installed in system profile
environment.systemPackages = with pkgs; [
];
# No devices with SMART
services.smartd.enable = false;
system.stateVersion = "23.11"; # Did you read the comment?
services.qemuGuest.enable = true;
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "23.11";
}

View File

@@ -46,7 +46,7 @@ in
networking.firewall.allowedTCPPorts = [ cfg.port ];
systemd.services."systemd-journal-remote" = {
socketConfig = {
serviceConfig = {
LoadCredential = let
inherit (config.security.acme.certs.${domainName}) directory;
in [

View File

@@ -1899,7 +1899,7 @@
"dashes": false,
"datasource": "$datasource",
"decimals": 0,
"description": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB s internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit.",
"description": "***System Memory***: Total Memory for the system.\\\n***InnoDB Buffer Pool Data***: InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.\\\n***TokuDB Cache Size***: Similar in function to the InnoDB Buffer Pool, TokuDB will allocate 50% of the installed RAM for its own cache.\\\n***Key Buffer Size***: Index blocks for MYISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks.\\\n***Adaptive Hash Index Size***: When InnoDB notices that some index values are being accessed very frequently, it builds a hash index for them in memory on top of B-Tree indexes.\\\n ***Query Cache Size***: The query cache stores the text of a SELECT statement together with the corresponding result that was sent to the client. The query cache has huge scalability problems in that only one thread can do an operation in the query cache at the same time.\\\n***InnoDB Dictionary Size***: The data dictionary is InnoDB 's internal catalog of tables. InnoDB stores the data dictionary on disk, and loads entries into memory while the server is running.\\\n***InnoDB Log Buffer Size***: The MySQL InnoDB log buffer allows transactions to run without having to write the log to disk before the transactions commit.",
"editable": true,
"error": false,
"fieldConfig": {

View File

@@ -9,16 +9,6 @@
./services/nginx.nix
];
sops.defaultSopsFile = fp /secrets/kommode/kommode.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "kommode"; # Define your hostname.
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
matchConfig.Name = "ens18";
address = with values.hosts.kommode; [ (ipv4 + "/25") (ipv6 + "/64") ];
@@ -26,7 +16,9 @@
services.btrfs.autoScrub.enable = true;
environment.systemPackages = with pkgs; [];
services.qemuGuest.enable = true;
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "24.11";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -9,12 +9,6 @@
];
sops.defaultSopsFile = fp /secrets/lupine/lupine.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
systemd.network.networks."30-enp0s31f6" = values.defaultNetworkConfig // {
matchConfig.Name = "enp0s31f6";
@@ -28,7 +22,7 @@
# There are no smart devices
services.smartd.enable = false;
# Do not change, even during upgrades.
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "25.05";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -6,33 +6,14 @@
(fp /base)
];
sops.defaultSopsFile = fp /secrets/shark/shark.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "shark"; # Define your hostname.
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
matchConfig.Name = "ens18";
address = with values.hosts.shark; [ (ipv4 + "/25") (ipv6 + "/64") ];
};
# List packages installed in system profile
environment.systemPackages = with pkgs; [
];
# List services that you want to enable:
# 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. Its 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?
services.qemuGuest.enable = true;
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "23.05";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -1,14 +1,17 @@
{ config, pkgs, lib, fp, ... }: {
{ config, pkgs, lib, fp, values, ... }: {
imports = [
# ./hardware-configuration.nix
(fp /base)
];
sops.defaultSopsFile = fp /secrets/skrott/skrott.yaml;
boot = {
consoleLogLevel = 0;
enableContainers = false;
loader.grub.enable = false;
loader.systemd-boot.enable = false;
kernelPackages = pkgs.linuxPackages;
};
@@ -18,18 +21,17 @@
services.logrotate.enable = lib.mkForce false;
services.nginx.enable = lib.mkForce false;
services.postfix.enable = lib.mkForce false;
services.smartd.enable = lib.mkForce false;
services.udisks2.enable = lib.mkForce false;
services.thermald.enable = lib.mkForce false;
services.promtail.enable = lib.mkForce false;
boot.supportedFilesystems.zfs = lib.mkForce false;
documentation.enable = lib.mkForce false;
# TODO: can we reduce further?
system.stateVersion = "25.05";
sops.defaultSopsFile = fp /secrets/skrott/skrott.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
sops.secrets = {
"dibbler/postgresql/url" = {
"dibbler/postgresql/password" = {
owner = "dibbler";
group = "dibbler";
};
@@ -39,10 +41,16 @@
networking = {
hostName = "skrot";
defaultGateway = values.hosts.gateway;
defaultGateway6 = values.hosts.gateway6;
interfaces.eth0 = {
useDHCP = false;
ipv4.addresses = [{
address = "129.241.210.235";
address = values.hosts.skrott.ipv4;
prefixLength = 25;
}];
ipv6.addresses = [{
address = values.hosts.skrott.ipv6;
prefixLength = 25;
}];
};
@@ -56,7 +64,15 @@
settings = {
general.quit_allowed = false;
database.url = config.sops.secrets."dibbler/postgresql/url".path;
database = {
type = "postgresql";
postgresql = {
username = "pvv_vv";
dbname = "pvv_vv";
host = "postgres.pvv.ntnu.no";
password_file = config.sops.secrets."dibbler/postgresql/password".path;
};
};
};
};
@@ -70,4 +86,8 @@
wantedBy = [ "getty.target" ]; # to start at boot
serviceConfig.Restart = "always"; # restart when session is closed
};
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "25.11";
}

View File

@@ -6,34 +6,19 @@
(fp /base)
./services/nfs-mounts.nix
./services/userweb.nix
];
# sops.defaultSopsFile = fp /secrets/shark/shark.yaml;
# sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
# sops.age.keyFile = "/var/lib/sops-nix/key.txt";
# sops.age.generateKey = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "temmie"; # Define your hostname.
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
matchConfig.Name = "ens18";
address = with values.hosts.temmie; [ (ipv4 + "/25") (ipv6 + "/64") ];
};
# List packages installed in system profile
environment.systemPackages = with pkgs; [
];
services.nginx.enable = false;
# List services that you want to enable:
services.qemuGuest.enable = true;
# 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. Its 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 = "25.11"; # Did you read the comment?
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "25.11";
}

View File

@@ -1,4 +1,4 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:

View File

@@ -1,21 +1,60 @@
{ pkgs, lib, ... }:
{
fileSystems = let
{ lib, values, ... }:
let
# See microbel:/etc/exports
shorthandAreas = lib.listToAttrs (map
(l: lib.nameValuePair "/run/pvv-home-mounts/${l}" "homepvv${l}.pvv.ntnu.no:/export/home/pvv/${l}")
[ "a" "b" "c" "d" "h" "i" "j" "k" "l" "m" "z" ]);
in { }
//
(lib.mapAttrs (_: device: {
inherit device;
fsType = "nfs";
options = [
letters = [ "a" "b" "c" "d" "h" "i" "j" "k" "l" "m" "z" ];
in
{
systemd.targets."pvv-homedirs" = {
description = "PVV Homedir Partitions";
};
systemd.mounts = map (l: {
description = "PVV Homedir Partition ${l}";
before = [ "remote-fs.target" ];
wantedBy = [ "multi-user.target" ];
requiredBy = [ "pvv-homedirs.target" ];
type = "nfs";
what = "homepvv${l}.pvv.ntnu.no:/export/home/pvv/${l}";
where = "/run/pvv-home-mounts/${l}";
options = lib.concatStringsSep "," [
"nfsvers=3"
"noauto"
# NOTE: this is a bit unfortunate. The address above seems to resolve to IPv6 sometimes,
# and it doesn't seem possible to specify proto=tcp,tcp6, meaning we have to tell
# NFS which exact address to use here, despite it being specified in the `what` attr :\
"proto=tcp"
"x-systemd.automount"
"x-systemd.idle-timeout=300"
"addr=${values.hosts.microbel.ipv4}"
"mountproto=tcp"
"mounthost=${values.hosts.microbel.ipv4}"
"port=2049"
# NOTE: this is yet more unfortunate. When enabling locking, it will sometimes complain about connection failed.
# dmesg(1) reveals that it has something to do with registering the lockdv1 RPC service (errno: 111), not
# quite sure how to fix it. Living life on dangerous mode for now.
"nolock"
# Don't wait on every read/write
"async"
# Always keep mounted
"noauto"
# We don't want to update access time constantly
"noatime"
# No SUID/SGID, no special devices
"nosuid"
"nodev"
# TODO: are there cgi scripts that modify stuff in peoples homedirs?
# "ro"
"rw"
# TODO: can we enable this and still run cgi stuff?
# "noexec"
];
}) shorthandAreas);
}) letters;
}

View File

@@ -0,0 +1,29 @@
{ ... }:
{
services.httpd = {
enable = true;
# extraModules = [];
# virtualHosts."userweb.pvv.ntnu.no" = {
virtualHosts."temmie.pvv.ntnu.no" = {
forceSSL = true;
enableACME = true;
};
};
systemd.services.httpd = {
after = [ "pvv-homedirs.target" ];
requires = [ "pvv-homedirs.target" ];
serviceConfig = {
ProtectHome = "tmpfs";
BindPaths = let
letters = [ "a" "b" "c" "d" "h" "i" "j" "k" "l" "m" "z" ];
in map (l: "/run/pvv-home-mounts/${l}:/home/pvv/${l}") letters;
};
};
# TODO: create phpfpm pools with php environments that contain packages similar to those present on tom
}

View File

@@ -7,12 +7,7 @@
./services/gitea-runners.nix
];
sops.defaultSopsFile = fp /secrets/ustetind/ustetind.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
networking.hostName = "ustetind";
boot.loader.systemd-boot.enable = false;
networking.useHostResolvConf = lib.mkForce false;
@@ -39,5 +34,7 @@
};
};
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "24.11";
}

View File

@@ -14,15 +14,9 @@
"armv7l-linux"
];
sops.defaultSopsFile = fp /secrets/wenche/wenche.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
sops.age.generateKey = true;
boot.loader.systemd-boot.enable = false;
boot.loader.grub.device = "/dev/sda";
networking.hostName = "wenche"; # Define your hostname.
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
matchConfig.Name = "ens18";
address = with values.hosts.wenche; [ (ipv4 + "/25") (ipv6 + "/64") ];
@@ -36,9 +30,9 @@
package = config.boot.kernelPackages.nvidiaPackages.production;
};
# List packages installed in system profile
environment.systemPackages = with pkgs; [
];
services.qemuGuest.enable = true;
system.stateVersion = "24.11"; # Did you read the comment?
# Don't change (even during upgrades) unless you know what you are doing.
# See https://search.nixos.org/options?show=system.stateVersion
system.stateVersion = "24.11";
}

View File

@@ -37,9 +37,13 @@ in {
services.nginx.enable = true;
services.nginx.virtualHosts = {
${config.networking.fqdn} = {
# NOTE: this overrides the default config in base/services/nginx.nix
addSSL = false;
forceSSL = true;
enableACME = true;
kTLS = true;
serverAliases = [
"${machine}.pvv.org"
];

View File

@@ -181,6 +181,9 @@ in
#NoNewPrivileges = true;
#PrivateDevices = true;
Restart = "on-failure";
RestartSec = "5s";
StartLimitIntervalSec = "5s";
StartLimitBurst = "5";
DynamicUser = true;
};
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p bash git gnugrep gnused nodejs_24
GIT_TOPLEVEL=$(git rev-parse --show-toplevel)
PACKAGE_NIX="$GIT_TOPLEVEL/packages/ooye/package.nix"
REV="$(grep -oP '(?<=rev = ")[a-z0-9]+(?=")' "$PACKAGE_NIX")"
TMPDIR="$(mktemp -d)"
cleaning() {
rm -rf "$TMPDIR"
}
trap 'cleaning' SIGINT
git clone --depth 1 --revision="$REV" https://git.pvv.ntnu.no/Drift/delete-your-element.git "$TMPDIR/ooye"
pushd "$TMPDIR/ooye" || exit
sed -i 's/\s*"glob@<11.1": "^12"//' package.json
git diff --quiet --exit-code package.json && {
echo "Sed did't do it's job, please fix" >&2
cleaning
exit 1
}
rm -rf package-lock.json
npm install --package-lock-only
export GIT_AUTHOR_NAME='Lockinator 9000'
export GIT_AUTHOR_EMAIL='locksmith@lockal.local'
export GIT_AUTHOR_DATE='Sun, 01 Jan 1984 00:00:00 +0000'
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
git commit -am "package-lock.json: bomp" --no-gpg-sign
git format-patch HEAD~
mv 0001-package-lock.json-bomp.patch "$GIT_TOPLEVEL/packages/ooye/fix-lockfile.patch"
git reset --hard HEAD~
popd || exit
cleaning

View File

@@ -2,31 +2,28 @@
lib,
fetchFromGitea,
makeWrapper,
nodejs,
nodejs_24,
buildNpmPackage,
fetchpatch,
}:
let
nodejs = nodejs_24;
in
buildNpmPackage {
pname = "delete-your-element";
version = "3.3-unstable-2025-12-09";
version = "3.3-unstable-2026-01-21";
src = fetchFromGitea {
domain = "git.pvv.ntnu.no";
owner = "Drift";
repo = "delete-your-element";
rev = "1c0c545a024ef7215a1a3483c10acce853f79765";
hash = "sha256-ow/PdlHfU7PCwsjJUEzoETzONs1KoKTRMRQ9ADN0tGk=";
rev = "04d7872acb933254c0a4703064b2e08de31cfeb4";
hash = "sha256-CkKt+8VYjIhNM76c3mTf7X6d4ob8tB2w8T6xYS7+LuY=";
};
patches = [
(fetchpatch {
name = "ooye-fix-package-lock-0001.patch";
url = "https://cgit.rory.gay/nix/OOYE-module.git/plain/pl.patch?h=ee126389d997ba14be3fe3ef360ba37b3617a9b2";
hash = "sha256-dP6WEHb0KksDraYML+jcR5DftH9BiXvwevUg38ALOrc=";
})
];
inherit nodejs;
npmDepsHash = "sha256-OXOyO6LxK/WYYVysSxkol0ilMUZB+osLYUE5DpJlbps=";
# npmDepsHash = "sha256-Y+vgp7+7pIDm64AYSs8ltoAiON0EPpJInbmgn3/LkVA=";
patches = [ ./fix-lockfile.patch ];
npmDepsHash = "sha256-tiGXr86x9QNAwhZcxSOox6sP9allyz9QSH3XOZOb3z8=";
dontNpmBuild = true;
makeCacheWritable = true;

View File

@@ -1,6 +1,6 @@
synapse:
turnconfig: ENC[AES256_GCM,data:mASRjYa4C9WRow4x0XYRrlCE5LMJUYaId+o62r1qhsyJPa2LzrI=,iv:5vYdubvMDjLS6soiWx2DzkEAATb9NFbSS/Jhuuz1yI8=,tag:wOW07CQMDbOiZNervee/pg==,type:str]
user_registration: ENC[AES256_GCM,data:ZDZfEEvyw8pg0WzhrdC8747ed+ZR2ZA8/WypJd/iDkmIy2RmxOeI0sE=,iv:l61mOlvzpCql4fC/eubBSU6px21et2WcpxQ6rFl14iw=,tag:sVDEAa3xipKIi/6isCjWew==,type:str]
user_registration:
registration_shared_secret: ENC[AES256_GCM,data:Ch0JzTJ7OqZQxr+L,iv:6hSTsBwieRg6oy0feBaqJQaY/AvIUyIlcclzlK0GmVE=,tag:Z55kxXppzmU+YP5JkU0jLw==,type:str]
signing_key: ENC[AES256_GCM,data:6UpfiRlX9pRM7zhdm7Mc8y8EItLzugWkHSgE0tGpEmudCTa1wc60oNbYfhKDWU81DT/U148pZOoX1A==,iv:UlqCPicPm5eNBz1xBMI3A3Rn4t/GtldNIDdMH5MMnLw=,tag:HHaw6iMjEAv5b9mjHSVpwA==,type:str]
coturn:
static-auth-secret: ENC[AES256_GCM,data:y5cG/LyrorkDH+8YrgcV7DY=,iv:ca90q2J3+NOy51mUBy4TMKfYMgWL4hxWDdsKIuxRBgU=,tag:hpFCns1lpi07paHyGB7tGQ==,type:str]
@@ -17,6 +17,10 @@ ooye:
hookshot:
as_token: ENC[AES256_GCM,data:L4vEw5r4RhcgritOeDTLHN5E/dM=,iv:pC8BLzxf6NaVAGsotoq6chOceBVdMLvrsQn1LGw9H9w=,tag:SI3CDFHAvgQZEvf/oms3EA==,type:str]
hs_token: ENC[AES256_GCM,data:2ufSJfYzzAB5IO+edwKSra5d/+M=,iv:cmTycGzNL+IeRRKZGbkhTtiksYTtbxED0k0B5haFw7k=,tag:FmWe5sGi9rlapUeAE6lKvg==,type:str]
livekit:
keyfile:
#ENC[AES256_GCM,data:M+SfmEuhPL8sqxOl3uL8mE6Z6pC6naQNxFRskMPbVpLVWYM1Be+QOoLEiTMtWqH2PAf2NZXLcNY63Q99bYINz+BTt/ekllye,iv:DSZJxoZUlUZxPpzfpXyZ4ECeJjq6/WW8I2fvTXIjmfU=,tag:HwHhdQA8yuSKYxM5LcZV/w==,type:comment]
lk-jwt-service: ENC[AES256_GCM,data:6OjQCG2lztUGBojhfxzv7YdflNemhMToibOPTmnZD6q5T/EVRTV36Meg68E=,iv:UahvMi5ssAKuIsr5RlCdAm7XK/B2dLZLi6hcGAJ42DE=,tag:BEV3Clg6Sr9f9tPeJTiIOQ==,type:str]
sops:
age:
- recipient: age19nk55kcs7s0358jpkn75xnr57dfq6fq3p43nartvsprx0su22v7qcgcjdx
@@ -82,8 +86,8 @@ sops:
Qnh1djQ0ZDFhRmxsU2g0eHJZeFlkcU0Kj5H/dHrOwSgiZIzpv3nOc7AWeNMofJg7
OzSVdRry72qPqYU8YLWjAcoP3ddITZnWr53/yYBVmssW/KeyVyPy9A==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-06-21T21:23:24Z"
mac: ENC[AES256_GCM,data:bEJoCzxph/MOnTOJKdrRiQmbVWmAgsKy8vbD5YBeWagWUCJPDAZNDFLzEzmPvt0jDBol04JosrSIKZS1JzJIIm0zRkcOWSqERQCgjgtGdAYmfp0V6ddseDUVfKlZYJDkt6Bdkqg+9LzrP8dDVm2tMDXpo8vzs02o9dTYFm7imVQ=,iv:buP/297JMfvEm9+IdMWRGV7AgZwF0+G6Z2YIeYw/z1o=,tag:+zG612MJA4Ui8CZBgxM+AQ==,type:str]
lastmodified: "2026-01-21T02:03:24Z"
mac: ENC[AES256_GCM,data:yVe+78V7zYgYveLFBghKdAeibg97DRafgsRRCZPYkWu8t2iadtD5UqRK0KS4Zcc55ojHJ11otgadaPHQyl8EIzt7Dwlm7ZOVEmmPAYdaweWfnPRdFhDAxcgj8Ejh03LAdLQK8WwlfTF/09Avub2ZUnN0aPwFCen/qD6dYmcGDNk=,iv:y4YE9AqlVVBBtRGoIdfIcNGE4chChBOR0Euy68xkQBA=,tag:/yopCpkvFaEzr2iXxLd3uw==,type:str]
pgp:
- created_at: "2026-01-16T06:34:46Z"
enc: |-
@@ -106,4 +110,4 @@ sops:
-----END PGP MESSAGE-----
fp: F7D37890228A907440E1FD4846B9228E814A2AAC
unencrypted_suffix: _unencrypted
version: 3.10.2
version: 3.11.0

View File

@@ -1,6 +1,6 @@
dibbler:
postgresql:
url: ENC[AES256_GCM,data:rHmeviBKp5b33gZ+nRweJ9YSobG4OSOxypMcyGb3/Za5DyVjydEgWBkcugrLuy1fUYIu1UV93JizCRLqOOsNkg7ON2AGhw==,iv:mWgLeAmnVaRNuKI4jIKRtW5ZPjnt2tGqjfDbZkuAIXk=,tag:iHSkFcMmTWEFlIH7lVmN1Q==,type:str]
password: ENC[AES256_GCM,data:2n85TO709GJc7/qoYp2RXO8Ttfo=,iv:5ZCZPEQQXPGYfDd1qPhDwDfm1Gds1M8PEX9IiCsHcrw=,tag:PAseyFBAe56pLj5Uv8Jd7A==,type:str]
sops:
age:
- recipient: age1ug30gg4y7ftuya0wdv7q0vh4egn00wlv2th7mt7cgc2ze46wmvyq9lq6ge
@@ -48,8 +48,8 @@ sops:
ZE5tMXJOYlFMOVNJU3FEZFB4TlZ1U00KHnunzKMy91oc92ptcaKCE1sfkhFGvf0S
vRX/nyQnBGqD3X3yfvkt+aQnoLxcjoanpJVM9VeigyPu1mRg0OOxXg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2026-01-11T17:28:43Z"
mac: ENC[AES256_GCM,data:l43vquKg33LndSXOm0hsPcalQRXjqbb30QvptXuBsmQrcEVVh20Aqp92l+rwgv60P03ZtK4SKxm/udVVoqViFTwCLYtCC5GEn4OqbD94LQKzl+XLe7yLWwv2WF8ueu170YpZ97uFxUrhOoaOaKUgnAV+4CocixG5hfadpqA3yYE=,iv:a6RRILzz4gDUuiSZPVoqjlIMu4NZG+D5Q+brusfh9PU=,tag:Y8nKbnctjka44eH15x8oCA==,type:str]
lastmodified: "2026-01-25T14:03:57Z"
mac: ENC[AES256_GCM,data:RBf3LjVNSclsPN7I4QPaDUjWbKlaccjk3rzsRNdRe3+OvJSd7MsS9RfpUFCqUtO7ZkkocXHmkHA8z8LNxs6vejT9czMsLLQD14qHZS6fFdTnToOx3Kt5UuviPO/2UryVI+6HWORkH1aqFJhzkSMop2TO5mzuOTfbCEBLYUUuS6s=,iv:NQs8O1hIbjzGBTZo+gCuisj3edraFGk/Y146HmfPmQY=,tag:4g9IXw2UFC5V9EIHuWJqdA==,type:str]
pgp:
- created_at: "2026-01-11T17:12:49Z"
enc: |-

View File

@@ -53,7 +53,7 @@ in {
nodes.ntnu-pvv-router = mkRouter "NTNU PVV Gateway" {
interfaceGroups = [ ["wan1"] ["eth1"] ];
connections.eth1 = mkConnection "knutsen" "em1";
interfaces.eth1.network = "pvv";
interfaces.eth1.network = "ntnu";
};
nodes.knutsen = mkRouter "knutsen" {
@@ -82,6 +82,8 @@ in {
(mkConnection "buskerud" "eth1")
# (mkConnection "knutsen" "eth1")
(mkConnection "powerpuff-cluster" "eth1")
(mkConnection "powerpuff-cluster" "eth2")
(mkConnection "powerpuff-cluster" "eth3")
(mkConnection "lupine-1" "enp0s31f6")
(mkConnection "lupine-2" "enp0s31f6")
(mkConnection "lupine-3" "enp0s31f6")
@@ -139,7 +141,7 @@ in {
hardware.info = "Dell PowerEdge R730 x 3";
interfaceGroups = [ [ "eth1" ] ];
interfaceGroups = [ [ "eth1" "eth2" "eth3" ] ];
services = {
proxmox = {
@@ -167,6 +169,13 @@ in {
interfaces.ens18.network = "pvv";
};
nodes.temmie = {
guestType = "proxmox";
parent = config.nodes.powerpuff-cluster.id;
interfaces.ens18.network = "pvv";
};
nodes.ustetind = {
guestType = "proxmox LXC";
parent = config.nodes.powerpuff-cluster.id;
@@ -219,7 +228,7 @@ in {
(mkConnection "demiurgen" "eno1")
(mkConnection "sanctuary" "ethernet_0")
(mkConnection "torskas" "eth0")
(mkConnection "skrott" "eth0")
(mkConnection "skrot" "eth0")
(mkConnection "homeassistant" "eth0")
(mkConnection "orchid" "eth0")
(mkConnection "principal" "em0")
@@ -249,6 +258,12 @@ in {
interfaces.ens4.network = "ntnu";
};
nodes.gluttony = {
guestType = "openstack";
parent = config.nodes.stackit.id;
interfaces.ens3.network = "ntnu";
};
nodes.wenche = {
guestType = "openstack";
parent = config.nodes.stackit.id;

View File

@@ -290,21 +290,6 @@ in {
};
};
nodes.skrott = mkDevice "skrott" {
# TODO: the interface name is likely wrong
interfaceGroups = [ [ "eth0" ] ];
interfaces.eth0 = {
# mac = "";
addresses = [
"129.241.210.235"
];
gateways = [
values.hosts.gateway
values.hosts.gateway6
];
};
};
nodes.torskas = mkDevice "torskas" {
deviceIcon = "${pkgs.super-tiny-icons}/share/icons/SuperTinyIcons/svg/arch_linux.svg";

View File

@@ -6,7 +6,6 @@ in
{
config.topology.self.services.postgresql = lib.mkIf cfg.enable {
name = "PostgreSQL";
icon = "${unstablePkgs.super-tiny-icons}/share/icons/SuperTinyIcons/svg/postgresql.svg";
details.listen.text = lib.mkIf cfg.enableTCPIP "0.0.0.0:${toString cfg.settings.port}";
details.socket.text = "/run/postgresql/.s.PGSQL.${toString cfg.settings.port}";

View File

@@ -9,8 +9,9 @@
];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKzPICGew7uN0cmvRmbwkwTCodTBUgEhkoftQnZuO4Q felixalbrigtsen@gmail.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTXSL0w7OUcz1LzEt1T3I3K5RgyNV+MYz0x/1RbpDHQ felixalb@worf"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKzPICGew7uN0cmvRmbwkwTCodTBUgEhkoftQnZuO4Q felixalb@pvv.ntnu.no"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJky33ynjqyWP+hh24gFCMFIEqe3CjIIowGM9jiPbT79 felixalb@sisko.home.feal.no"
];
};
}

View File

@@ -69,10 +69,18 @@ in rec {
ipv4 = pvv-ipv4 223;
ipv6 = pvv-ipv6 223;
};
microbel = {
ipv4 = pvv-ipv4 179;
ipv6 = pvv-ipv6 "1:2";
};
ustetind = {
ipv4 = pvv-ipv4 234;
ipv6 = pvv-ipv6 234;
};
skrott = {
ipv4 = pvv-ipv4 235;
ipv6 = pvv-ipv6 235;
};
temmie = {
ipv4 = pvv-ipv4 167;
ipv6 = pvv-ipv6 167;