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

190 lines
4.9 KiB
Nix
Raw Normal View History

2015-07-16 13:52:17 +00:00
{ config, pkgs, ... }:
2016-10-20 18:54:38 +00:00
with import <stockholm/lib>;
2015-07-16 13:52:17 +00:00
{
imports = [
<stockholm/lass>
2017-07-23 19:10:50 +00:00
<stockholm/lass/2configs/mouse.nix>
<stockholm/lass/2configs/retiolum.nix>
<stockholm/lass/2configs/baseX.nix>
<stockholm/lass/2configs/exim-retiolum.nix>
<stockholm/lass/2configs/programs.nix>
<stockholm/lass/2configs/bitcoin.nix>
<stockholm/lass/2configs/browsers.nix>
<stockholm/lass/2configs/games.nix>
<stockholm/lass/2configs/pass.nix>
<stockholm/lass/2configs/elster.nix>
<stockholm/lass/2configs/steam.nix>
<stockholm/lass/2configs/wine.nix>
<stockholm/lass/2configs/git.nix>
<stockholm/lass/2configs/virtualbox.nix>
<stockholm/lass/2configs/fetchWallpaper.nix>
<stockholm/lass/2configs/mail.nix>
2017-09-03 22:16:54 +00:00
<stockholm/krebs/2configs/ircd.nix>
<stockholm/lass/2configs/logf.nix>
<stockholm/lass/2configs/syncthing.nix>
2017-07-17 13:11:54 +00:00
<stockholm/lass/2configs/otp-ssh.nix>
2017-09-03 08:36:14 +00:00
<stockholm/lass/2configs/c-base.nix>
2017-11-12 12:01:59 +00:00
<stockholm/lass/2configs/br.nix>
2018-01-03 17:23:22 +00:00
<stockholm/lass/2configs/ableton.nix>
2018-06-25 08:17:58 +00:00
<stockholm/lass/2configs/starcraft.nix>
2018-02-13 16:13:18 +00:00
<stockholm/lass/2configs/dunst.nix>
2018-02-13 16:13:55 +00:00
<stockholm/lass/2configs/rtl-sdr.nix>
2018-04-27 14:55:43 +00:00
<stockholm/lass/2configs/backup.nix>
2018-08-14 12:15:14 +00:00
<stockholm/lass/2configs/print.nix>
2018-11-20 00:12:28 +00:00
<stockholm/lass/2configs/blue-host.nix>
2018-12-12 14:35:15 +00:00
<stockholm/lass/2configs/network-manager.nix>
{
krebs.iptables.tables.filter.INPUT.rules = [
2018-05-04 18:30:19 +00:00
#risk of rain
{ predicate = "-p tcp --dport 11100"; target = "ACCEPT"; }
2018-05-04 18:30:19 +00:00
#chromecast
{ predicate = "-p udp -m multiport --sports 32768:61000 -m multiport --dports 32768:61000"; target = "ACCEPT"; }
2018-09-08 20:54:29 +00:00
#quake3
{ predicate = "-p tcp --dport 27950:27965"; target = "ACCEPT"; }
{ predicate = "-p udp --dport 27950:27965"; target = "ACCEPT"; }
];
}
2016-07-05 07:18:16 +00:00
{
lass.umts = {
enable = true;
2017-09-19 18:07:05 +00:00
modem = "/dev/serial/by-id/usb-Lenovo_F5521gw_2C7D8D7C35FC7040-if09";
2016-07-05 07:18:16 +00:00
initstrings = ''
Init1 = AT+CFUN=1
Init2 = AT+CGDCONT=1,"IP","pinternet.interkom.de","",0,0
'';
};
}
2016-08-29 08:58:46 +00:00
{
2016-12-26 13:18:08 +00:00
services.nginx = {
2016-08-29 08:58:46 +00:00
enable = true;
2016-12-26 13:18:08 +00:00
virtualHosts.default = {
default = true;
2016-12-26 13:18:08 +00:00
serverAliases = [
2016-12-22 22:23:59 +00:00
"localhost"
"${config.krebs.build.host.name}"
"${config.krebs.build.host.name}.r"
];
2016-12-26 13:18:08 +00:00
locations."~ ^/~(.+?)(/.*)?\$".extraConfig = ''
alias /home/$1/public_html$2;
'';
2016-12-22 22:23:59 +00:00
};
2016-08-29 08:58:46 +00:00
};
}
2016-10-20 19:05:56 +00:00
{
services.redis.enable = true;
}
2017-02-13 15:16:01 +00:00
{
environment.systemPackages = [
2017-06-18 12:00:05 +00:00
pkgs.ovh-zone
2018-09-09 18:49:22 +00:00
pkgs.bank
2018-10-04 10:36:23 +00:00
pkgs.adb-sync
2017-02-13 15:16:01 +00:00
];
}
2017-04-16 21:35:02 +00:00
{
services.tor = {
enable = true;
client.enable = true;
};
}
2015-07-16 13:52:17 +00:00
];
2015-10-19 12:00:15 +00:00
krebs.build.host = config.krebs.hosts.mors;
2015-07-27 11:54:29 +00:00
2015-07-16 13:52:17 +00:00
environment.systemPackages = with pkgs; [
2016-03-15 13:12:13 +00:00
acronym
2017-06-20 17:46:37 +00:00
brain
2016-02-06 18:26:51 +00:00
cac-api
2015-10-03 12:37:34 +00:00
sshpass
2015-09-30 13:18:31 +00:00
get
2015-10-15 12:44:14 +00:00
teamspeak_client
hashPassword
2016-04-13 14:47:47 +00:00
urban
mk_sql_pair
2016-05-31 22:10:13 +00:00
remmina
2018-12-02 04:44:37 +00:00
transmission
2016-08-29 08:59:03 +00:00
2016-10-01 00:13:47 +00:00
iodine
2016-10-02 10:38:04 +00:00
macchanger
2017-09-19 18:11:43 +00:00
dpass
2017-11-12 12:02:21 +00:00
dnsutils
2018-04-27 17:16:12 +00:00
woeusb
l-gen-secrets
2018-04-05 15:44:34 +00:00
generate-secrets
2018-04-20 21:27:53 +00:00
(pkgs.writeDashBin "btc-coinbase" ''
${pkgs.curl}/bin/curl -Ss 'https://api.coinbase.com/v2/prices/spot?currency=EUR' | ${pkgs.jq}/bin/jq '.data.amount'
'')
(pkgs.writeDashBin "btc-wex" ''
${pkgs.curl}/bin/curl -Ss 'https://wex.nz/api/3/ticker/btc_eur' | ${pkgs.jq}/bin/jq '.btc_eur.avg'
'')
(pkgs.writeDashBin "btc-kraken" ''
${pkgs.curl}/bin/curl -Ss 'https://api.kraken.com/0/public/Ticker?pair=BTCEUR' | ${pkgs.jq}/bin/jq '.result.XXBTZEUR.a[0]'
'')
2015-07-16 13:52:17 +00:00
];
#TODO: fix this shit
##fprint stuff
##sudo fprintd-enroll $USER to save fingerprints
#services.fprintd.enable = true;
#security.pam.services.sudo.fprintAuth = true;
users.extraGroups = {
loot = {
members = [
config.users.extraUsers.mainUser.name
"firefox"
"chromium"
"google"
"virtual"
];
};
};
2016-06-28 15:25:12 +00:00
krebs.repo-sync.timerConfig = {
OnCalendar = "00:37";
};
2017-10-09 11:19:27 +00:00
2017-11-12 12:02:48 +00:00
programs.adb.enable = true;
2018-02-13 16:06:02 +00:00
users.users.mainUser.extraGroups = [ "adbusers" "docker" ];
virtualisation.docker.enable = true;
2018-04-20 21:28:39 +00:00
lass.restic = genAttrs [
"daedalus"
"icarus"
"littleT"
"prism"
"shodan"
"skynet"
] (dest: {
dirs = [
"/home/lass/src"
"/home/lass/work"
"/home/lass/.gnupg"
"/home/lass/Maildir"
"/home/lass/stockholm"
"/home/lass/.password-store"
"/home/bitcoin"
"/home/bch"
];
passwordFile = (toString <secrets>) + "/restic/${dest}";
repo = "sftp:backup@${dest}.r:/backups/mors";
#sshPrivateKey = config.krebs.build.host.ssh.privkey.path;
extraArguments = [
"sftp.command='ssh backup@${dest}.r -i ${config.krebs.build.host.ssh.privkey.path} -s sftp'"
];
timerConfig = {
OnCalendar = "00:05";
RandomizedDelaySec = "5h";
};
});
2018-05-16 15:29:32 +00:00
virtualisation.libvirtd.enable = true;
2018-07-03 18:35:11 +00:00
services.earlyoom = {
enable = true;
freeMemThreshold = 5;
};
2015-07-16 13:52:17 +00:00
}