summaryrefslogtreecommitdiffstats
path: root/krebs/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/2configs')
-rw-r--r--krebs/2configs/exim-smarthost.nix1
-rw-r--r--krebs/2configs/mastodon.nix28
-rw-r--r--krebs/2configs/mud.nix26
-rw-r--r--krebs/2configs/nameserver.nix5
-rw-r--r--krebs/2configs/reaktor2.nix1
-rw-r--r--krebs/2configs/shack/share.nix28
-rw-r--r--krebs/2configs/shack/ssh-keys.nix1
-rw-r--r--krebs/2configs/shack/worlddomination.nix40
8 files changed, 45 insertions, 85 deletions
diff --git a/krebs/2configs/exim-smarthost.nix b/krebs/2configs/exim-smarthost.nix
index ceb11ca64..11b8b3ec1 100644
--- a/krebs/2configs/exim-smarthost.nix
+++ b/krebs/2configs/exim-smarthost.nix
@@ -35,6 +35,7 @@ in {
"brain@krebsco.de" = brain-ml;
"eloop2022@krebsco.de" = eloop-ml;
"2024@eloop.org" = eloop-ml;
+ "2025@eloop.org" = eloop-ml;
"root@eloop.org" = eloop-ml; # obsolete, use spam@eloop.org instead
"spam@eloop.org" = eloop-ml;
"youtube@eloop.org" = eloop-ml; # obsolete, use spam@eloop.org instead
diff --git a/krebs/2configs/mastodon.nix b/krebs/2configs/mastodon.nix
index b81c229b6..3c7205167 100644
--- a/krebs/2configs/mastodon.nix
+++ b/krebs/2configs/mastodon.nix
@@ -1,4 +1,14 @@
{ config, lib, pkgs, ... }:
+let
+ mastodon-clear-cache = pkgs.writers.writeDashBin "mastodon-clear-cache" ''
+ /run/current-system/sw/bin/mastodon-tootctl media remove --prune-profiles --days=14 --concurrency=30
+ /run/current-system/sw/bin/mastodon-tootctl media remove-orphans
+ /run/current-system/sw/bin/mastodon-tootctl preview_cards remove --days=14
+ /run/current-system/sw/bin/mastodon-tootctl accounts prune
+ /run/current-system/sw/bin/mastodon-tootctl statuses remove --days 4
+ /run/current-system/sw/bin/mastodon-tootctl media remove --days 4
+ '';
+in
{
services.postgresql = {
enable = true;
@@ -25,12 +35,20 @@
443
];
+ systemd.services.mastodon-clear-cache = {
+ description = "Mastodon Clear Cache";
+ wantedBy = [ "timers.target" ];
+ startAt = "daily";
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${mastodon-clear-cache}/bin/mastodon-clear-cache";
+ User = "mastodon";
+ WorkingDirectory = "/var/lib/mastodon";
+ };
+ };
+
environment.systemPackages = [
- (pkgs.writers.writeDashBin "clear-mastodon-cache" ''
- mastodon-tootctl media remove --prune-profiles --days=14 --concurrency=30
- mastodon-tootctl media remove-orphans
- mastodon-tootctl preview_cards remove --days=14
- '')
+ mastodon-clear-cache
(pkgs.writers.writeDashBin "create-mastodon-user" ''
set -efu
nick=$1
diff --git a/krebs/2configs/mud.nix b/krebs/2configs/mud.nix
index a53596cc6..992f2ebdc 100644
--- a/krebs/2configs/mud.nix
+++ b/krebs/2configs/mud.nix
@@ -5,18 +5,6 @@
MUD_SERVER=''${MUD_SERVER:-127.0.0.1}
MUD_PORT=''${MUD_PORT:-8080}
- if $(${pkgs.libressl.nc}/bin/nc -z "$MUD_SERVER" "$MUD_PORT"); then
- ${nvim}/bin/nvim \
- +"let g:instant_username = \"$MUD_NICKNAME\"" \
- +":InstantJoinSession $MUD_SERVER $MUD_PORT" \
- "$@"
- else
- ${nvim}/bin/nvim \
- +"let g:instant_username = \"$MUD_NICKNAME\"" \
- +":InstantStartServer $MUD_SERVER $MUD_PORT" \
- +":InstantStartSession $MUD_SERVER $MUD_PORT" \
- "$@"
- fi
'';
nvim = pkgs.neovim.override {
# vimAlias = true;
@@ -31,7 +19,6 @@
nerdtree # file structure inside nvim
rainbow # Color parenthesis
customPlugins.hack-color
- customPlugins.instant
];
opt = [];
};
@@ -97,15 +84,6 @@
inoremap <f2> <esc>:tabn<cr>
'';
customPlugins = {
- instant = pkgs.vimUtils.buildVimPlugin {
- name = "instant";
- src = pkgs.fetchFromGitHub {
- owner = "jbyuki";
- repo = "instant.nvim";
- rev = "c02d72267b12130609b7ad39b76cf7f4a3bc9554";
- sha256 = "sha256-7Pr2Au/oGKp5kMXuLsQY4BK5Wny9L1EBdXtyS5EaZPI=";
- };
- };
hack-color = (rtp: rtp // { inherit rtp; }) (pkgs.writeTextFile (let
name = "hack";
in {
@@ -162,10 +140,6 @@ in {
];
packages = with pkgs; [
tmux
- (pkgs.writers.writeDashBin "instant_server" ''
- find ${customPlugins.instant}
- find ${customPlugins.instant.src}
- '')
mud
];
};
diff --git a/krebs/2configs/nameserver.nix b/krebs/2configs/nameserver.nix
index 633f6f5d5..fb22dc6f9 100644
--- a/krebs/2configs/nameserver.nix
+++ b/krebs/2configs/nameserver.nix
@@ -66,6 +66,10 @@ in {
- id: hostingde_ns1
address: 134.0.30.178
+ - id: krebscode_ne
+ address: ${config.krebs.hosts.ne.nets.internet.ip4.addr}
+ key: krebs_transfer_notify_key
+
- id: krebscode_ni
address: ${config.krebs.hosts.ni.nets.internet.ip4.addr}
key: krebs_transfer_notify_key
@@ -119,6 +123,7 @@ in {
dnssec-policy: rsa2k
notify: henet_ns1
notify: hostingde_ns1
+ notify: krebscode_ne
notify: krebscode_ni
acl: transfer_to_henet_secondary
acl: transfer_to_hostingde_secondary
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index 7cc6c7550..faabf7677 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -410,7 +410,6 @@ let
bedger-balance
bing
bing-img
- hooks.sed
interrogate
say
(generators.command_hook {
diff --git a/krebs/2configs/shack/share.nix b/krebs/2configs/shack/share.nix
index bc483e8d0..0ba22af78 100644
--- a/krebs/2configs/shack/share.nix
+++ b/krebs/2configs/shack/share.nix
@@ -26,21 +26,17 @@
"guest ok" = "yes";
};
};
- extraConfig = ''
- guest account = smbguest
- map to guest = bad user
- # disable printing
- load printers = no
- printing = bsd
- printcap name = /dev/null
- disable spoolss = yes
-
- # for legacy systems
- client min protocol = NT1
- server min protocol = NT1
- workgroup = WORKGROUP
- server string = ${config.networking.hostName}
- netbios name = ${config.networking.hostName}
- '';
+ settings.global = {
+ "guest account" = "smbguest";
+ "map to guest" = "bad user";
+ # disable printing
+ "load printers" = "no";
+ "printing" = "bsd";
+ "printcap name" = "/dev/null";
+ "disable spoolss" = "yes";
+ "workgroup" = "WORKGROUP";
+ "server string" = config.networking.hostName;
+ "netbios name" = config.networking.hostName;
+ };
};
}
diff --git a/krebs/2configs/shack/ssh-keys.nix b/krebs/2configs/shack/ssh-keys.nix
index 80957f3a5..183a81f99 100644
--- a/krebs/2configs/shack/ssh-keys.nix
+++ b/krebs/2configs/shack/ssh-keys.nix
@@ -2,6 +2,7 @@
{
users.users.root.openssh.authorizedKeys.keys = [
config.krebs.users."0x4A6F".pubkey
+ config.krebs.users.susanne.pubkey
config.krebs.users.hase.pubkey
config.krebs.users.neos.pubkey
config.krebs.users.raute.pubkey
diff --git a/krebs/2configs/shack/worlddomination.nix b/krebs/2configs/shack/worlddomination.nix
index b7a8f18df..66a4095db 100644
--- a/krebs/2configs/shack/worlddomination.nix
+++ b/krebs/2configs/shack/worlddomination.nix
@@ -7,11 +7,11 @@ let
src = pkgs.fetchFromGitHub {
owner = "shackspace";
repo = "worlddomination";
- rev = "c7aedcde7cd1fcb870b5356a6125e1a384b0776c";
- sha256 = "0y6haz5apwa33lz64l7b2x78wrrckbw39j4wzyd1hfk46478xi2y";
+ rev = "934387c3525e819e6b5981c417a7561d70b8b61a";
+ sha256 = "sha256-AbRqxxY6hYNg4qkk/akuw4f+wJh4nx1hfEA4Lp5B+1E=";
};
buildInputs = [
- (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
+ (pkgs.python310.withPackages (pythonPackages: with pythonPackages; [
docopt
LinkHeader
aiocoap
@@ -30,41 +30,7 @@ let
};
pythonPackages = pkgs.python3Packages;
# https://github.com/chrysn/aiocoap
- grequests = pythonPackages.buildPythonPackage rec {
- pname = "grequests";
- version = "0.3.1";
- name = "${pname}-${version}";
- src = pkgs.fetchFromGitHub {
- owner = "kennethreitz";
- repo = "grequests";
- rev = "d1e70eb";
- sha256 = "0drfx4fx65k0g5sj0pw8z3q1s0sp7idn2yz8xfb45nd6v82i37hc";
- };
-
- doCheck = false;
-
- propagatedBuildInputs = with pythonPackages; [ requests gevent ];
-
- meta = with lib;{
- description = "Asynchronous HTTP requests";
- homepage = https://github.com/kennethreitz/grequests;
- license = with licenses; [ bsd2 ];
- maintainers = with maintainers; [ matejc ];
- };
- };
-
- aiocoap = pythonPackages.buildPythonPackage {
- name = "aiocoap-0.3";
- src = pkgs.fetchurl { url = "https://pypi.python.org/packages/9c/f6/d839e4b14258d76e74a39810829c13f8dd31de2bfe0915579b2a609d1bbe/aiocoap-0.3.tar.gz"; sha256 = "402d4151db6d8d0b1d66af5b6e10e0de1521decbf12140637e5b8d2aa9c5aef6"; };
- propagatedBuildInputs = [ ];
- doCheck = false; # 2 errors, dunnolol
- meta = with pkgs.lib; {
- homepage = "";
- license = licenses.mit;
- description = "Python CoAP library";
- };
- };
LinkHeader = pythonPackages.buildPythonPackage {
name = "LinkHeader-0.4.3";
src = pkgs.fetchurl { url = "https://files.pythonhosted.org/packages/27/d4/eb1da743b2dc825e936ef1d9e04356b5701e3a9ea022c7aaffdf4f6b0594/LinkHeader-0.4.3.tar.gz"; sha256 = "7fbbc35c0ba3fbbc530571db7e1c886e7db3d718b29b345848ac9686f21b50c3"; };