build gcp image

This commit is contained in:
didier committed 2024-10-24 19:59:09 -04:00
commit 47dd9a1137
5 files changed
+172

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
{ 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;
};
}