Clean up config & add comments.
This commit is contained in:
parent
b504700e61
commit
c2fc35e12d
18 changed files with 162 additions and 114 deletions
24
suites/server/default.nix
Normal file
24
suites/server/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
imports = [../.]; # Common config.
|
||||
|
||||
# Passwordless sudo.
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
# Enable sshd.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Add authorized ssh pubkeys.
|
||||
users.users.fern = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETPyuxUVEmYyEW6PVC6BXqkhULHd/RvMm8fMbYhjTMV fern@muskduck"
|
||||
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIMoJvPcUJDVVzO4dHROCFNlgJdDZSP5xyPx2s40zcx5QAAAABHNzaDo= YubiKey5NFC"
|
||||
];
|
||||
};
|
||||
}
|
9
suites/server/docker/default.nix
Normal file
9
suites/server/docker/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
# Add user to docker group.
|
||||
users.users.fern = {
|
||||
extraGroups = ["docker"];
|
||||
};
|
||||
|
||||
# Enable docker.
|
||||
virtualisation.docker.enable = true;
|
||||
}
|
6
suites/server/lxc/default.nix
Normal file
6
suites/server/lxc/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{modulesPath, ...}: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
../. # Server config.
|
||||
];
|
||||
}
|
34
suites/server/vm/default.nix
Normal file
34
suites/server/vm/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
modulesPath,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
../. # Server config.
|
||||
];
|
||||
|
||||
# Load kernel modules.
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
];
|
||||
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
|
||||
# Enable DHCP.
|
||||
networking.useDHCP = mkDefault true;
|
||||
|
||||
# Configure the bootloader.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
|
||||
# Enable QEMU guest agent
|
||||
services.qemuGuest.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue