Added Bellerophon

This commit is contained in:
2024-10-22 22:37:01 -03:00
parent 473d4916e7
commit 62ea4fed01
5 changed files with 201 additions and 9 deletions

View File

@@ -0,0 +1,87 @@
{
lib,
disko,
inputs,
...
}: let
hostname = "Bellerophon";
in {
# System version
system.stateVersion = "23.11";
imports = [
# Import hardware configuration
inputs.disko.nixosModules.disko
./disko.nix
# Import system configuration
../../modules/system.nix
../../modules/containers.nix
../../modules/virtualization.nix
../../modules/harden.nix
../../modules/kde.nix
];
hardware.nvidia.open = false;
# Set networking
hardware.enableRedistributableFirmware = true;
networking.hostName = hostname;
networking.networkmanager.enable = true;
networking.useDHCP = lib.mkDefault true;
# Bootloader configuration
boot = {
kernelModules = ["kvm-intel"];
extraModulePackages = [];
initrd = {
kernelModules = [];
availableKernelModules = [
"xhci_pci"
"thunderbolt"
"vmd"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
};
loader = {
systemd-boot = {
enable = true;
configurationLimit = 5;
};
efi = {
canTouchEfiVariables = true;
};
};
};
# Setup Audio
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.extraConfig."10-disable-camera" = {
"wireplumber.profiles" = {
main = {
"monitor.libcamera" = "disabled";
};
};
};
};
# Setup bluetooth
hardware.bluetooth.enable = true;
# Add OpenGl support
hardware.graphics = {
enable = true;
enable32Bit = true;
};
}

View File

@@ -0,0 +1,59 @@
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
settings = {
allowDiscards = true;
};
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"];
};
"/home" = {
mountpoint = "/home";
mountOptions = ["compress=zstd" "noatime"];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"];
};
"/swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "40G";
};
};
};
};
};
};
};
};
};
};
}