new host: theia

This commit is contained in:
blahai 2024-10-24 00:03:11 +03:00
parent 239c0b4640
commit 45b526254e
No known key found for this signature in database
4 changed files with 192 additions and 16 deletions

View file

@ -0,0 +1,53 @@
{ modulesPath, lib, pkgs, ... }: {
system.stateVersion = "24.11";
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "virtio_scsi" "ahci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.loader.grub = {
enable = true;
};
networking = {
useDHCP = lib.mkDefault false;
defaultGateway = {
address = "178.63.247.183";
interface = "ens3";
};
interfaces = {
ens3 = {
ipv4 = {
addresses = [
{
address = "178.63.118.252";
prefixLength = 32;
}
];
routes = [
{
address = "178.63.247.183";
prefixLength = 32;
}
];
};
};
};
};
services.openssh = {
enable = true;
};
users.users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPbmiNqoyeKXk/VopFm2cFfEnV4cKCFBhbhyYB69Fuu elissa.tamminen@gmail.com"
];
initialHashedPassword = "$y$j9T$TzqbL4iMGLjli6EEXfRCZ0$AhFJ4iCFxRlstth5owic3M5nq74Sp1qhtctjSBcgAl8";
};
}

View file

@ -0,0 +1,55 @@
{ 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"
];
};
};
};
};
};
};
}