stockholm/lass/1systems/prism/config.nix

461 lines
18 KiB
Nix
Raw Normal View History

2015-10-30 15:05:51 +00:00
{ config, lib, pkgs, ... }:
2016-10-20 18:54:38 +00:00
with import <stockholm/lib>;
2016-07-07 21:07:22 +00:00
2018-05-12 13:51:24 +00:00
{
2015-10-30 15:05:51 +00:00
imports = [
<stockholm/lass>
2017-09-30 16:03:58 +00:00
<stockholm/lass/2configs/retiolum.nix>
<stockholm/lass/2configs/libvirt.nix>
2020-12-27 13:56:25 +00:00
<stockholm/lass/2configs/tv.nix>
2021-09-05 18:22:06 +00:00
<stockholm/lass/2configs/websites/lassulus.nix>
<stockholm/lass/2configs/telegraf.nix>
2015-12-12 17:22:47 +00:00
{
2017-09-30 16:03:58 +00:00
services.nginx.enable = true;
2015-12-12 17:22:47 +00:00
imports = [
<stockholm/lass/2configs/websites/domsen.nix>
2015-12-12 17:22:47 +00:00
];
2017-09-30 16:03:58 +00:00
# needed by domsen.nix ^^
lass.usershadow = {
enable = true;
};
2015-12-12 17:22:47 +00:00
krebs.iptables.tables.filter.INPUT.rules = [
2016-04-08 22:36:38 +00:00
{ predicate = "-p tcp --dport http"; target = "ACCEPT"; }
{ predicate = "-p tcp --dport https"; target = "ACCEPT"; }
2015-12-12 17:22:47 +00:00
];
}
2017-09-30 16:03:58 +00:00
{ # TODO make new hfos.nix out of this vv
users.users.riot = {
2018-12-03 08:47:35 +00:00
uid = genid_uint31 "riot";
2017-09-30 16:03:58 +00:00
isNormalUser = true;
extraGroups = [ "libvirtd" ];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6o6sdTu/CX1LW2Ff5bNDqGEAGwAsjf0iIe5DCdC7YikCct+7x4LTXxY+nDlPMeGcOF88X9/qFwdyh+9E4g0nUAZaeL14Uc14QDqDt/aiKjIXXTepxE/i4JD9YbTqStAnA/HYAExU15yqgUdj2dnHu7OZcGxk0ZR1OY18yclXq7Rq0Fd3pN3lPP1T4QHM9w66r83yJdFV9szvu5ral3/QuxQnCNohTkR6LoJ4Ny2RbMPTRtb+jPbTQYTWUWwV69mB8ot5nRTP4MRM9pu7vnoPF4I2S5DvSnx4C5zdKzsb7zmIvD4AmptZLrXj4UXUf00Xf7Js5W100Ne2yhYyhq+35 riot@lagrange"
];
2016-03-06 00:45:57 +00:00
};
krebs.iptables.tables.filter.FORWARD.rules = [
2022-11-24 16:15:14 +00:00
{ v6 = false; precedence = 1000; predicate = "--destination 95.216.1.130"; target = "ACCEPT"; }
{ v6 = false; precedence = 1000; predicate = "--source 95.216.1.130"; target = "ACCEPT"; }
];
2016-07-08 11:42:12 +00:00
}
2016-07-10 16:06:50 +00:00
{
users.users.tv = {
2018-12-03 08:47:35 +00:00
uid = genid_uint31 "tv";
2017-09-30 16:03:58 +00:00
isNormalUser = true;
2016-07-10 16:06:50 +00:00
openssh.authorizedKeys.keys = [
config.krebs.users.tv.pubkey
];
};
users.users.makefu = {
2018-12-03 08:47:35 +00:00
uid = genid_uint31 "makefu";
isNormalUser = true;
openssh.authorizedKeys.keys = [
config.krebs.users.makefu.pubkey
];
};
2017-04-30 16:48:54 +00:00
users.extraUsers.dritter = {
2018-12-03 08:47:35 +00:00
uid = genid_uint31 "dritter";
2017-09-30 16:03:58 +00:00
isNormalUser = true;
2017-04-30 16:48:54 +00:00
extraGroups = [
"download"
];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDnqOWDDk7QkSAvrSLkEoz7dY22+xPyv5JDn2zlfUndfavmTMfZvPx9REMjgULbcCSM4m3Ncf40yUjciDpVleGoEz82+p/ObHAkVWPQyXRS3ZRM2IJJultBHEFc61+61Pi8k3p5pBhPPaig6VncJ4uUuuNqen9jqLesSTVXNtdntU2IvnC8B8k1Kq6fu9q1T2yEOMxkD31D5hVHlqAly0LdRiYvtsRIoCSmRvlpGl70uvPprhQxhtoiEUeDqmIL7BG9x7gU0Swdl7R0/HtFXlFuOwSlNYDmOf/Zrb1jhOpj4AlCliGUkM0iKIJhgH0tnJna6kfkGKHDwuzITGIh6SpZ dritter@Janeway"
];
};
2017-09-30 16:03:58 +00:00
users.extraUsers.juhulian = {
uid = 1339;
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBQhLGvfv4hyQ/nqJGy1YgHXPSVl6igeWTroJSvAhUFgoh+rG+zvqY0EahKXNb3sq0/OYDCTJVuucc0hgCg7T2KqTqMtTb9EEkRmCFbD7F7DWZojCrh/an6sHneqT5eFvzAPZ8E5hup7oVQnj5P5M3I9keRHBWt1rq6q0IcOEhsFvne4qJc73aLASTJkxzlo5U8ju3JQOl6474ECuSn0lb1fTrQ/SR1NgF7jV11eBldkS8SHEB+2GXjn4Yrn+QUKOnDp+B85vZmVlJSI+7XR1/U/xIbtAjGTEmNwB6cTbBv9NCG9jloDDOZG4ZvzzHYrlBXjaigtQh2/4mrHoKa5eV juhulian@juhulian"
];
};
2017-10-18 17:51:08 +00:00
users.users.hellrazor = {
2018-12-03 08:47:35 +00:00
uid = genid_uint31 "hellrazor";
2017-10-18 17:51:08 +00:00
isNormalUser = true;
extraGroups = [
"download"
];
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDQFaYOWRUvHP6I37q9Dd4PJOq8FNQqAeJZ8pLx0G62uC450kbPGcG80rHHvXmk7HqQP6biJmMg48bOsvXAScPot2Qhp1Qc35CuUqVhLiTvUAsi8l/iJjhjZ23yRGDCAmW5+JIOzIvECkcbMnG7YoYAQ9trNGHe9qwGzQGhpt3QVClE23WtE3PVKRLQx1VbiabSnAm6tXVd2zpUoSdpWt8Gpi2taM4XXJ5+l744MNxFHvDapN5xqpYzwrA34Ii13jNLWcGbtgxESpR+VjnamdWByrkBsW4X5/xn2K1I1FrujaM/DBHV1QMaDKst9V8+uL5X7aYNt0OUBu2eyZdg6aujY2BYovB9uRyR1JIuSbA/a54MM96yN9WirMUufJF/YZrV0L631t9EW8ORyWUo1GRzMuBHVHQlfApj7NCU/jEddUuTqKgwyRgTmMFMUI4M0tRULAB/7pBE1Vbcx9tg6RsKIk8VkskfbBJW9Y6Sx6YoFlxPdgMNIrBefqEjIV62piP7YLMlvfIDCJ7TNd9dLN86XGggZ/nD5zt6SL1o61vVnw9If8pHosppxADPJsJvcdN6fOe16/tFAeE0JRo0jTcyFVTBGfhpey+rFfuW8wtUyuO5WPUxkOn7xMHGMWHJAtWX2vwVIDtLxvqn48B4SmEOpPD6ii+vcpwqAex3ycqBUQ==" ];
};
2017-04-30 16:48:54 +00:00
}
2017-07-23 19:42:28 +00:00
{
#hotdog
2018-01-05 19:59:29 +00:00
systemd.services."container@hotdog".reloadIfChanged = mkForce false;
2017-07-23 19:42:28 +00:00
containers.hotdog = {
config = { ... }: {
2017-12-18 00:04:32 +00:00
environment.systemPackages = [ pkgs.git ];
2017-07-23 19:42:28 +00:00
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
config.krebs.users.lass.pubkey
];
};
autoStart = false;
2017-07-23 19:42:28 +00:00
enableTun = true;
privateNetwork = true;
hostAddress = "10.233.2.1";
localAddress = "10.233.2.2";
};
}
2017-09-30 16:03:58 +00:00
<stockholm/lass/2configs/exim-smarthost.nix>
<stockholm/lass/2configs/privoxy-retiolum.nix>
2022-05-18 14:57:57 +00:00
<stockholm/lass/2configs/radio>
2017-09-30 16:03:58 +00:00
<stockholm/lass/2configs/binary-cache/server.nix>
<stockholm/lass/2configs/iodined.nix>
<stockholm/lass/2configs/paste.nix>
<stockholm/lass/2configs/syncthing.nix>
2021-01-23 19:58:05 +00:00
<stockholm/lass/2configs/green-host.nix>
2017-09-30 17:36:54 +00:00
<stockholm/lass/2configs/reaktor-coders.nix>
2017-09-30 16:03:58 +00:00
<stockholm/lass/2configs/ciko.nix>
<stockholm/lass/2configs/container-networking.nix>
2020-12-29 22:57:54 +00:00
<stockholm/lass/2configs/jitsi.nix>
2022-01-26 15:41:59 +00:00
<stockholm/lass/2configs/fysiirc.nix>
2022-05-28 22:38:45 +00:00
<stockholm/lass/2configs/bgt-bot>
2022-12-02 08:05:42 +00:00
<stockholm/krebs/2configs/mastodon-proxy.nix>
2017-09-30 16:03:58 +00:00
{
services.tor = {
enable = true;
};
}
{
imports = [
<stockholm/lass/2configs/realwallpaper.nix>
];
services.nginx.virtualHosts."lassul.us".locations = {
"= /wallpaper-marker.png".extraConfig = ''
alias /var/realwallpaper/realwallpaper-marker.png;
'';
"= /wallpaper.png".extraConfig = ''
alias /var/realwallpaper/realwallpaper.png;
'';
};
2017-09-30 16:03:58 +00:00
}
{
2018-02-19 08:45:39 +00:00
users.users.jeschli = {
2018-12-03 08:47:35 +00:00
uid = genid_uint31 "jeschli";
2018-02-19 08:45:39 +00:00
isNormalUser = true;
openssh.authorizedKeys.keys = with config.krebs.users; [
jeschli.pubkey
jeschli-bln.pubkey
jeschli-bolide.pubkey
jeschli-brauerei.pubkey
];
};
krebs.git.rules = [
{
user = with config.krebs.users; [
jeschli
jeschli-bln
jeschli-bolide
jeschli-brauerei
];
repo = [ config.krebs.git.repos.xmonad-stockholm ];
perm = with git; push "refs/heads/jeschli*" [ fast-forward non-fast-forward create delete merge ];
}
{
2017-12-15 20:30:33 +00:00
user = with config.krebs.users; [
jeschli
jeschli-bln
jeschli-bolide
2017-12-15 20:30:33 +00:00
jeschli-brauerei
];
repo = [ config.krebs.git.repos.stockholm ];
perm = with git; push "refs/heads/staging/jeschli*" [ fast-forward non-fast-forward create delete merge ];
}
];
}
{
krebs.repo-sync.repos.stockholm.timerConfig = {
OnBootSec = "5min";
OnUnitInactiveSec = "2min";
RandomizedDelaySec = "2min";
};
}
2018-01-15 23:02:38 +00:00
<stockholm/lass/2configs/minecraft.nix>
2019-05-29 13:20:45 +00:00
<stockholm/lass/2configs/codimd.nix>
2021-04-17 09:26:14 +00:00
<stockholm/lass/2configs/searx.nix>
2018-02-13 16:07:31 +00:00
{
services.taskserver = {
enable = true;
fqdn = "lassul.us";
listenHost = "::";
listenPort = 53589;
organisations.lass.users = [ "lass" "android" ];
};
krebs.iptables.tables.filter.INPUT.rules = [
{ predicate = "-p tcp --dport 53589"; target = "ACCEPT"; }
];
}
2018-04-28 15:26:43 +00:00
<stockholm/lass/2configs/go.nix>
2018-04-28 21:18:05 +00:00
{
environment.systemPackages = [ pkgs.cryptsetup ];
systemd.services."container@red".reloadIfChanged = mkForce false;
containers.red = {
config = { ... }: {
environment.systemPackages = [ pkgs.git ];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
config.krebs.users.lass.pubkey
];
};
autoStart = false;
enableTun = true;
privateNetwork = true;
hostAddress = "10.233.2.3";
localAddress = "10.233.2.4";
};
2018-05-03 16:21:39 +00:00
}
2018-05-04 18:32:23 +00:00
{
users.users.download.openssh.authorizedKeys.keys = [
];
}
2018-05-04 18:37:21 +00:00
{
lass.nichtparasoup.enable = true;
services.nginx = {
enable = true;
virtualHosts."lol.lassul.us" = {
2018-05-04 18:37:21 +00:00
forceSSL = true;
enableACME = true;
locations."/".extraConfig = ''
proxy_pass http://localhost:5001;
'';
};
};
}
2018-05-21 06:28:08 +00:00
{
2018-12-09 15:55:00 +00:00
imports = [
2018-12-16 15:11:02 +00:00
<stockholm/lass/2configs/wiregrill.nix>
2018-05-21 06:28:08 +00:00
];
2018-12-16 08:34:16 +00:00
krebs.iptables.tables.nat.PREROUTING.rules = [
{ v6 = false; precedence = 1000; predicate = "-s 10.244.1.0/24"; target = "ACCEPT"; }
{ v4 = false; precedence = 1000; predicate = "-s 42:1::/32"; target = "ACCEPT"; }
];
2018-05-21 06:28:08 +00:00
krebs.iptables.tables.filter.FORWARD.rules = [
2018-12-16 15:11:02 +00:00
{ precedence = 1000; predicate = "-i wiregrill -o retiolum"; target = "ACCEPT"; }
{ precedence = 1000; predicate = "-i retiolum -o wiregrill"; target = "ACCEPT"; }
2018-05-21 06:28:08 +00:00
];
krebs.iptables.tables.nat.POSTROUTING.rules = [
{ v4 = false; predicate = "-s 42:1::/32 ! -d 42:1::/48"; target = "MASQUERADE"; }
2018-05-21 06:28:08 +00:00
{ v6 = false; predicate = "-s 10.244.1.0/24 ! -d 10.244.1.0/24"; target = "MASQUERADE"; }
];
2018-12-06 13:20:04 +00:00
services.dnsmasq = {
enable = true;
resolveLocalQueries = false;
extraConfig= ''
2020-09-27 13:13:20 +00:00
listen-address=42:1:ce16::1,10.244.1.103
2018-12-06 13:20:04 +00:00
except-interface=lo
2020-09-27 13:13:20 +00:00
interface=wiregrill
2018-12-06 13:20:04 +00:00
'';
};
2018-05-21 06:28:08 +00:00
}
2018-06-08 03:04:21 +00:00
{
krebs.iptables.tables.filter.INPUT.rules = [
{ predicate = "-p udp --dport 60000:61000"; target = "ACCEPT";}
];
}
2021-09-10 07:22:08 +00:00
<stockholm/lass/2configs/murmur.nix>
<stockholm/lass/2configs/docker.nix>
2018-11-30 03:35:00 +00:00
{
systemd.services."container@yellow".reloadIfChanged = mkForce false;
containers.yellow = {
config = { ... }: {
environment.systemPackages = [ pkgs.git ];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
config.krebs.users.lass.pubkey
];
};
autoStart = false;
enableTun = true;
privateNetwork = true;
hostAddress = "10.233.2.13";
localAddress = "10.233.2.14";
};
services.nginx.virtualHosts."jelly.r" = {
locations."/".extraConfig = ''
proxy_pass http://10.233.2.14:8096/;
proxy_set_header Accept-Encoding "";
'';
};
2021-08-15 16:49:23 +00:00
services.nginx.virtualHosts."flix.r" = {
locations."/".extraConfig = ''
proxy_pass http://10.233.2.14:80/;
proxy_set_header Accept-Encoding "";
'';
};
2020-04-11 15:13:08 +00:00
services.nginx.virtualHosts."lassul.us" = {
locations."^~ /flix/".extraConfig = ''
if ($scheme != "https") {
rewrite ^ https://$host$request_uri permanent;
}
auth_basic "Restricted Content";
auth_basic_user_file ${pkgs.writeText "flix-user-pass" ''
krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0
''};
proxy_pass http://10.233.2.14:80/;
proxy_set_header Accept-Encoding "";
sub_filter "https://lassul.us/" "https://lassul.us/flix/";
sub_filter_once off;
'';
locations."^~ /chatty/".extraConfig = ''
rewrite ^ https://$host/flix/$request_uri permanent;
'';
#locations."^~ /transmission".return = "301 https://$host/transmission/web/";
locations."^~ /transmission/".extraConfig = ''
if ($scheme != "https") {
rewrite ^ https://$host$request_uri permanent;
}
auth_basic "Restricted Content";
auth_basic_user_file ${pkgs.writeText "transmission-user-pass" ''
krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0
''};
proxy_pass_header X-Transmission-Session-Id;
proxy_pass http://10.233.2.14:9091;
'';
};
2018-11-30 03:35:00 +00:00
users.groups.download = {};
users.users = {
download = {
createHome = true;
group = "download";
name = "download";
home = "/var/download";
useDefaultShell = true;
2019-01-22 15:27:18 +00:00
uid = genid "download";
2021-06-05 12:56:14 +00:00
isSystemUser = true;
2018-11-30 03:35:00 +00:00
openssh.authorizedKeys.keys = with config.krebs.users; [
lass.pubkey
lass-android.pubkey
2018-11-30 03:35:00 +00:00
makefu.pubkey
2020-04-18 12:55:16 +00:00
palo.pubkey
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDB0d0JA20Vqn7I4lCte6Ne2EOmLZyMJyS9yIKJYXNLjbLwkQ4AYoQKantPBkTxR75M09E7d3j5heuWnCjWH45TrfQfe1EOSSC3ppCI6C6aIVlaNs+KhAYZS0m2Y8WkKn+TT5JLEa8yybYVN/RlZPOilpj/1QgjU6CQK+eJ1k/kK+QFXcwN82GDVh5kbTVcKUNp2tiyxFA+z9LY0xFDg/JHif2ROpjJVLQBJ+YPuOXZN5LDnVcuyLWKThjxy5srQ8iDjoxBg7dwLHjby5Mv41K4W61Gq6xM53gDEgfXk4cQhJnmx7jA/pUnsn2ZQDeww3hcc7vRf8soogXXz2KC9maiq0M/svaATsa9Ul4hrKnqPZP9Q8ScSEAUX+VI+x54iWrnW0p/yqBiRAzwsczdPzaQroUFTBxrq8R/n5TFdSHRMX7fYNOeVMjhfNca/gtfw9dYBVquCvuqUuFiRc0I7yK44rrMjjVQRcAbw6F8O7+04qWCmaJ8MPlmApwu2c05VMv9hiJo5p6PnzterRSLCqF6rIdhSnuOwrUIt1s/V+EEZXHCwSaNLaQJnYL0H9YjaIuGz4c8kVzxw4c0B6nl+hqW5y5/B2cuHiumnlRIDKOIzlv8ufhh21iN7QpIsPizahPezGoT1XqvzeXfH4qryo8O4yTN/PWoA+f7o9POU7L6hQ== lhebendanz@nixos"
"AAAAB3NzaC1yc2EAAAADAQABAAABgQC4ECL9NSCWqs4KVe+FF+2BPtl5Bv5aQPHqnXllCyiESZykwRKLx6/AbF5SbUAUMVZtp9oDSdp28m3BvVeWJ/q7hAbIxUtfd/jp+JBRZ8Kj6K5GzUO7Bhgl/o0A7xEjAeOKHiYuLjdPMcFUyl6Ah4ey/mcQYf6AdU0+hYUDeUlKe/YxxYD6202W0GJq2xGdIqs/TbopT9iaX+sv0wdXDVfFY72nFqOUwJW3u6O2viKKRugrz/eo50Eo3ts7pYz/FpDXExrUvV9Vu/bQ34pa8nKgF3/AKQHgmzljNQSVZKyAV8OY0UFonjBMXCBg2tXtwfnlzdx2SyuQVv55x+0AuRKsi85G2xLpXu1A3921pseBTW6Q6kbYK9eqxAay2c/kNbwNqFnO+nCvQ6Ier/hvGddOtItMu96IuU2E7mPN6WgvM8/3fjJRFWnZxFxqu/k7iH+yYT8qwRgdiSqZc76qvkYEuabdk2itstTRY0A3SpI3hFMZDw/7bxgMZtqpfyoRk5s= philip@shiki11:15 <Profpatsch> AAAAB3NzaC1yc2EAAAADAQABAAABgQC4ECL9NSCWqs4KVe+FF+2BPtl5Bv5aQPHqnXllCyiESZykwRKLx6/AbF5SbUAUMVZtp9oDSdp28m3BvVeWJ/q7hAbIxUtfd/jp+JBRZ8Kj6K5GzUO7Bhgl/o0A7xEjAeOKHiYuLjdPMcFUyl6Ah4ey/mcQYf6AdU0+hYUDeUlKe/YxxYD6202W0GJq2xGdIqs/TbopT9iaX+sv0wdXDVfFY72nFqOUwJW3u6O2viKKRugrz/eo50Eo3ts7pYz/FpDXExrUvV9Vu/bQ34pa8nKgF3/AKQHgmzljNQSVZKyAV8OY0UFonjBMXCBg2tXtwfnlzdx2SyuQVv55x+0AuRKsi85G2xLpXu1A3921pseBTW6Q6kbYK9eqxAay2c/kNbwNqFnO+nCvQ6Ier/hvGddOtItMu96IuU2E7mPN6WgvM8/3fjJRFWnZxFxqu/k7iH+yYT8qwRgdiSqZc76qvkYEuabdk2itstTRY0A3SpI3hFMZDw/7bxgMZtqpfyoRk5s= philip@shiki"
mic92.pubkey
qubasa.pubkey
2018-11-30 03:35:00 +00:00
];
};
};
system.activationScripts.downloadFolder = ''
mkdir -p /var/download
chmod 775 /var/download
2018-12-02 04:44:57 +00:00
ln -fnsT /var/lib/containers/yellow/var/download/finished /var/download/finished || :
2018-11-30 03:35:00 +00:00
chown download: /var/download/finished
'';
2018-12-24 14:50:05 +00:00
fileSystems."/export/download" = {
device = "/var/lib/containers/yellow/var/download/finished";
2018-12-24 14:50:05 +00:00
options = [ "bind" ];
};
services.nfs.server = {
enable = true;
exports = ''
/export 42::/16(insecure,ro,crossmnt)
'';
lockdPort = 4001;
mountdPort = 4002;
statdPort = 4000;
};
2021-08-19 20:49:09 +00:00
services.samba = {
enable = true;
2021-08-26 19:21:48 +00:00
enableNmbd = false;
2021-08-19 20:49:09 +00:00
extraConfig = ''
workgroup = WORKGROUP
netbios name = PRISM
2021-08-26 19:21:48 +00:00
server string = ${config.networking.hostName}
# only allow retiolum addresses
2021-08-26 18:13:36 +00:00
hosts allow = 42::/16 10.243.0.0/16
2021-08-26 19:21:48 +00:00
# Use sendfile() for performance gain
use sendfile = true
# No NetBIOS is needed
disable netbios = true
# Only mangle non-valid NTFS names, don't care about DOS support
mangled names = illegal
# Performance optimizations
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
# Disable all printing
load printers = false
disable spoolss = true
printcap name = /dev/null
2021-08-19 20:49:09 +00:00
map to guest = Bad User
max log size = 50
dns proxy = no
security = user
[global]
syslog only = yes
2021-08-26 19:21:48 +00:00
'';
2021-08-19 20:49:09 +00:00
shares.public = {
comment = "Warez";
path = "/export";
public = "yes";
"only guest" = "yes";
"create mask" = "0644";
"directory mask" = "2777";
writable = "no";
printable = "no";
};
};
2018-12-24 14:50:05 +00:00
krebs.iptables.tables.filter.INPUT.rules = [
2021-08-19 20:49:09 +00:00
# smbd
{ predicate = "-i retiolum -p tcp --dport 445"; target = "ACCEPT"; }
{ predicate = "-i retiolum -p tcp --dport 111"; target = "ACCEPT"; }
{ predicate = "-i retiolum -p udp --dport 111"; target = "ACCEPT"; }
{ predicate = "-i retiolum -p tcp --dport 2049"; target = "ACCEPT"; }
{ predicate = "-i retiolum -p udp --dport 2049"; target = "ACCEPT"; }
{ predicate = "-i retiolum -p tcp --dport 4000:4002"; target = "ACCEPT"; }
{ predicate = "-i retiolum -p udp --dport 4000:4002"; target = "ACCEPT"; }
2018-12-24 14:50:05 +00:00
{ predicate = "-i wiregrill -p tcp --dport 111"; target = "ACCEPT"; }
{ predicate = "-i wiregrill -p udp --dport 111"; target = "ACCEPT"; }
{ predicate = "-i wiregrill -p tcp --dport 2049"; target = "ACCEPT"; }
{ predicate = "-i wiregrill -p udp --dport 2049"; target = "ACCEPT"; }
{ predicate = "-i wiregrill -p tcp --dport 4000:4002"; target = "ACCEPT"; }
{ predicate = "-i wiregrill -p udp --dport 4000:4002"; target = "ACCEPT"; }
];
2018-11-30 03:35:00 +00:00
}
2020-11-24 09:25:37 +00:00
{
users.users.shannan = {
uid = genid_uint31 "shannan";
isNormalUser = true;
openssh.authorizedKeys.keys = [
config.krebs.users.shannan.pubkey
];
};
}
2019-01-22 15:27:56 +00:00
{
2020-08-20 20:16:50 +00:00
nix.trustedUsers = [ "mic92" ];
users.users.mic92 = {
uid = genid_uint31 "mic92";
2019-01-22 15:27:56 +00:00
isNormalUser = true;
openssh.authorizedKeys.keys = [
2020-08-20 20:16:50 +00:00
config.krebs.users.mic92.pubkey
2019-01-22 15:27:56 +00:00
];
};
}
2015-10-30 15:05:51 +00:00
];
krebs.build.host = config.krebs.hosts.prism;
2018-07-07 23:02:22 +00:00
services.earlyoom = {
enable = true;
freeMemThreshold = 5;
};
2019-05-29 13:32:59 +00:00
# prism rsa hack
services.openssh.hostKeys = [{
path = toString <secrets> + "ssh.id_rsa";
type = "rsa";
}];
2015-10-30 15:05:51 +00:00
}