NixOS configs for new Redbrick deployment
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

  1. {config, pkgs, ...}:
  2. let
  3. common = import ./variables.nix;
  4. in {
  5. time.timeZone = "Europe/Dublin";
  6. i18n = {
  7. consoleFont = "Lat2-Terminus16";
  8. consoleKeyMap = "uk";
  9. defaultLocale = "en_IE.UTF-8";
  10. };
  11. # Set sensible kernel parameters
  12. boot.kernelParams = [
  13. "boot.shell_on_fail"
  14. "panic=30" "boot.panic_on_fail" # reboot the machine upon fatal boot issues
  15. ];
  16. # Use Redbrick DNS and HTTP proxy
  17. networking.domain = common.tld;
  18. networking.search = [ "internal" common.tld ];
  19. networking.nameservers = ["192.168.0.4"];
  20. networking.timeServers = ["192.168.0.254"];
  21. networking.proxy.default = "http://proxy.internal:3128/";
  22. networking.proxy.noProxy = "127.0.0.1,localhost,*.internal";
  23. # Enable rsyslog
  24. services.rsyslogd.enable = true;
  25. services.rsyslogd.extraConfig = "*.* @log.internal:6514;RSYSLOG_SyslogProtocol23Format";
  26. # Enable LDAP
  27. users.ldap.enable = true;
  28. users.ldap.timeLimit = 2;
  29. users.ldap.server = "ldap://${common.ldapHost}/";
  30. users.ldap.base = "o=redbrick";
  31. # List packages installed in system profile. To search, run:
  32. # $ nix search wget
  33. environment.systemPackages = with pkgs; [
  34. wget vim git screen tmux unzip megacli ipmitool smartmontools htop
  35. ];
  36. # Allow unfree packages
  37. nixpkgs.config.allowUnfree = true;
  38. # Enable accounting so systemd-cgtop can show IO load
  39. systemd.enableCgroupAccounting = true;
  40. # Enable and configure ZFS. It won't affect anything
  41. # if a machine doesn't use it
  42. boot.supportedFilesystems = [ "zfs" ];
  43. boot.zfs = {
  44. enableUnstable = true;
  45. forceImportRoot = false;
  46. forceImportAll = false;
  47. };
  48. services.zfs.autoScrub.enable = true;
  49. services.zfs.autoSnapshot = {
  50. enable = true;
  51. frequent = 8;
  52. hourly = 0;
  53. daily = 7;
  54. weekly = 0;
  55. monthly = 1;
  56. };
  57. }