machines: init Tehom

This commit is contained in:
Kevin Baensch 2025-07-19 11:57:58 +02:00
parent b6c6a42d1e
commit 7a6ace2ef0
Signed by: derped
GPG key ID: C0F1D326C7626543
6 changed files with 247 additions and 0 deletions

View file

@ -0,0 +1,125 @@
{
nixpkgs,
pkgs,
...
}:
{
imports = [
"${nixpkgs}/nixos/modules/installer/scan/not-detected.nix"
];
boot = {
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usbhid"
"sdhci_pci"
];
luks.devices."btrfs-crypt".device = "/dev/disk/by-uuid/f97bba41-e44d-4527-9e20-d09232a92323";
};
supportedFilesystems = [ "btrfs" ];
loader = {
efi.canTouchEfiVariables = true;
timeout = 0;
systemd-boot = {
enable = true;
consoleMode = "0";
editor = false;
};
};
kernelPackages = pkgs.linuxPackages_latest;
initrd.kernelModules = [ ];
kernelModules = [
"kvm-amd"
"amdgpu"
];
extraModulePackages = with pkgs.linuxPackages_latest; [ acpi_call ];
};
fileSystems = {
"/" = {
device = "none";
fsType = "tmpfs";
options = [
"defaults"
"size=512M"
"mode=755"
];
};
"/tmp" = {
device = "/dev/mapper/btrfs-crypt";
fsType = "btrfs";
options = [
"subvol=tmp"
"noatime"
"compress=zstd"
];
neededForBoot = true;
};
"/persist" = {
device = "/dev/mapper/btrfs-crypt";
fsType = "btrfs";
options = [
"subvol=persist"
"noatime"
"compress=zstd"
];
neededForBoot = true;
};
"/nix" = {
device = "/dev/mapper/btrfs-crypt";
fsType = "btrfs";
options = [
"subvol=nix"
"noatime"
"compress=zstd"
];
neededForBoot = true;
};
"/snapshots" = {
device = "/dev/mapper/btrfs-crypt";
fsType = "btrfs";
options = [
"subvol=snapshots"
"noatime"
"compress=zstd"
"noexec"
];
neededForBoot = false;
};
"/boot" = {
device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
};
services = {
upower.enable = true;
logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandlePowerKey=suspend
'';
xserver.videoDrivers = [ "amdgpu" ];
};
hardware = {
cpu.amd.updateMicrocode = true;
graphics = {
enable = true;
enable32Bit = true;
};
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
time.timeZone = "Europe/Berlin";
}