task | add hcloud to common

This commit is contained in:
Don Harper 2024-10-12 17:50:30 -05:00
parent 86d2bc58cf
commit f62b3e7356
3 changed files with 114 additions and 0 deletions

View file

@ -45,6 +45,7 @@
gnupg
gping
gtop
hcloud
htop
hugo
iftop

View file

@ -0,0 +1,58 @@
{
modulesPath,
config,
lib,
pkgs,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
./disk-config-vm.nix
];
boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["consoleblank=60"];
loader = {
timeout = 10;
/*
systemd-boot = {
enable = true;
};
*/
grub = {
device = "nodev";
efiSupport = true;
efiInstallAsRemovable = true;
forceInstall = true;
};
efi = {
#canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
plymouth = {
enable = true;
theme = "breeze";
};
kernel = {
sysctl = {"vm.swappiness" = 10;};
};
};
services.openssh.enable = true;
environment.systemPackages = map lib.lowPrio [
pkgs.curl
pkgs.git
pkgs.git-crypt
];
users.users.root = {
initialPassword = "changeme";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINd8AdVbQQ/Fmw+b9mI8EMYqIoRkwmSwAOtmlte3incL don@loki"
];
};
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,55 @@
# Example to create a bios compatible gpt partition
{lib, ...}: {
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/vda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}