1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00
Files
niveum/lib/default.nix

157 lines
3.1 KiB
Nix
Raw Normal View History

{ lib, pkgs }:
let
2025-12-28 12:49:10 +01:00
machines = import ./machines.nix;
in
2023-07-25 16:17:40 +02:00
{
tmpfilesConfig =
{
type,
path,
mode ? "-",
user ? "-",
group ? "-",
age ? "-",
argument ? "-",
}:
"${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
2021-03-23 21:00:21 +01:00
restic =
let
host = "zaatar.r";
port = 3571;
in
{
inherit host port;
repository = "rest:http://${host}:${toString port}/";
};
remoteDir = "/home/kfm/remote";
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");
};
2021-10-11 20:02:17 +02:00
serveHtml = file: pkgs: ''
default_type "text/html";
2022-03-10 21:52:12 +01:00
root ${
2022-05-22 11:47:59 +02:00
pkgs.linkFarm "www" [
2022-03-10 21:52:12 +01:00
{
name = "index.html";
path = file;
}
]
};
2021-10-11 20:02:17 +02:00
index index.html;
'';
sshPort = 22022;
theme = {
gtk = {
name = "Adwaita-dark";
2024-12-13 13:42:16 +01:00
package = pkgs.gnome-themes-extra;
};
icon = {
name = "Adwaita";
2024-12-13 13:42:16 +01:00
package = pkgs.adwaita-icon-theme;
};
cursor = {
name = "capitaine-cursors-white";
package = pkgs.capitaine-cursors;
};
};
retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) (
2025-12-28 12:49:10 +01:00
lib.filterAttrs (_: v: v ? "retiolum") machines
);
externalNetwork = lib.mapAttrs (_: v: v.externalIp) (
2025-12-28 12:49:10 +01:00
lib.filterAttrs (_: v: v ? "externalIp") machines
);
localAddresses = lib.mapAttrs (_: v: v.internalIp) (
2025-12-28 12:49:10 +01:00
lib.filterAttrs (_: v: v ? "internalIp") machines
);
myceliumAddresses = lib.mapAttrs (_: v: v.mycelium.ipv6) (
2025-12-28 12:49:10 +01:00
lib.filterAttrs (_: v: v ? "mycelium") machines
);
syncthingIds = lib.mapAttrs (_: v: { id = v.syncthingId; }) (
2025-12-28 12:49:10 +01:00
lib.filterAttrs (_: v: v ? "syncthingId") machines
);
2025-12-25 14:35:28 +01:00
email =
let
thunderbirdProfile = "donnervogel";
in
{
inherit thunderbirdProfile;
defaults = {
thunderbird = {
enable = true;
profiles = [ thunderbirdProfile ];
};
aerc.enable = true;
realName = "Kierán Meinhardt";
folders.inbox = "INBOX";
};
};
2025-12-28 12:49:10 +01:00
machines = machines;
kieran = {
github = "kmein";
email = "kmein@posteo.de";
name = "Kierán Meinhardt";
2025-12-25 14:35:28 +01:00
pronouns = builtins.concatStringsSep "/" [
"er"
"he"
"is"
"οτος"
"هو"
"̄ϥ"
"он"
"han"
""
];
sshKeys = [
2025-12-28 12:49:10 +01:00
machines.fatteh.sshKey
machines.manakish.sshKey
machines.kabsa.sshKey
];
};
ignorePaths = [
"*~"
".stack-work/"
"__pycache__/"
".mypy_cache/"
"*.py[co]"
"*.o"
"*.hi"
"*.aux"
"*.bbl"
"*.bcf"
"*.blg"
"*.fdb_latexmk"
"*.fls"
"*.out"
"*.run.xml"
"*.toc"
"*.bbl"
"*.class"
"*.dyn_hi"
"*.dyn_o"
"dist/"
".envrc"
".direnv/"
"dist-newstyle/"
".history"
];
2020-10-24 13:27:36 +02:00
}