nix/hosts/base-lxc.nix
2024-12-12 21:48:12 +01:00

37 lines
725 B
Nix

# Starting image for LXC containers on Proxmox
{
config,
pkgs,
modulesPath,
self,
...
}:
let
sshKeys = import "${self}/ssh-keys.nix";
in
{
imports = [ (modulesPath + "/virtualisation/proxmox-lxc.nix") ];
users = {
users.root = {
hashedPassword = "$6$gir1YD6tNdC9xAj0$zLr1yt/ea9PvwygjHfQVnPmeCd1.2zrAKWiN80duidwOkZF6hwm06ta6J3O9uw6F3uUHC0N7iiKYhCgXXR.Q7/";
openssh.authorizedKeys.keys = sshKeys.infra-core;
};
};
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Auto update
system.autoUpgrade.enable = true;
# Auto delete old generations
nix.gc.automatic = true;
nix.gc.options = "--delete-older-than 2d";
system.stateVersion = "24.05";
}