stockholm/makefu/1systems/omo.nix

70 lines
1.8 KiB
Nix
Raw Normal View History

2015-12-16 11:06:44 +00:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
2016-01-03 05:07:35 +00:00
[
# TODO: unlock home partition via ssh
2015-12-16 11:06:44 +00:00
../2configs/fs/single-partition-ext4.nix
../2configs/tinc-basic-retiolum.nix
2016-01-03 05:07:35 +00:00
../2configs/zsh-user.nix
2015-12-16 11:06:44 +00:00
../2configs/exim-retiolum.nix
2016-01-03 05:07:35 +00:00
../2configs/smart-monitor.nix
2015-12-16 11:06:44 +00:00
];
krebs.build.host = config.krebs.hosts.omo;
2016-01-03 05:07:35 +00:00
services.smartd.devices = [
{ device = "/dev/sda"; }
{ device = "/dev/sdb"; }
{ device = "/dev/sdc"; }
{ device = "/dev/sdd"; }
{ device = "/dev/sde"; }
];
2015-12-16 11:06:44 +00:00
# AMD E350
2016-01-03 05:07:35 +00:00
fileSystems."/home" = {
device = "/dev/mapper/home";
fsType = "ext4";
};
powerManagement.powerUpCommands = ''
for i in a b c d e f g h i;do
${pkgs.hdparm}/sbin/hdparm -S 100 /dev/sd$i
${pkgs.hdparm}/sbin/hdparm -B 127 /dev/sd$i
${pkgs.hdparm}/sbin/hdparm -y /dev/sd$i
'';
2015-12-16 11:06:44 +00:00
boot = {
2016-01-03 05:07:35 +00:00
initrd.luks = {
devices = [
{ name = "home";
device = "/dev/disk/by-uuid/85bff22e-dcbb-4246-b030-faf6c1782995";
keyFileSize = 4096;
keyFile = "/dev/disk/by-id/usb-Verbatim_STORE_N_GO_070B3CEE0B223954-0:0"; }
];
};
loader.grub.device = "/dev/disk/by-id/ata-INTEL_SSDSA2M080G2GC_CVPO003402PB080BGN";
2015-12-16 11:06:44 +00:00
initrd.availableKernelModules = [
"ahci"
2016-01-03 05:07:35 +00:00
"ohci_pci"
2015-12-16 11:06:44 +00:00
"ehci_pci"
2016-01-03 05:07:35 +00:00
"pata_atiixp"
"firewire_ohci"
"usb_storage"
"usbhid"
2015-12-16 11:06:44 +00:00
];
2016-01-03 05:07:35 +00:00
kernelModules = [ "kvm-amd" ];
2015-12-16 11:06:44 +00:00
extraModulePackages = [ ];
};
2016-01-03 05:07:35 +00:00
networking.firewall.allowedUDPPorts = [ 655 ];
2015-12-16 11:06:44 +00:00
hardware.enableAllFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
2016-01-03 05:07:35 +00:00
#zramSwap.enable = true;
zramSwap.numDevices = 2;
2015-12-16 11:06:44 +00:00
}