refactor templates
This commit is contained in:
parent
bcc1aaff1f
commit
576b6963e3
6 changed files with 65 additions and 21 deletions
|
@ -1,10 +1,5 @@
|
|||
{ lib, ... }: {
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.ens18.useDHCP = lib.mkDefault true;
|
||||
networking.useDHCP = true;
|
||||
|
||||
# Enable qemu guest agent
|
||||
services.qemuGuest.enable = true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
imports = [ ./common/common.nix ./common/generic-lxc.nix ];
|
||||
imports = [ ../common/common.nix ../common/generic-lxc.nix ];
|
||||
|
||||
proxmoxLXC = {
|
||||
manageNetwork = true;
|
||||
|
@ -21,7 +21,7 @@
|
|||
|
||||
networking.useDHCP = true;
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
users.users.root.initialPassword = "toor";
|
||||
}
|
28
nixos/templates/proxmox-vm.nix
Normal file
28
nixos/templates/proxmox-vm.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
imports = [ ../common/common.nix ../common/generic-vm.nix ];
|
||||
|
||||
proxmox.qemuConf = {
|
||||
virtio0 = "local-zsfs:vm-9999-disk-0";
|
||||
cores = 1;
|
||||
memory = 1024;
|
||||
bios = "ovmf";
|
||||
};
|
||||
|
||||
# Enable SSH
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
permitRootLogin = "yes";
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
networking.hostName = lib.mkDefault "template";
|
||||
|
||||
time.timeZone = lib.mkDefault "Europe/Amsterdam";
|
||||
|
||||
networking.useDHCP = true;
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
users.users.root.initialPassword = "toor";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue