hestia: init
This commit is contained in:
parent
7a5300b6a2
commit
a30f8b19a6
4 changed files with 77 additions and 0 deletions
13
hosts/hestia/default.nix
Normal file
13
hosts/hestia/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disks.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
networking.hostId = "85eb2d89"; # "hestia" in base64->hex
|
||||
|
||||
modules.hardware.form.server = true;
|
||||
boot.loader.timeout = 1;
|
||||
}
|
46
hosts/hestia/disks.nix
Normal file
46
hosts/hestia/disks.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ pkgs, lib, ... }:
|
||||
with lib.our.disko;
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
|
||||
boot.zfs.extraPools = [ "tank" ];
|
||||
|
||||
disko.devices = {
|
||||
nodev."/" = mkTmpfs "2G";
|
||||
disk = {
|
||||
hdd1 = mkDisk "wwn-0x5000c50015bda593" {
|
||||
partitions = {
|
||||
boot = mkESP "64M" "/boot/efi";
|
||||
store = mkBtrfsPartEndAt "238400M" "/media/store" {
|
||||
# 1/4th of 1000GB/931.5GiB
|
||||
subvolumes = mkBtrfsSubvols {
|
||||
"/boot" = { };
|
||||
"/etc/ssh" = { };
|
||||
"/persist" = { };
|
||||
"/nix" = { };
|
||||
};
|
||||
};
|
||||
zfs = mkZPart "100%" "tank";
|
||||
};
|
||||
};
|
||||
hdd2 = mkZDisk "wwn-0x5000cca215d2481a" "tank";
|
||||
hdd3 = mkZDisk "wwn-0x5000cca215d24629" "tank";
|
||||
};
|
||||
|
||||
zpool = mkZPools {
|
||||
tank = {
|
||||
datasets = {
|
||||
storage = mkZfs "/storage" { };
|
||||
backups = mkZfs "/backups" { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = markNeededForBoot [
|
||||
"/persist"
|
||||
"/storage"
|
||||
"/etc/ssh"
|
||||
"/home"
|
||||
];
|
||||
}
|
17
hosts/hestia/hardware-configuration.nix
Normal file
17
hosts/hestia/hardware-configuration.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelParams = [ "boot.shell_on_fail" ];
|
||||
boot.supportedFilesystems = [ "btrfs" "zfs" ];
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
||||
info.model = "Dell R330";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue