2015-06-14 17:19:45 +00:00
{ config , lib , pkgs , . . . }:
2015-03-19 22:04:35 +00:00
{
imports =
[
2015-05-21 20:33:16 +00:00
<secrets/hashedPasswords.nix>
2015-04-07 23:07:01 +00:00
./iptables.nix
./networking.nix
2015-05-19 20:04:36 +00:00
../common/nixpkgs.nix
2015-04-07 23:26:30 +00:00
../tv/base.nix
2015-04-07 23:07:01 +00:00
../tv/base-cac-CentOS-7-64bit.nix
../tv/ejabberd.nix # XXX echtes modul
../tv/exim-smarthost.nix
2015-06-14 17:15:56 +00:00
../tv/git.nix
2015-04-07 23:07:01 +00:00
../tv/retiolum.nix
../tv/sanitize.nix
2015-03-19 22:04:35 +00:00
] ;
# "Developer 2" plan has two vCPUs.
nix . maxJobs = 2 ;
2015-05-19 20:04:36 +00:00
nixpkgs = {
url = " h t t p s : / / g i t h u b . c o m / N i x O S / n i x p k g s " ;
rev = " 4 c 0 1 e 6 d 9 1 9 9 3 b 6 d e 1 2 8 7 9 5 f 4 f b d d 2 5 f 6 2 2 7 f b 8 7 0 " ;
} ;
2015-03-19 22:04:35 +00:00
environment . systemPackages = with pkgs ; [
2015-05-19 20:04:36 +00:00
git # required for ./deploy, clone_or_update
2015-03-19 22:04:35 +00:00
htop
iftop
iotop
2015-04-02 17:08:42 +00:00
iptables
2015-03-24 17:31:39 +00:00
mutt # for mv
2015-03-19 22:04:35 +00:00
nethogs
rxvt_unicode . terminfo
tcpdump
] ;
security . rtkit . enable = false ;
services . cron . enable = false ;
2015-03-24 17:30:57 +00:00
services . ejabberd-cd = {
enable = true ;
} ;
2015-03-19 22:04:35 +00:00
2015-06-14 17:19:45 +00:00
services . git =
let
inherit ( builtins ) readFile ;
# TODO lib should already include our stuff
inherit ( import ../../lib { inherit lib ; } ) addNames git ;
in
rec {
enable = true ;
users = addNames {
tv = { pubkey = readFile <pubkeys/tv.ssh.pub> ; } ;
lass = { pubkey = " x x x " ; } ;
makefu = { pubkey = " x x x " ; } ;
} ;
# TODO warn about stale repodirs
repos = addNames {
testing = {
# TODO hooks = { post-receive = ...
} ;
} ;
rules = with git ; with users ; with repos ; [
{ user = tv ;
repo = testing ;
perm = push master [ non-fast-forward create delete merge ] ;
}
{ user = [ lass makefu ] ;
repo = testing ;
perm = fetch ;
}
] ;
} ;
2015-03-19 22:04:35 +00:00
services . journald . extraConfig = ''
SystemMaxUse = 1 G
RuntimeMaxUse = 1 2 8 M
'' ;
services . ntp . enable = false ;
services . openssh = {
enable = true ;
hostKeys = [
# XXX bits here make no science
{ bits = 8192 ; type = " e d 2 5 5 1 9 " ; path = " / e t c / s s h / s s h _ h o s t _ e d 2 5 5 1 9 _ k e y " ; }
] ;
permitRootLogin = " y e s " ;
} ;
services . retiolum = {
enable = true ;
2015-04-07 23:07:01 +00:00
hosts = /etc/nixos/hosts ;
2015-03-19 22:04:35 +00:00
privateKeyFile = " / e t c / n i x o s / s e c r e t s / c d . r e t i o l u m . r s a _ k e y . p r i v " ;
connectTo = [
" f a s t p o k e "
" p i g s t a r t e r "
" i r e "
] ;
} ;
sound . enable = false ;
# TODO replace by ./modules/cd-users.nix
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 ;
} ;
users . extraUsers =
{
root = {
openssh . authorizedKeys . keys = [
" s s h - e d 2 5 5 1 9 A A A A C 3 N z a C 1 l Z D I 1 N T E 5 A A A A I E i e A i h h + o 2 0 8 a e C A 1 4 f A t j z y Z N / n r p O J t 2 v Z 5 V Y Z p 6 9 d e p l o y @ w u "
2015-05-09 16:02:00 +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 E A Q D F R / / R n C v E Z A t 0 F 6 E x D s a t K Z / D D d i f a n u S L 3 6 0 m q O h a F i e K I 3 4 R o O w f Q T 9 T + G a 5 2 V h 5 V 2 L a 6 e s v l p h 6 8 6 E d g z e K L v D o x E w F M 9 Z Y F B c M r N z u 4 b M T l g E 7 Y U Y w 5 J i O R y X N f z n B G n m e 6 q p u v x 9 i b Y h U y i Z o 9 9 k M 8 y s 5 Y r U H r P 2 J X Q J M e z D F Z H x T 4 G F M O u S d h / 1 d a G o K K D 6 h Y L / j E H X 8 C I 4 E 3 B S m K K 6 y g Y r 1 f V X 0 K 0 T v 7 7 l I i 5 m L X u c j R 7 C y t W Y W Y n h M 6 D C 3 H x p v 2 z R k P g f 3 k 0 x / Y 1 h r w 3 V / r 0 M e 5 h 9 0 p d 2 C 8 p F a W A 2 Z o U T / f m y V q v x 1 t Z P Y T o U / O 2 d M I t Y 0 z g x 2 k R 0 y D + 6 g 7 A a h z 3 R + K l X k V 8 k 5 c 8 b b T b f G n Z W D R 1 Z l b L R M 9 Y t 5 v o s f w a p U D 9 0 M m V k p m R 3 w U k O 2 s U K i 8 0 Q f C 7 b 4 K v S D X Q + M I m b G x M a U 5 B n s q 1 P q L N 9 5 q + u a t 3 n l A V B A E L k c x 5 1 F l E 9 C a I S 6 5 y 4 J 7 F E D g 8 B E 5 J e u C N s h h 6 2 V S Y R X V S F t 8 b k 3 f / T F G g z C 8 O I o 1 4 B h V m i R Q Q 5 0 3 Z 1 s R O y f 5 x L X 2 a / E J a v M m 1 i 2 B s 2 T H 6 R O K Y 9 z 5 P z 8 h T 5 U S 0 r 3 8 1 V 8 o G 7 T Z y L F 9 H T t o y 3 w C Y s g W A 5 E m L a n j A s V U 2 Y E e A A 0 r x z d t Y P 8 Y 2 o k F i J 6 u + M 4 H Q Z 3 W g 3 p e S o d y p 3 v x d Y c e 2 v k 4 E K e q E F u u S 8 2 8 5 0 D Y b 7 E t 7 f m p + w Q Q U T 8 Q / b M O 0 D r e W j H o M M 5 l E 4 L J 4 M E 6 A x k s m M i F t f o / 4 F e 2 q 9 D + L A q Z + A N O c v 9 M + 8 R n 6 n g i Y m u R N d 0 l / a 0 2 q 1 P E v O 6 v T f X g c l 4 f 7 Z 1 I U L H P E a D N Z H C J S 1 K 5 R X Y F q Y Q 6 O H s T m O m 7 h n w a R A S 9 7 + V F M o 1 i 5 u v T x 9 n Y a A c Y 7 y z q 3 C k f b 6 7 d M B K A p G O p J p k v P g f r P 7 b g B O 5 r O Z X M 1 o p X q V P b 0 9 n l j A h h A h y C T h 1 e / 8 + m J r B o 0 c L Q / L u p Q z V x G D g m 3 a w S M P x s Z A N 4 5 P S W z 7 6 z z x d D a 1 M M o 5 1 d o + V J H f s 7 W l 0 N c X A Q r n i O B Y L 9 W q t 0 q N k n 1 g Y 5 s m k k I S G e Q / v x N a p 4 M m z e Z E 7 b 5 f p O y + 2 f p c R V Q L p c 4 n o o Q z J v S V T F z + 2 5 l g Z 6 i H f 4 5 K 8 7 g Q F M I A r i 1 P f / E D D p L 8 7 a z + b R W v W i + B A 2 k M e 1 k f + A y 1 L y M z 8 r + g 5 1 H 0 m a 0 b N F h 6 + f b W M f U i D 9 J C e p I O b c l n U J 4 N l W f c g H x T f 1 7 d / 4 t l 6 z 4 D T c L p C C k 8 D a 7 7 J o u S H g v t c R b R l F V 1 O f h W Z L X U s r l f p a Q T i I t v 6 T G I r 3 k 7 + 7 b 6 6 o 3 Q w / G Q V s 5 G m Y i f a I Z I z 8 n 8 m y 4 X j k a M B d 0 S Z f B z z v F j H M q 6 Y U P 9 + S b j v R e q o f u o O + 5 t W 1 w T Y Z X i t F F B f w u H l X m 6 w 7 7 K 5 Q D B W 6 o l T 7 p a t 4 1 / F 5 e G x L c z t v @ w u "
2015-03-19 22:04:35 +00:00
] ;
} ;
2015-03-24 17:31:39 +00:00
mv = rec {
name = " m v " ;
uid = 1338 ;
group = " u s e r s " ;
home = " / h o m e / ${ name } " ;
createHome = true ;
useDefaultShell = true ;
openssh . authorizedKeys . keys = [
" s s h - e d 2 5 5 1 9 A A A A C 3 N z a C 1 l Z D I 1 N T E 5 A A A A I G e r 9 e 2 + L e w 7 v n i s g B b s F N E C E I k p N J g E a q Q q g b 9 i n W k Q m v @ v o d "
] ;
} ;
2015-03-19 22:04:35 +00:00
} ;
2015-03-24 17:31:39 +00:00
2015-03-19 22:04:35 +00:00
users . mutableUsers = false ;
}