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
2015-10-30 15:05:51 +00:00
let
2016-04-08 01:53:34 +00:00
ip = config . krebs . build . host . nets . internet . ip4 . addr ;
2016-05-19 22:02:29 +00:00
2015-10-30 15:05:51 +00:00
in {
imports = [
2017-07-11 09:26:24 +00:00
<stockholm/lass>
2017-01-10 18:40:32 +00:00
{
networking . interfaces . et0 . ip4 = [
{
address = ip ;
prefixLength = 24 ;
}
] ;
networking . defaultGateway = " 2 1 3 . 2 3 9 . 2 0 5 . 2 2 5 " ;
networking . nameservers = [
" 8 . 8 . 8 . 8 "
] ;
services . udev . extraRules = ''
SUBSYSTEM == " n e t " , ATTR { address } == " 5 4 : 0 4 : a 6 : 7 e : f 4 : 0 6 " , NAME = " e t 0 "
'' ;
}
2017-07-11 09:26:24 +00:00
<stockholm/lass/2configs/retiolum.nix>
<stockholm/lass/2configs/exim-smarthost.nix>
<stockholm/lass/2configs/downloading.nix>
<stockholm/lass/2configs/ts3.nix>
<stockholm/lass/2configs/bitlbee.nix>
<stockholm/lass/2configs/weechat.nix>
<stockholm/lass/2configs/privoxy-retiolum.nix>
<stockholm/lass/2configs/radio.nix>
<stockholm/lass/2configs/repo-sync.nix>
<stockholm/lass/2configs/binary-cache/server.nix>
<stockholm/lass/2configs/iodined.nix>
<stockholm/lass/2configs/libvirt.nix>
<stockholm/lass/2configs/hfos.nix>
<stockholm/lass/2configs/monitoring/server.nix>
<stockholm/lass/2configs/monitoring/monit-alarms.nix>
<stockholm/lass/2configs/paste.nix>
<stockholm/lass/2configs/syncthing.nix>
<stockholm/lass/2configs/coders-irc.nix>
<stockholm/lass/2configs/ciko.nix>
2017-07-23 19:43:12 +00:00
<stockholm/lass/2configs/container-networking.nix>
2017-06-20 18:17:43 +00:00
{
lass . pyload . enable = true ;
}
2017-01-31 16:14:30 +00:00
{
imports = [
2017-07-11 09:26:24 +00:00
<stockholm/lass/2configs/bepasty.nix>
2017-01-31 16:14:30 +00:00
] ;
krebs . bepasty . servers . " p a s t e . r " . nginx . extraConfig = ''
if ( $ server_addr = " ${ config . krebs . build . host . nets . internet . ip4 . addr } " ) {
return 403 ;
}
'' ;
}
2015-10-30 15:05:51 +00:00
{
users . extraGroups = {
# ● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
# Loaded: loaded (/nix/store/2l33gg7nmncqkpysq9f5fxyhlw6ncm2j-systemd-217/example/systemd/system/systemd-tmpfiles-setup.service)
# Active: failed (Result: exit-code) since Mon 2015-03-16 10:29:18 UTC; 4s ago
# Docs: man:tmpfiles.d(5)
# man:systemd-tmpfiles(8)
# Process: 19272 ExecStart=/nix/store/2l33gg7nmncqkpysq9f5fxyhlw6ncm2j-systemd-217/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
# Main PID: 19272 (code=exited, status=1/FAILURE)
#
# Mar 16 10:29:17 cd systemd-tmpfiles[19272]: [/usr/lib/tmpfiles.d/legacy.conf:26] Unknown group 'lock'.
# Mar 16 10:29:18 cd systemd-tmpfiles[19272]: Two or more conflicting lines for /var/log/journal configured, ignoring.
# Mar 16 10:29:18 cd systemd-tmpfiles[19272]: Two or more conflicting lines for /var/log/journal/7b35116927d74ea58785e00b47ac0f0d configured, ignoring.
# Mar 16 10:29:18 cd systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited, status=1/FAILURE
# Mar 16 10:29:18 cd systemd[1]: Failed to start Create Volatile Files and Directories.
# Mar 16 10:29:18 cd systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
# Mar 16 10:29:18 cd systemd[1]: systemd-tmpfiles-setup.service failed.
# warning: error(s) occured while switching to the new configuration
lock . gid = 10001 ;
} ;
}
{
boot . loader . grub = {
devices = [
" / d e v / s d a "
" / d e v / s d b "
] ;
splashImage = null ;
} ;
boot . initrd . availableKernelModules = [
" a t a _ p i i x "
" v m w _ p v s c s i "
] ;
fileSystems . " / " = {
device = " / d e v / p o o l / n i x " ;
fsType = " e x t 4 " ;
} ;
fileSystems . " / b o o t " = {
device = " / d e v / d i s k / b y - u u i d / 7 c a 1 2 d 8 c - 6 0 6 d - 4 1 c e - b 1 0 d - 6 2 b 6 5 4 e 5 0 e 3 6 " ;
} ;
fileSystems . " / v a r / d o w n l o a d " = {
device = " / d e v / p o o l / d o w n l o a d " ;
} ;
2016-04-11 14:43:52 +00:00
fileSystems . " / s r v / h t t p " = {
device = " / d e v / p o o l / h t t p " ;
} ;
fileSystems . " / s r v / o . u b i k m e d i a . d e - d a t a " = {
device = " / d e v / p o o l / o w n c l o u d - u b i k - d a t a " ;
} ;
fileSystems . " / b k u " = {
device = " / d e v / p o o l / b k u " ;
2016-04-08 22:18:51 +00:00
} ;
2016-10-11 15:35:53 +00:00
fileSystems . " / t m p " = {
device = " t m p f s " ;
fsType = " t m p f s " ;
options = [ " n o s u i d " " n o d e v " " n o a t i m e " ] ;
} ;
2015-10-30 15:05:51 +00:00
}
{
sound . enable = false ;
}
2015-11-01 19:00:43 +00:00
{
nixpkgs . config . allowUnfree = true ;
}
2015-11-09 01:33:30 +00:00
{
#stuff for juhulian
users . extraUsers . juhulian = {
name = " j u h u l i a n " ;
uid = 1339 ;
home = " / h o m e / j u h u l i a n " ;
group = " u s e r s " ;
createHome = true ;
useDefaultShell = true ;
extraGroups = [
] ;
openssh . authorizedKeys . keys = [
" s s h - r s a A A A A B 3 N z a C 1 y c 2 E A A A A D A Q A B A A A B A Q D B Q h L G v f v 4 h y Q / n q J G y 1 Y g H X P S V l 6 i g e W T r o J S v A h U F g o h + r G + z v q Y 0 E a h K X N b 3 s q 0 / O Y D C T J V u u c c 0 h g C g 7 T 2 K q T q M t T b 9 E E k R m C F b D 7 F 7 D W Z o j C r h / a n 6 s H n e q T 5 e F v z A P Z 8 E 5 h u p 7 o V Q n j 5 P 5 M 3 I 9 k e R H B W t 1 r q 6 q 0 I c O E h s F v n e 4 q J c 7 3 a L A S T J k x z l o 5 U 8 j u 3 J Q O l 6 4 7 4 E C u S n 0 l b 1 f T r Q / S R 1 N g F 7 j V 1 1 e B l d k S 8 S H E B + 2 G X j n 4 Y r n + Q U K O n D p + B 8 5 v Z m V l J S I + 7 X R 1 / U / x I b t A j G T E m N w B 6 c T b B v 9 N C G 9 j l o D D O Z G 4 Z v z z H Y r l B X j a i g t Q h 2 / 4 m r H o K a 5 e V j u h u l i a n @ j u h u l i a n "
] ;
} ;
krebs . iptables . tables . filter . INPUT . rules = [
{ predicate = " - p u d p - - d p o r t 6 0 0 0 0 : 6 1 0 0 0 " ; target = " A C C E P T " ; }
] ;
}
2015-11-13 00:06:16 +00:00
{
environment . systemPackages = [
pkgs . perlPackages . Plack
] ;
krebs . iptables . tables . filter . INPUT . rules = [
{ predicate = " - p t c p - - d p o r t 8 0 8 0 " ; target = " A C C E P T " ; }
] ;
}
2015-12-12 16:58:21 +00:00
{
users . users . chat . openssh . authorizedKeys . keys = [
2017-04-13 13:25:37 +00:00
" s s h - r s a A A A A B 3 N z a C 1 y c 2 E A A A A D A Q A B A A A C A Q D j e s i O n h p T 9 X g W Z q w / 6 4 M 5 l V Q g 3 q 0 k 2 2 B t M y C v + 3 3 s G X 8 V m f T y D 1 1 G u w S j N G f 5 W i s w K L q F v Y B Q s H f D D t S 3 k 0 Z N T D n c G w 3 P b i l m 6 Q o C u H E y D P a Q Y i n 0 P + J m k o c r L / 6 Q F 5 u h Z V F n s X C H 5 w n t w O a 0 0 V F G w p M g Q Y S f R l R e R x 4 2 P u 9 J k + i J d u Z M R B b O M v J I 6 8 Z 7 i J 4 D g W / 1 U 9 J 4 M Q d C s k 7 Q l F g U s t Q Q f V 1 z k 4 V f V f X u x D P 3 h j x 6 Q 0 5 n D C h j p m z J b F u n z b 7 a i y / 1 / S l 0 Q h R O T p v x r Q L k s g 7 y Y L w 4 B R s 9 p t j e h X 4 5 A 2 S x i 8 W K O b / g 5 u 3 x J N y 0 X 0 7 r E + N + o 5 v 2 h S 7 w F 0 D L Q d K 5 + 4 T G t O + Y + A B U C q q A + T 1 y n A j N B W v s g Y 5 u D 4 P Z j u P g C M S w 0 J B m I y / P 0 T H i 3 v 5 / 8 C o h v f n s p l 7 J p f 8 0 q E N M u 3 u n v v E 9 E e P z g S R Z Y 1 P v D j P Q f k W y 0 y B X 1 y Q M h H u V G k e 9 Q g a l e t i t w u a h R u j m l 3 7 w a e U u O l 8 R p z + 2 i V + 6 O I S 4 t f O 3 6 8 u L F H K W b o b X T b T D X O D B g x Z / I y v O 7 v x M 2 u D X / k I W a e Y K r i p 3 n S y W B Y n i x w r c S 4 v m 6 Z Q c o e j w p 2 K C f G Q w I E 4 M n G Y R l w c O E Y j v y j L k Z H D i Z E i v U Q 0 r T h M Y B z e c 8 b Q 0 8 Q W 8 o x F + N X k F K G 3 a w t 3 f 7 T K T R k Y q Q c O M p F K m V 2 4 K D i w g w m 0 m i Q = = J u i c e S S H "
2015-12-12 16:58:21 +00:00
] ;
}
2015-12-12 16:58:58 +00:00
{
time . timeZone = " E u r o p e / B e r l i n " ;
}
2015-12-12 17:22:47 +00:00
{
imports = [
2017-07-11 09:26:24 +00:00
<stockholm/lass/2configs/websites/domsen.nix>
<stockholm/lass/2configs/websites/lassulus.nix>
2015-12-12 17:22:47 +00:00
] ;
krebs . iptables . tables . filter . INPUT . rules = [
2016-04-08 22:36:38 +00:00
{ predicate = " - p t c p - - d p o r t h t t p " ; target = " A C C E P T " ; }
{ predicate = " - p t c p - - d p o r t h t t p s " ; target = " A C C E P T " ; }
2015-12-12 17:22:47 +00:00
] ;
}
2016-03-06 00:45:57 +00:00
{
services . tor = {
enable = true ;
} ;
}
2016-05-19 22:02:29 +00:00
{
lass . ejabberd = {
enable = true ;
hosts = [ " l a s s u l . u s " ] ;
} ;
krebs . iptables . tables . filter . INPUT . rules = [
{ predicate = " - p t c p - - d p o r t x m p p - c l i e n t " ; target = " A C C E P T " ; }
{ predicate = " - p t c p - - d p o r t x m p p - s e r v e r " ; target = " A C C E P T " ; }
] ;
}
2016-05-24 21:55:11 +00:00
{
imports = [
2017-07-11 09:26:24 +00:00
<stockholm/lass/2configs/realwallpaper.nix>
2016-05-24 21:55:11 +00:00
] ;
2016-12-26 13:18:08 +00:00
services . nginx . virtualHosts . " l a s s u l . u s " . locations . " / w a l l p a p e r . p n g " . extraConfig = ''
2017-04-15 15:16:20 +00:00
alias /var/realwallpaper/realwallpaper.png ;
2016-12-26 13:18:08 +00:00
'' ;
2016-05-24 21:55:11 +00:00
}
2016-07-08 11:42:12 +00:00
{
environment . systemPackages = with pkgs ; [
mk_sql_pair
] ;
}
2016-07-10 16:06:50 +00:00
{
users . users . tv = {
uid = genid " t v " ;
2016-07-18 22:01:17 +00:00
inherit ( config . krebs . users . tv ) home ;
2016-07-10 16:06:50 +00:00
group = " u s e r s " ;
createHome = true ;
useDefaultShell = true ;
openssh . authorizedKeys . keys = [
config . krebs . users . tv . pubkey
] ;
} ;
2017-07-20 12:49:18 +00:00
users . users . makefu = {
uid = genid " m a k e f u " ;
isNormalUser = true ;
openssh . authorizedKeys . keys = [
config . krebs . users . makefu . pubkey
] ;
} ;
users . users . nin = {
uid = genid " n i n " ;
inherit ( config . krebs . users . nin ) home ;
group = " u s e r s " ;
createHome = true ;
useDefaultShell = true ;
openssh . authorizedKeys . keys = [
config . krebs . users . nin . pubkey
] ;
extraGroups = [
" l i b v i r t d "
] ;
} ;
2016-07-10 16:06:50 +00:00
}
2016-09-08 19:01:55 +00:00
{
krebs . repo-sync . timerConfig = {
2017-03-08 00:06:04 +00:00
OnBootSec = " 1 5 m i n " ;
OnUnitInactiveSec = " 9 0 m i n " ;
RandomizedDelaySec = " 3 0 m i n " ;
} ;
krebs . repo-sync . repos . stockholm . timerConfig = {
2017-03-04 23:21:53 +00:00
OnBootSec = " 5 m i n " ;
2017-03-08 00:06:04 +00:00
OnUnitInactiveSec = " 2 m i n " ;
2017-02-07 16:13:07 +00:00
RandomizedDelaySec = " 2 m i n " ;
2016-09-08 19:01:55 +00:00
} ;
2017-07-02 22:07:38 +00:00
krebs . repo-sync . repos . nixpkgs . timerConfig = {
OnBootSec = " 9 0 m i n " ;
OnUnitInactiveSec = " 2 4 h " ;
} ;
2016-09-08 19:01:55 +00:00
}
2016-10-27 10:49:48 +00:00
{
lass . usershadow = {
enable = true ;
} ;
}
2017-04-13 13:25:28 +00:00
{
krebs . Reaktor . prism = {
nickname = " R e a k t o r | l a s s " ;
channels = [ " # r e t i o l u m " ] ;
extraEnviron = {
REAKTOR_HOST = " n i . r " ;
} ;
plugins = with pkgs . ReaktorPlugins ; [
sed-plugin
] ;
} ;
}
2017-04-30 16:48:54 +00:00
{
#stuff for dritter
users . extraUsers . dritter = {
name = " d r i t t e r " ;
uid = genid " d r i t t e r " ;
home = " / h o m e / d r i t t e r " ;
group = " u s e r s " ;
createHome = true ;
useDefaultShell = true ;
extraGroups = [
" d o w n l o a d "
] ;
openssh . authorizedKeys . keys = [
" s s h - r s a A A A A B 3 N z a C 1 y c 2 E A A A A D A Q A B A A A B A Q D n q O W D D k 7 Q k S A v r S L k E o z 7 d Y 2 2 + x P y v 5 J D n 2 z l f U n d f a v m T M f Z v P x 9 R E M j g U L b c C S M 4 m 3 N c f 4 0 y U j c i D p V l e G o E z 8 2 + p / O b H A k V W P Q y X R S 3 Z R M 2 I J J u l t B H E F c 6 1 + 6 1 P i 8 k 3 p 5 p B h P P a i g 6 V n c J 4 u U u u N q e n 9 j q L e s S T V X N t d n t U 2 I v n C 8 B 8 k 1 K q 6 f u 9 q 1 T 2 y E O M x k D 3 1 D 5 h V H l q A l y 0 L d R i Y v t s R I o C S m R v l p G l 7 0 u v P p r h Q x h t o i E U e D q m I L 7 B G 9 x 7 g U 0 S w d l 7 R 0 / H t F X l F u O w S l N Y D m O f / Z r b 1 j h O p j 4 A l C l i G U k M 0 i K I J h g H 0 t n J n a 6 k f k G K H D w u z I T G I h 6 S p Z d r i t t e r @ J a n e w a y "
] ;
} ;
}
2017-07-23 19:42:28 +00:00
{
#hotdog
containers . hotdog = {
config = { . . . }: {
services . openssh . enable = true ;
users . users . root . openssh . authorizedKeys . keys = [
config . krebs . users . lass . pubkey
] ;
} ;
enableTun = true ;
privateNetwork = true ;
hostAddress = " 1 0 . 2 3 3 . 2 . 1 " ;
localAddress = " 1 0 . 2 3 3 . 2 . 2 " ;
} ;
}
2015-10-30 15:05:51 +00:00
] ;
krebs . build . host = config . krebs . hosts . prism ;
}