Base LXC image from where all containers start
This commit is contained in:
parent
4e649d4344
commit
e5f47681ae
2 changed files with 40 additions and 0 deletions
30
hosts/base-lxc.nix
Normal file
30
hosts/base-lxc.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Starting image for LXC containers on Proxmox
|
||||
|
||||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
];
|
||||
|
||||
users = {
|
||||
users.root = {
|
||||
hashedPassword = "$6$gir1YD6tNdC9xAj0$zLr1yt/ea9PvwygjHfQVnPmeCd1.2zrAKWiN80duidwOkZF6hwm06ta6J3O9uw6F3uUHC0N7iiKYhCgXXR.Q7/";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhiGLc/whCY3lCmDiRlYnMJOLiO/gvcRj/sKVEFVAhQ pazpi@deadbeef"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
|
||||
}
|
||||
|
|
@ -49,6 +49,16 @@ in
|
|||
# specialArgs = { };
|
||||
};
|
||||
|
||||
baseLXC = nixpkgs.lib.nixosSystem {
|
||||
pkgs = pkgs "x86_64-linux";
|
||||
modules = [
|
||||
myModule
|
||||
proxmoxModule
|
||||
./base-lxc.nix
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
arr = nixpkgs.lib.nixosSystem {
|
||||
pkgs = pkgs "x86_64-linux";
|
||||
modules = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue