Add Blackbird host configuration and disk setup

This commit is contained in:
panotaka
2023-12-11 10:36:20 -04:00
parent c57a424acf
commit 548eccc974
3 changed files with 156 additions and 0 deletions

View File

@@ -42,6 +42,27 @@
./themes/sandstone-forest
];
};
Blackbird = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/Blackbird
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs;
home-manager.users.panotaka = {
imports = [ ./home ./home/shell ./home/desktop ];
};
}
inputs.stylix.nixosModules.stylix
./themes/targets/all.nix
./themes/spaceduck
];
};
};
homeConfigurations.panotaka = home-manager.lib.homeManagerConfiguration {

View File

@@ -0,0 +1,76 @@
{ config, pkgs, inputs, lib, ... }:
let
hostname = "Blackbird";
in
{
# System version
system.stateVersion = "23.11";
imports = [
# Import hardware configuration
inputs.nixos-hardware.nixosModules.gpd-pocket-3
inputs.disko.nixosModules.disko
./disko.nix
# Import system configuration
../../modules/system.nix
../../modules/harden.nix
../../modules/kde.nix
];
# 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;
efi = {
canTouchEfiVariables = true;
};
};
};
# Setup Audio
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Setup bluetooth
hardware.bluetooth.enable = true;
}

59
hosts/Blackbird/disko.nix Normal file
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";
};
};
};
};
};
};
};
};
};
};
}