2015-07-16 15:52:17 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2016-10-20 20:54:38 +02:00
|
|
|
with import <stockholm/lib>;
|
2015-07-16 15:52:17 +02:00
|
|
|
{
|
|
|
|
imports = [
|
2017-07-11 11:26:24 +02:00
|
|
|
<stockholm/lass>
|
2017-07-23 21:10:50 +02:00
|
|
|
|
|
|
|
<stockholm/lass/2configs/mouse.nix>
|
2017-07-11 11:26:24 +02:00
|
|
|
<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-04 00:16:54 +02:00
|
|
|
<stockholm/krebs/2configs/ircd.nix>
|
2017-07-11 11:26:24 +02:00
|
|
|
<stockholm/lass/2configs/logf.nix>
|
|
|
|
<stockholm/lass/2configs/syncthing.nix>
|
2017-07-17 15:11:54 +02:00
|
|
|
<stockholm/lass/2configs/otp-ssh.nix>
|
2017-09-03 10:36:14 +02:00
|
|
|
<stockholm/lass/2configs/c-base.nix>
|
2017-11-12 13:01:59 +01:00
|
|
|
<stockholm/lass/2configs/br.nix>
|
2018-01-03 18:23:22 +01:00
|
|
|
<stockholm/lass/2configs/ableton.nix>
|
2018-06-25 10:17:58 +02:00
|
|
|
<stockholm/lass/2configs/starcraft.nix>
|
2018-02-13 17:13:18 +01:00
|
|
|
<stockholm/lass/2configs/dunst.nix>
|
2018-02-13 17:13:55 +01:00
|
|
|
<stockholm/lass/2configs/rtl-sdr.nix>
|
2018-04-27 16:55:43 +02:00
|
|
|
<stockholm/lass/2configs/backup.nix>
|
2018-08-14 14:15:14 +02:00
|
|
|
<stockholm/lass/2configs/print.nix>
|
2015-11-13 01:12:07 +01:00
|
|
|
{
|
|
|
|
krebs.iptables.tables.filter.INPUT.rules = [
|
2018-05-04 20:30:19 +02:00
|
|
|
#risk of rain
|
2015-11-13 01:12:07 +01:00
|
|
|
{ predicate = "-p tcp --dport 11100"; target = "ACCEPT"; }
|
2018-05-04 20:30:19 +02:00
|
|
|
#chromecast
|
|
|
|
{ predicate = "-p udp -m multiport --sports 32768:61000 -m multiport --dports 32768:61000"; target = "ACCEPT"; }
|
2018-09-08 22:54:29 +02:00
|
|
|
#quake3
|
|
|
|
{ predicate = "-p tcp --dport 27950:27965"; target = "ACCEPT"; }
|
|
|
|
{ predicate = "-p udp --dport 27950:27965"; target = "ACCEPT"; }
|
2015-11-13 01:12:07 +01:00
|
|
|
];
|
|
|
|
}
|
2016-07-05 09:18:16 +02:00
|
|
|
{
|
|
|
|
lass.umts = {
|
|
|
|
enable = true;
|
2017-09-19 20:07:05 +02:00
|
|
|
modem = "/dev/serial/by-id/usb-Lenovo_F5521gw_2C7D8D7C35FC7040-if09";
|
2016-07-05 09:18:16 +02:00
|
|
|
initstrings = ''
|
|
|
|
Init1 = AT+CFUN=1
|
|
|
|
Init2 = AT+CGDCONT=1,"IP","pinternet.interkom.de","",0,0
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
2016-08-29 10:58:46 +02:00
|
|
|
{
|
2016-12-26 14:18:08 +01:00
|
|
|
services.nginx = {
|
2016-08-29 10:58:46 +02:00
|
|
|
enable = true;
|
2016-12-26 14:18:08 +01:00
|
|
|
virtualHosts.default = {
|
2018-07-13 16:10:38 +02:00
|
|
|
default = true;
|
2016-12-26 14:18:08 +01:00
|
|
|
serverAliases = [
|
2016-12-22 23:23:59 +01:00
|
|
|
"localhost"
|
|
|
|
"${config.krebs.build.host.name}"
|
|
|
|
"${config.krebs.build.host.name}.r"
|
|
|
|
];
|
2016-12-26 14:18:08 +01:00
|
|
|
locations."~ ^/~(.+?)(/.*)?\$".extraConfig = ''
|
|
|
|
alias /home/$1/public_html$2;
|
|
|
|
'';
|
2016-12-22 23:23:59 +01:00
|
|
|
};
|
2016-08-29 10:58:46 +02:00
|
|
|
};
|
|
|
|
}
|
2016-10-20 21:05:56 +02:00
|
|
|
{
|
|
|
|
services.redis.enable = true;
|
2016-12-04 20:40:11 +01:00
|
|
|
}
|
2017-02-13 16:16:01 +01:00
|
|
|
{
|
|
|
|
environment.systemPackages = [
|
2017-06-18 14:00:05 +02:00
|
|
|
pkgs.ovh-zone
|
2018-09-09 20:49:22 +02:00
|
|
|
pkgs.bank
|
2018-10-04 12:36:23 +02:00
|
|
|
pkgs.adb-sync
|
2017-02-13 16:16:01 +01:00
|
|
|
];
|
|
|
|
}
|
2017-04-16 23:35:02 +02:00
|
|
|
{
|
|
|
|
services.tor = {
|
|
|
|
enable = true;
|
|
|
|
client.enable = true;
|
|
|
|
};
|
|
|
|
}
|
2015-07-16 15:52:17 +02:00
|
|
|
];
|
|
|
|
|
2015-10-19 14:00:15 +02:00
|
|
|
krebs.build.host = config.krebs.hosts.mors;
|
2015-07-27 13:54:29 +02:00
|
|
|
|
2015-07-16 15:52:17 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
2016-03-15 14:12:13 +01:00
|
|
|
acronym
|
2017-06-20 19:46:37 +02:00
|
|
|
brain
|
2016-02-06 19:26:51 +01:00
|
|
|
cac-api
|
2015-10-03 14:37:34 +02:00
|
|
|
sshpass
|
2015-09-30 15:18:31 +02:00
|
|
|
get
|
2015-10-15 14:44:14 +02:00
|
|
|
teamspeak_client
|
2015-11-01 20:00:19 +01:00
|
|
|
hashPassword
|
2016-04-13 16:47:47 +02:00
|
|
|
urban
|
|
|
|
mk_sql_pair
|
2016-06-01 00:10:13 +02:00
|
|
|
remmina
|
2016-08-29 10:59:03 +02:00
|
|
|
|
2016-10-01 02:13:47 +02:00
|
|
|
iodine
|
2016-10-02 12:38:04 +02:00
|
|
|
|
|
|
|
macchanger
|
2017-09-19 20:11:43 +02:00
|
|
|
dpass
|
2017-11-12 13:02:21 +01:00
|
|
|
|
|
|
|
dnsutils
|
2018-04-27 19:16:12 +02:00
|
|
|
woeusb
|
|
|
|
l-gen-secrets
|
2018-04-05 17:44:34 +02:00
|
|
|
generate-secrets
|
2018-04-20 23:27:53 +02: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 15:52:17 +02: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 17:25:12 +02:00
|
|
|
krebs.repo-sync.timerConfig = {
|
|
|
|
OnCalendar = "00:37";
|
|
|
|
};
|
2017-10-09 13:19:27 +02:00
|
|
|
|
2018-01-20 13:03:21 +01:00
|
|
|
nix.package = pkgs.nixUnstable;
|
2017-11-12 13:02:48 +01:00
|
|
|
programs.adb.enable = true;
|
2018-02-13 17:06:02 +01:00
|
|
|
users.users.mainUser.extraGroups = [ "adbusers" "docker" ];
|
|
|
|
virtualisation.docker.enable = true;
|
2018-04-27 19:10:49 +02:00
|
|
|
services.redshift = {
|
|
|
|
enable = true;
|
|
|
|
provider = "geoclue2";
|
|
|
|
};
|
2018-04-20 23:28:39 +02: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 17:29:32 +02:00
|
|
|
virtualisation.libvirtd.enable = true;
|
2018-07-03 20:35:11 +02:00
|
|
|
|
|
|
|
services.earlyoom = {
|
|
|
|
enable = true;
|
|
|
|
freeMemThreshold = 5;
|
|
|
|
};
|
2015-07-16 15:52:17 +02:00
|
|
|
}
|