1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

remove specialArgs niveum and niveumLib, add overlay

This commit is contained in:
2025-12-25 14:00:03 +01:00
parent c490c81a32
commit 82b7ffd39f
59 changed files with 535 additions and 616 deletions

View File

@@ -1,5 +0,0 @@
pkgs: {
terminal = "alacritty";
browser = "${pkgs.firefox}/bin/firefox";
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
}

View File

@@ -1,27 +1,40 @@
{ lib, pkgs }:
let
systems = import ./systems.nix;
in
{
tmpfilesConfig = {
type,
path,
mode ? "-",
user ? "-",
group ? "-",
age ? "-",
argument ? "-",
}: "${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
tmpfilesConfig =
{
type,
path,
mode ? "-",
user ? "-",
group ? "-",
age ? "-",
argument ? "-",
}:
"${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
restic = let host = "zaatar.r"; port = 3571; in {
inherit host port;
repository = "rest:http://${host}:${toString port}/";
};
restic =
let
host = "zaatar.r";
port = 3571;
in
{
inherit host port;
repository = "rest:http://${host}:${toString port}/";
};
remoteDir = "/home/kfm/remote";
firewall = lib: {
accept = {
source,
protocol,
dport,
}: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
firewall = {
accept =
{
source,
protocol,
dport,
}:
"nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
addRules = lib.concatMapStringsSep "\n" (rule: "iptables -A ${rule}");
removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true");
};
@@ -41,7 +54,7 @@
sshPort = 22022;
theme = pkgs: {
theme = {
gtk = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
@@ -56,32 +69,43 @@
};
};
defaultApplications = import ./default-applications.nix;
defaultApplications = {
terminal = "alacritty";
browser = "${pkgs.firefox}/bin/firefox";
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
};
retiolumAddresses = import ./retiolum-network.nix;
retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) (
lib.filterAttrs (_: v: v ? "retiolum") systems
);
externalNetwork = lib.mapAttrs (_: v: v.externalIp) (
lib.filterAttrs (_: v: v ? "externalIp") systems
);
localAddresses = lib.mapAttrs (_: v: v.internalIp) (
lib.filterAttrs (_: v: v ? "internalIp") systems
);
myceliumAddresses = lib.mapAttrs (_: v: v.mycelium.ipv6) (
lib.filterAttrs (_: v: v ? "mycelium") systems
);
syncthingIds = lib.mapAttrs (_: v: { id = v.syncthingId; }) (
lib.filterAttrs (_: v: v ? "syncthingId") systems
);
localAddresses = import ./local-network.nix;
email = import ./email.nix;
email-sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKz33wHtPuIfgXEb0+hybxFGV9ZuPsDTLUZo/+hlcdA";
systems = systems;
kieran = {
github = "kmein";
email = "kmein@posteo.de";
name = "Kierán Meinhardt";
sshKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk" # kabsa
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB" # manakish
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y" # fatteh
systems.fatteh.sshKey
systems.manakish.sshKey
systems.kabsa.sshKey
];
};
syncthing.devices = {
kabsa.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
kibbeh.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
fatteh.id = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
};
ignorePaths = [
"*~"
".stack-work/"

View File

@@ -1,4 +0,0 @@
{
ful = "130.61.217.114";
makanek = "88.99.83.173";
}

View File

@@ -1,4 +0,0 @@
{
officejet = "192.168.0.251";
router = "192.168.0.1";
}

View File

@@ -1,8 +0,0 @@
{
zaatar = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
fatteh = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
ful = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
kabsa = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
makanek = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
manakish = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
}

View File

@@ -1,7 +1,6 @@
{
pkgs,
lib,
niveumPackages,
...
}: {
# watcher scripts
@@ -30,7 +29,7 @@
nick ? ''"$PANOPTIKON_WATCHER"-watcher'',
}:
pkgs.writers.writeDash "kpaste-irc-reporter" ''
KPASTE_CONTENT_TYPE=text/plain ${niveumPackages.kpaste}/bin/kpaste \
KPASTE_CONTENT_TYPE=text/plain ${pkgs.kpaste}/bin/kpaste \
| ${pkgs.gnused}/bin/sed -n "${
if retiolumLink
then "2"

View File

@@ -1,39 +0,0 @@
{
kabsa = {
ipv4 = "10.243.2.4";
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
};
ful = {
ipv4 = "10.243.2.107";
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
};
zaatar = {
ipv4 = "10.243.2.34";
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
};
makanek = {
ipv4 = "10.243.2.84";
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
};
fatteh = {
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
ipv4 = "10.243.2.77";
};
manakish = {
ipv4 = "10.243.2.85";
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
};
tabula = {
ipv4 = "10.243.2.78";
ipv6 = "";
};
tahina = {
ipv4 = "10.243.2.74";
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
};
}

73
lib/systems.nix Normal file
View File

@@ -0,0 +1,73 @@
{
kabsa = {
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk";
syncthingId = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
retiolum = {
ipv4 = "10.243.2.4";
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
};
mycelium.ipv6 = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
};
manakish = {
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB";
syncthingId = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
retiolum = {
ipv4 = "10.243.2.85";
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
};
mycelium.ipv6 = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
};
fatteh = {
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y";
syncthingId = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
retiolum = {
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
ipv4 = "10.243.2.77";
};
mycelium.ipv6 = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
};
kibbeh = {
syncthingId = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
};
ful = {
externalIp = "130.61.217.114";
retiolum = {
ipv4 = "10.243.2.107";
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
};
mycelium.ipv6 = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
};
zaatar = {
retiolum = {
ipv4 = "10.243.2.34";
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
};
mycelium.ipv6 = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
};
makanek = {
externalIp = "88.99.83.173";
retiolum = {
ipv4 = "10.243.2.84";
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
};
mycelium.ipv6 = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
};
officejet = {
internalIp = "192.168.0.251";
};
router = {
internalIp = "192.168.0.1";
};
tabula = {
retiolum = {
ipv4 = "10.243.2.78";
ipv6 = "";
};
};
tahina = {
retiolum = {
ipv4 = "10.243.2.74";
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
};
};
}