Files
nixos-on-gcp/gcp-configuration.nix
T
2024-10-24 19:59:09 -04:00

34 lines
894 B
Nix

{ pkgs, lib, modulesPath, ... }: {
imports = [ "${modulesPath}/virtualisation/google-compute-image.nix" ];
config = {
system.stateVersion = "23.11";
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
networking.nameservers = [ "8.8.8.8" ]; # Todo: include? "169.254.169.254"];
virtualisation.containers.enable = true;
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
};
nix = {
settings.auto-optimise-store = true;
extraOptions = ''
experimental-features = nix-command flakes
min-free = ${toString (100 * 1024 * 1024)}
max-free = ${toString (1024 * 1024 * 1024)}
'';
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 60d --max-freed $((1024**3))";
};
};
services.openssh.settings.PasswordAuthentication = false;
};
}