Skip to content

Instantly share code, notes, and snippets.

@grahamc
Last active July 18, 2018 18:56
Show Gist options
  • Save grahamc/798ed9bb72bc50f4b356c0236aad6c6e to your computer and use it in GitHub Desktop.
Save grahamc/798ed9bb72bc50f4b356c0236aad6c6e to your computer and use it in GitHub Desktop.
{ pkgs, ... }:
{
nix = {
useSandbox = true;
gc = {
automatic = true;
options = let
gbFree = 10;
in "--max-freed $((${toString gbFree} * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | awk '{ print $4 }')))";
};
};
programs = {
ssh = {
knownHosts = [
{
hostNames = [ "git.blah.com" "theserverip" ];
publicKey = ".....";
}
];
};
};
environment.systemPackages = with pkgs; [
openjdk
git
];
users = {
users = {
builduser = {
isNormalUser = true;
uid = 1000;
createHome = true;
extraGroups = [ "docker" ];
home = "/home/builduser";
openssh.authorizedKeys.keys = [
...
];
};
};
};
virtualisation.docker = {
enable = true;
autoPrune = {
enable = true;
dates = "daily";
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment