Graduate eirene

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-05-29 19:05:37 +01:00
parent 9273514e2a
commit fba4691ae0
33 changed files with 189 additions and 842 deletions

View File

@@ -7,7 +7,9 @@
./hardware
../common/configs/system/boot
../common/configs/system/brightnessctl
../common/configs/system/btrfs
../common/configs/system/cpu
../common/configs/system/documentation
../common/configs/system/git
../common/configs/system/impermanence
@@ -36,17 +38,18 @@
# TODO: DNS for .local
networking.hostName = "jupiter";
fileSystems."/mnt/storage" = {
label = "storage";
fsType = "btrfs";
options = [
"x-initrd.mount"
"defaults"
"subvol=@"
"compress=zstd:5"
"noatime"
];
};
# TODO: Enable
# fileSystems."/mnt/storage" = {
# label = "storage";
# fsType = "btrfs";
# options = [
# "x-initrd.mount"
# "defaults"
# "subvol=@"
# "compress=zstd:5"
# "noatime"
# ];
# };
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEWDA5vnIB7KE2VG28Ovg5rXtQqxFwMXsfozLsH0BNZS nick@karaolidis.com"

View File

@@ -2,8 +2,7 @@
disko.devices = {
disk = {
main = {
# TODO: Set to correct device
device = "/dev/vda";
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL22T0HBLB-00BL2_S64RNE0R602762";
type = "disk";
content = {
type = "gpt";
@@ -24,15 +23,14 @@
mountOptions = [ "umask=0077" ];
};
};
# TODO: Set correct swap size and enable
# swap = {
# name = "swap";
# size = "64G";
# content = {
# type = "swap";
# resumeDevice = true;
# };
# };
swap = {
name = "swap";
size = "64G";
content = {
type = "swap";
resumeDevice = true;
};
};
root = {
name = "root";
size = "100%";
@@ -63,12 +61,20 @@
mountpoint = "/persist";
inherit mountOptions;
};
"@nix" = {
mountpoint = "/nix";
"@persist/user" = {
mountpoint = "/persist/user";
inherit mountOptions;
};
"@cache" = {
mountpoint = "/cache";
"@persist/state" = {
mountpoint = "/persist/state";
inherit mountOptions;
};
"@persist/cache" = {
mountpoint = "/persist/cache";
inherit mountOptions;
};
"@nix" = {
mountpoint = "/nix";
inherit mountOptions;
};
};
@@ -79,60 +85,60 @@
};
};
storage0 = {
# TODO: Set to correct device
device = "/dev/vdb";
type = "disk";
content = {
type = "gpt";
partitions = {
root = {
name = "root";
size = "100%";
content = {
name = "storage0";
type = "luks";
passwordFile = "/tmp/keyfile";
settings = {
allowDiscards = true;
};
};
};
};
};
};
# TODO: Set to correct device
# storage0 = {
# device = "/dev/vdb";
# type = "disk";
# content = {
# type = "gpt";
# partitions = {
# root = {
# name = "root";
# size = "100%";
# content = {
# name = "storage0";
# type = "luks";
# passwordFile = "/tmp/keyfile";
# settings = {
# allowDiscards = true;
# };
# };
# };
# };
# };
# };
storage1 = {
# TODO: Set to correct device
device = "/dev/vdc";
type = "disk";
content = {
type = "gpt";
partitions = {
root = {
name = "root";
size = "100%";
content = {
name = "storage1";
type = "luks";
passwordFile = "/tmp/keyfile";
settings = {
allowDiscards = true;
};
# TODO: Set to correct device
# storage1 = {
# device = "/dev/vdc";
# type = "disk";
# content = {
# type = "gpt";
# partitions = {
# root = {
# name = "root";
# size = "100%";
# content = {
# name = "storage1";
# type = "luks";
# passwordFile = "/tmp/keyfile";
# settings = {
# allowDiscards = true;
# };
# storageN content must be placed on last alphabetical drive
content = {
type = "btrfs";
extraArgs = [ "-f -L storage -m raid1 -d raid1 /dev/mapper/storage0" ];
subvolumes = {
"@" = { };
};
};
};
};
};
};
};
# # storageN content must be placed on last alphabetical drive
# content = {
# type = "btrfs";
# extraArgs = [ "-f -L storage -m raid1 -d raid1 /dev/mapper/storage0" ];
# subvolumes = {
# "@" = { };
# };
# };
# };
# };
# };
# };
# };
};
};
}

View File

@@ -1,18 +1,75 @@
{ ... }:
{
# TODO Remove
hardware.enableAllHardware = true;
config,
pkgs,
lib,
...
}:
{
imports = [ ./display.nix ];
# TODO Update
boot.initrd.kernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"virtio_scsi"
"virtio_blk"
"virtio_console"
"sd_mod"
];
hardware = {
enableAllFirmware = true;
services.fstrim.enable = true;
cpu = {
cores = 8;
threads = 16;
amd.updateMicrocode = true;
};
nvidia = {
open = true;
powerManagement.enable = true;
dynamicBoost.enable = true;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
nvidiaBusId = "PCI:1:0:0";
amdgpuBusId = "PCI:6:0:0";
};
};
graphics = {
enable32Bit = true;
extraPackages = with pkgs; [
amdvlk
driversi686Linux.amdvlk
rocmPackages.clr
rocmPackages.clr.icd
];
};
nvidia-container-toolkit.enable = (
config.virtualisation.containerd.enable
|| config.virtualisation.docker.enable
|| config.virtualisation.podman.enable
);
};
boot = {
kernelParams = [ "amd_pstate=active" ];
kernelModules = [ "kvm-amd" ];
initrd.kernelModules = [
"nvme"
"ahci"
"usbhid"
"amdgpu"
];
};
nixpkgs.config = {
cudaSupport = true;
rocmSupport = true;
};
powerManagement.enable = true;
services = {
xserver.videoDrivers = [ "nvidia" ];
fstrim.enable = true;
tlp.settings.DISK_DEVICES = lib.mkDefault "nvme0n1 nvme1n1";
logind.lidSwitch = "ignore";
};
}

View File

@@ -0,0 +1,4 @@
{ ... }:
{
boot.kernelParams = [ "video=eDP-1:2560x1600@165" ];
}

View File

@@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMQoqvM5g/0e/UAH+GHsp0IegTd+Y1WZ+H5TRvypUv03 root@jupiter
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEoe+/nXBPhLKVZ2Fo4iif8F9WgrriBE+/oXPdANR+7G root@jupiter

View File

@@ -94,9 +94,7 @@ in
networks.outline.ref
networks.traefik.ref
];
volumes = [
"${volumes.outline.ref}:/var/lib/outline/data"
];
volumes = [ "${volumes.outline.ref}:/var/lib/outline/data" ];
environments = {
URL = "https://docs.karaolidis.com";
PGSSLMODE = "disable";