refactor templates
This commit is contained in:
parent
bcc1aaff1f
commit
576b6963e3
6 changed files with 65 additions and 21 deletions
15
nixos/templates/iso-graphical.nix
Normal file
15
nixos/templates/iso-graphical.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, modulesPath, lib, config, ... }: {
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix"
|
||||
];
|
||||
|
||||
# use the latest Linux kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
];
|
||||
|
||||
# Needed for https://github.com/NixOS/nixpkgs/issues/58959
|
||||
boot.supportedFilesystems = lib.mkForce [ "btrfs" "ext4" ];
|
||||
}
|
15
nixos/templates/iso.nix
Normal file
15
nixos/templates/iso.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, modulesPath, lib, ... }: {
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
];
|
||||
|
||||
# use the latest Linux kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
];
|
||||
|
||||
# Needed for https://github.com/NixOS/nixpkgs/issues/58959
|
||||
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
|
||||
}
|
27
nixos/templates/proxmox-lxc.nix
Normal file
27
nixos/templates/proxmox-lxc.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
imports = [ ../common/common.nix ../common/generic-lxc.nix ];
|
||||
|
||||
proxmoxLXC = {
|
||||
manageNetwork = true;
|
||||
manageHostName = true;
|
||||
privileged = false;
|
||||
};
|
||||
|
||||
# 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";
|
||||
}
|
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