<commit_before>{ config, lib, pkgs, ... }:

{
  imports = [ ./ux305c-hardware.nix ./ux305c-wifi.nix ];

  boot = {
    cleanTmpDir = true;

    initrd.kernelModules = ["ahci" "aesni-intel"];

    kernel.sysctl = {
      "vm.dirty_writeback_centisecs" = 1500;
      "vm.drop_caches" = 1;
      "vm.laptop_mode" = 5;
      "vm.swappiness" = 5;
    };

    kernelPackages = pkgs.linuxPackages_latest;

    loader = {
      efi.canTouchEfiVariables = true;
      systemd-boot.enable = true;
    };
  };

  environment.systemPackages = with pkgs; [
    # Basics
    binutils
    conky
    feh
    firefox
    gettext
    gitFull
    gnupg
    gnupg1compat
    htop
    i3lock-fancy
    iotop
    keybase-go
    oh-my-zsh
    pandoc
    parcellite
    unzip
    upower
    vlc
    xclip
    xtrlock-pam

    # VPN
    ppp
    pptp

    # Java
    gradle
    jdk
    maven

    # Scala
    scala
    sbt

    # Lagom
    activator

    # Custom
    (import nixpkgs/sublime3-dev.nix)

  ];

  fonts = {
    enableFontDir = true;
    enableGhostscriptFonts = true;
    fonts = with pkgs; [
      font-awesome-ttf
      source-code-pro
    ];
    fontconfig.defaultFonts.monospace = [ "Source Code Pro" ];
  };

  hardware = {
    cpu.intel.updateMicrocode = true;
    pulseaudio.enable = false;
  };

  i18n = {
    consoleKeyMap = "us";
    defaultLocale = "en_US.UTF-8";
  };

  networking = {
    hostName = "nixus";

    extraHosts = ''
      127.0.0.1 nixus
      0.0.0.0 ftp.au.debian.org
    '' + (lib.fileContents ./hosts);

    firewall = {
      allowedTCPPorts = [ 22 ];
      allowPing = false;
      enable = true;
      extraCommands = ''
       iptables -A INPUT -p 47 -j ACCEPT
       iptables -A OUTPUT -p 47 -j ACCEPT
      '';
    };
  };

  nix = {
    binaryCaches = [ https://cache.nixos.org https://hydra.nixos.org ];
    binaryCachePublicKeys = [ "hydra.nixos.org-1:<KEY> ];
    buildCores = 8;

    extraOptions = ''
      auto-optimise-store = true
      connect-timeout = 10
    '';

    gc = {
      automatic = true;
      dates = "01:00";
      options = "--delete-older-than 30";
    };

    maxJobs = 4;

    nrBuildUsers = 30;
    trustedBinaryCaches = [ https://cache.nixos.org https://hydra.nixos.org ];
    useSandbox = true;
  };

  nixpkgs.config = {
    allowUnfree = true;

    firefox = {
      enableGoogleTalkPlugin = true;
      enableAdobeFlash = true;
    };
  };

  powerManagement = {
    enable = true;
    cpuFreqGovernor = "ondemand";
  };

  programs = {
    ssh.startAgent = true;
    zsh = {
      enable = true;
      promptInit = ''
        autoload -U promptinit && promptinit && prompt clint
      '';
    };
  };

  security = {
    hideProcessInformation = true;

    sudo = {
        enable = true;
        wheelNeedsPassword = false;
    };
  };

  services = {
    fail2ban = {
        enable = false;
        jails.ssh-iptables = ''
          enabled = true
        '';
    };

    locate.enable = true;

    nixosManual.enable = false;

    nscd.enable = false;<commit_msg>Configure SSH<commit_after>{ config, lib, pkgs, ... }:

{
  imports = [ ./ux305c-hardware.nix ./ux305c-wifi.nix ];

  boot = {
    cleanTmpDir = true;

    initrd.kernelModules = ["ahci" "aesni-intel"];

    kernel.sysctl = {
      "vm.dirty_writeback_centisecs" = 1500;
      "vm.drop_caches" = 1;
      "vm.laptop_mode" = 5;
      "vm.swappiness" = 5;
    };

    kernelPackages = pkgs.linuxPackages_latest;

    loader = {
      efi.canTouchEfiVariables = true;
      systemd-boot.enable = true;
    };
  };

  environment.systemPackages = with pkgs; [
    # Basics
    binutils
    conky
    feh
    firefox
    gettext
    gitFull
    gnupg
    gnupg1compat
    htop
    i3lock-fancy
    iotop
    keybase-go
    oh-my-zsh
    pandoc
    parcellite
    unzip
    upower
    vlc
    xclip
    xtrlock-pam

    # VPN
    ppp
    pptp

    # Java
    gradle
    jdk
    maven

    # Scala
    scala
    sbt

    # Lagom
    activator

    # Custom
    (import nixpkgs/sublime3-dev.nix)

  ];

  fonts = {
    enableFontDir = true;
    enableGhostscriptFonts = true;
    fonts = with pkgs; [
      font-awesome-ttf
      source-code-pro
    ];
    fontconfig.defaultFonts.monospace = [ "Source Code Pro" ];
  };

  hardware = {
    cpu.intel.updateMicrocode = true;
    pulseaudio.enable = false;
  };

  i18n = {
    consoleKeyMap = "us";
    defaultLocale = "en_US.UTF-8";
  };

  networking = {
    hostName = "nixus";

    extraHosts = ''
      127.0.0.1 nixus
      0.0.0.0 ftp.au.debian.org
    '' + (lib.fileContents ./hosts);

    firewall = {
      allowedTCPPorts = [ 22 ];
      allowPing = false;
      enable = true;
      extraCommands = ''
       iptables -A INPUT -p 47 -j ACCEPT
       iptables -A OUTPUT -p 47 -j ACCEPT
      '';
    };
  };

  nix = {
    binaryCaches = [ https://cache.nixos.org https://hydra.nixos.org ];
    binaryCachePublicKeys = [ "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs=" ];
    buildCores = 8;

    extraOptions = ''
      auto-optimise-store = true
      connect-timeout = 10
    '';

    gc = {
      automatic = true;
      dates = "01:00";
      options = "--delete-older-than 30";
    };

    maxJobs = 4;

    nrBuildUsers = 30;
    trustedBinaryCaches = [ https://cache.nixos.org https://hydra.nixos.org ];
    useSandbox = true;
  };

  nixpkgs.config = {
    allowUnfree = true;

    firefox = {
      enableGoogleTalkPlugin = true;
      enableAdobeFlash = true;
    };
  };

  powerManagement = {
    enable = true;
    cpuFreqGovernor = "ondemand";
  };

  programs = {
    ssh = {
      agentTimeout = "4h";
      extraConfig = ''
        Host *
          ConnectTimeout 60
          ServerAliveInterval 240
          ConnectionAttempts 60
      '';
      knownHosts = [
        {
          hostNames = [ "pine" "pine.nequissimus.com" "10.30.27.128" ];
          publicKey = "<KEY>;
        }
        {
          hostNames = [ "github.com" "192.30.252.*" "192.30.253.*" "192.30.254.*" "192.30.255.*" ];
          publicKey = "<KEY>;
        }
      ];
      startAgent = true;
    };

    zsh = {
      enable = true;
      promptInit = ''
        autoload -U promptinit && promptinit && prompt clint
      '';
    };
  };

  security = {
    hideProcessInformation = true;

    sudo = {
        enable = true;
        wheelNeedsPassword = false;
    };
  };

  services = {
    fail2ban = {
        enable = false;
        jails.ssh-iptables = ''
          enabled = true
        '';
    };

    locate.enable = true;

    nixosManual.enable = false;

    nscd.enable = false;
{'fraction_non_alphanumeric': 0.12585395475937453, 'fraction_numerical': 0.023379383634431455, 'mean_word_length': 1.7715607909129154, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '590712', 'n_tokens_mistral': 2591, 'n_tokens_neox': 2363, 'n_words': 428}