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
|
|
|
|
byid = dev: "/dev/disk/by-id/" + dev;
|
|
|
|
rootDisk = byid "ata-ADATA_SSD_S599_64GB_10460000000000000039";
|
|
|
|
auxDisk = byid "ata-HGST_HTS721010A9E630_JR10006PH3A02F";
|
|
|
|
dataPartition = auxDisk + "-part1";
|
|
|
|
|
|
|
|
allDisks = [ rootDisk auxDisk ];
|
|
|
|
in {
|
2016-03-11 01:10:34 +00:00
|
|
|
imports = [
|
2016-04-03 19:42:13 +00:00
|
|
|
../.
|
|
|
|
../2configs/fs/single-partition-ext4.nix
|
|
|
|
../2configs/zsh-user.nix
|
|
|
|
../2configs/smart-monitor.nix
|
|
|
|
../2configs/exim-retiolum.nix
|
|
|
|
../2configs/virtualization.nix
|
2016-07-11 18:45:16 +00:00
|
|
|
|
2016-07-20 15:18:57 +00:00
|
|
|
../2configs/tinc/retiolum.nix
|
2016-07-11 18:45:16 +00:00
|
|
|
../2configs/temp-share-samba.nix
|
2016-03-11 01:10:34 +00:00
|
|
|
];
|
2016-07-11 18:45:16 +00:00
|
|
|
services.samba.shares = {
|
|
|
|
isos = {
|
|
|
|
path = "/data/isos/";
|
|
|
|
"read only" = "yes";
|
|
|
|
browseable = "yes";
|
|
|
|
"guest ok" = "yes";
|
|
|
|
};
|
|
|
|
};
|
2016-06-13 23:33:20 +00:00
|
|
|
services.tinc.networks.siem = {
|
|
|
|
name = "sdarth";
|
|
|
|
extraConfig = "ConnectTo = sjump";
|
|
|
|
};
|
2016-07-11 18:45:16 +00:00
|
|
|
|
|
|
|
makefu.forward-journal = {
|
|
|
|
enable = true;
|
|
|
|
src = "10.8.10.2";
|
|
|
|
dst = "10.8.10.6";
|
|
|
|
};
|
|
|
|
|
2016-04-03 19:42:13 +00:00
|
|
|
#networking.firewall.enable = false;
|
2016-03-11 01:10:34 +00:00
|
|
|
|
2016-04-03 19:42:13 +00:00
|
|
|
boot.kernelModules = [ "coretemp" "f71882fg" ];
|
|
|
|
hardware.enableAllFirmware = true;
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2016-06-13 23:33:20 +00:00
|
|
|
networking = {
|
|
|
|
wireless.enable = true;
|
|
|
|
firewall = {
|
|
|
|
allowPing = true;
|
|
|
|
logRefusedConnections = false;
|
2016-07-11 18:45:16 +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
|
2016-06-13 23:33:20 +00:00
|
|
|
interfaces.virbr3.ip4 = [{
|
|
|
|
address = "10.8.8.2";
|
|
|
|
prefixLength = 24;
|
|
|
|
}];
|
|
|
|
};
|
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;
|
|
|
|
zramSwap.enable = true;
|
|
|
|
|
|
|
|
fileSystems."/data" = {
|
|
|
|
device = dataPartition;
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
boot.loader.grub.device = rootDisk;
|
|
|
|
|
2016-03-11 08:03:49 +00:00
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
config.krebs.users.makefu-omo.pubkey
|
2016-03-16 07:41:13 +00:00
|
|
|
config.krebs.users.makefu-vbob.pubkey
|
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
|
|
|
}
|