2016-03-11 01:10:34 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
2016-10-20 18:54:38 +00:00
|
|
|
with import <stockholm/lib>;
|
2016-03-16 07:41:13 +00:00
|
|
|
let
|
2017-11-08 09:50:42 +00:00
|
|
|
# all the good stuff resides in /data
|
|
|
|
|
2016-03-16 07:41:13 +00:00
|
|
|
byid = dev: "/dev/disk/by-id/" + dev;
|
2017-08-16 09:49:17 +00:00
|
|
|
rootDisk = byid "ata-INTEL_SSDSC2BW480H6_CVTR53120385480EGN";
|
|
|
|
bootPart = rootDisk + "-part1";
|
|
|
|
rootPart = rootDisk + "-part2";
|
2016-03-16 07:41:13 +00:00
|
|
|
|
2017-02-04 13:35:29 +00:00
|
|
|
allDisks = [ rootDisk ]; # auxDisk
|
2016-03-16 07:41:13 +00:00
|
|
|
in {
|
2016-03-11 01:10:34 +00:00
|
|
|
imports = [
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu>
|
2017-08-16 09:49:17 +00:00
|
|
|
<stockholm/makefu/2configs/fs/sda-crypto-root.nix>
|
|
|
|
<stockholm/makefu/2configs/sshd-totp.nix>
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu/2configs/zsh-user.nix>
|
|
|
|
<stockholm/makefu/2configs/smart-monitor.nix>
|
|
|
|
<stockholm/makefu/2configs/exim-retiolum.nix>
|
2017-08-16 09:49:17 +00:00
|
|
|
# <stockholm/makefu/2configs/virtualisation/libvirt.nix>
|
2016-07-11 18:45:16 +00:00
|
|
|
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu/2configs/tinc/retiolum.nix>
|
2017-08-16 09:49:17 +00:00
|
|
|
<stockholm/makefu/2configs/tools/core.nix>
|
|
|
|
<stockholm/makefu/2configs/stats/client.nix>
|
2017-11-08 09:50:42 +00:00
|
|
|
# <stockholm/makefu/2configs/nsupdate-data.nix>
|
2017-08-16 09:49:17 +00:00
|
|
|
|
|
|
|
<stockholm/makefu/2configs/share/anon-ftp.nix>
|
2017-11-08 09:50:42 +00:00
|
|
|
|
|
|
|
# lan party
|
|
|
|
<stockholm/makefu/2configs/lanparty/lancache.nix>
|
|
|
|
<stockholm/makefu/2configs/lanparty/lancache-dns.nix>
|
|
|
|
<stockholm/makefu/2configs/lanparty/samba.nix>
|
|
|
|
<stockholm/makefu/2configs/lanparty/mumble-server.nix>
|
|
|
|
<stockholm/makefu/2configs/virtualisation/libvirt.nix>
|
2016-03-11 01:10:34 +00:00
|
|
|
];
|
2016-07-11 18:45:16 +00:00
|
|
|
|
|
|
|
|
2016-03-11 01:10:34 +00:00
|
|
|
|
2017-08-16 09:49:17 +00:00
|
|
|
#networking.firewall.enable = false;
|
|
|
|
makefu.server.primary-itf = "enp0s25";
|
2017-11-08 09:50:42 +00:00
|
|
|
# krebs.hidden-ssh.enable = true;
|
2016-04-03 19:42:13 +00:00
|
|
|
boot.kernelModules = [ "coretemp" "f71882fg" ];
|
2019-11-07 09:59:12 +00:00
|
|
|
hardware.enableRedistributableFirmware = true;
|
2016-04-03 19:42:13 +00:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2016-06-13 23:33:20 +00:00
|
|
|
networking = {
|
|
|
|
wireless.enable = true;
|
|
|
|
firewall = {
|
|
|
|
allowPing = true;
|
|
|
|
logRefusedConnections = false;
|
2017-08-16 09:49:17 +00:00
|
|
|
# trustedInterfaces = [ "eno1" ];
|
2016-06-23 14:56:13 +00:00
|
|
|
allowedUDPPorts = [ 80 655 1655 67 ];
|
|
|
|
allowedTCPPorts = [ 80 655 1655 ];
|
2016-06-13 23:33:20 +00:00
|
|
|
};
|
2016-06-23 14:56:13 +00:00
|
|
|
# fallback connection to the internal virtual network
|
2017-08-16 09:49:17 +00:00
|
|
|
# interfaces.virbr3.ip4 = [{
|
|
|
|
# address = "10.8.8.2";
|
|
|
|
# prefixLength = 24;
|
|
|
|
# }];
|
2016-06-13 23:33:20 +00:00
|
|
|
};
|
2016-04-03 19:42:13 +00:00
|
|
|
|
2016-03-16 07:41:13 +00:00
|
|
|
# TODO smartd omo darth gum all-in-one
|
|
|
|
services.smartd.devices = builtins.map (x: { device = x; }) allDisks;
|
|
|
|
|
|
|
|
boot.loader.grub.device = rootDisk;
|
2017-08-16 09:49:17 +00:00
|
|
|
boot.initrd.luks.devices = [
|
|
|
|
{ name = "luksroot";
|
|
|
|
device = rootPart;
|
|
|
|
allowDiscards = true;
|
|
|
|
keyFileSize = 4096;
|
|
|
|
keyFile = "/dev/sdb";
|
|
|
|
}
|
2016-03-11 08:03:49 +00:00
|
|
|
];
|
2016-03-16 07:41:13 +00:00
|
|
|
|
|
|
|
krebs.build.host = config.krebs.hosts.darth;
|
2016-03-06 19:56:25 +00:00
|
|
|
}
|