stockholm/tv/1systems/nomic.nix

110 lines
2.1 KiB
Nix
Raw Normal View History

2015-07-11 14:55:22 +00:00
{ config, lib, pkgs, ... }:
with lib;
{
krebs.build.host = config.krebs.hosts.nomic;
2015-07-27 02:33:37 +00:00
krebs.build.user = config.krebs.users.tv;
krebs.build.target = "root@nomic.gg23";
2015-09-26 22:22:50 +00:00
krebs.build.source = {
git.nixpkgs = {
url = https://github.com/NixOS/nixpkgs;
rev = "c44a593aa43bba6a0708f6f36065a514a5110613";
2015-07-27 02:33:37 +00:00
};
2015-09-26 22:22:50 +00:00
dir.secrets = {
path = "/home/tv/secrets/nomic";
2015-07-27 02:33:37 +00:00
};
2015-09-26 22:22:50 +00:00
dir.stockholm = {
path = "/home/tv/stockholm";
2015-07-27 02:33:37 +00:00
};
};
2015-07-11 14:55:22 +00:00
imports = [
2015-10-29 00:09:54 +00:00
../2configs/hw/AO753.nix
2015-08-29 07:02:00 +00:00
#../2configs/consul-server.nix
2015-07-28 18:40:25 +00:00
../2configs/git.nix
2015-07-11 14:55:22 +00:00
{
tv.iptables = {
enable = true;
input-internet-accept-new-tcp = [
"ssh"
"http"
"tinc"
"smtp"
];
};
}
2015-08-13 09:46:09 +00:00
{
krebs.exim-retiolum.enable = true;
2015-08-13 09:46:09 +00:00
}
2015-07-11 14:55:22 +00:00
{
2015-07-24 09:50:23 +00:00
krebs.nginx = {
2015-07-11 14:55:22 +00:00
enable = true;
servers.default.locations = [
2015-07-11 14:55:22 +00:00
(nameValuePair "~ ^/~(.+?)(/.*)?\$" ''
alias /home/$1/public_html$2;
'')
];
};
}
{
2015-07-24 10:34:25 +00:00
krebs.retiolum = {
2015-07-11 14:55:22 +00:00
enable = true;
connectTo = [
"gum"
"pigstarter"
];
};
}
];
boot.initrd.luks = {
2015-10-21 23:25:44 +00:00
cryptoModules = [ "aes" "sha512" "xts" ];
2015-07-11 14:55:22 +00:00
devices = [
2015-10-21 23:25:44 +00:00
{ name = "luks1"; device = "/dev/sda2"; }
2015-07-11 14:55:22 +00:00
];
};
fileSystems."/" =
2015-10-21 23:25:44 +00:00
{ device = "/dev/mapper/nomic1-root";
2015-07-11 14:55:22 +00:00
fsType = "btrfs";
};
fileSystems."/boot" =
2015-10-21 23:25:44 +00:00
{ device = "/dev/sda1";
2015-07-11 14:55:22 +00:00
fsType = "ext4";
};
fileSystems."/home" =
2015-10-21 23:25:44 +00:00
{ device = "/dev/mapper/nomic1-home";
2015-07-11 14:55:22 +00:00
fsType = "btrfs";
};
swapDevices = [ ];
# TODO base
boot.tmpOnTmpfs = true;
environment.systemPackages = with pkgs; [
(writeScriptBin "play" ''
#! /bin/sh
set -euf
mpv() { exec ${mpv}/bin/mpv "$@"; }
case $1 in
deepmix) mpv http://deepmix.ru/deepmix128.pls;;
groovesalad) mpv http://somafm.com/play/groovesalad;;
ntslive) mpv http://listen2.ntslive.co.uk/listen.pls;;
*)
echo "$0: bad argument: $*" >&2
exit 23
esac
'')
2015-09-26 22:39:03 +00:00
gnupg
2015-08-29 06:57:53 +00:00
ntp # ntpate
2015-07-11 14:55:22 +00:00
rxvt_unicode.terminfo
tmux
];
}