Files
nix-config/systems/x86_64-linux/nuc-nixos/default.nix
mjallen18 10fc7820e1 testing
2026-01-27 11:13:58 -06:00

125 lines
3.2 KiB
Nix

{
pkgs,
namespace,
...
}:
{
${namespace} = {
# ###################################################
# # Boot # #
# ###################################################
bootloader.lanzaboote.enable = true;
# ###################################################
# # Hardware # #
# ###################################################
hardware.disko = {
enable = true;
enableLuks = true;
filesystem = "btrfs";
# rootDisk = "/dev/loop0";
};
headless.enable = true;
# ###################################################
# # Impermanence # #
# ###################################################
impermanence = {
enable = true;
extraDirectories = [
"/var/lib/homeassistant"
"/var/lib/mosquitto"
"/var/lib/music-assistant"
"/var/lib/postgresql"
"/var/lib/zigbee2mqtt"
];
};
# ###################################################
# # Network # #
# ###################################################
network = {
hostName = "nuc-nixos";
ipv4 = {
method = "manual";
address = "10.0.1.4/24";
gateway = "10.0.1.1";
dns = "10.0.1.1";
interface = "wlp1s0";
};
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [
8192
8880
8881
];
allowedUDPPorts = [
8192
8880
8881
];
};
};
# ###################################################
# # Security # #
# ###################################################
security.tpm.enable = true;
# ###################################################
# # Services # #
# ###################################################
services = {
home-assistant = {
enable = true;
automation = {
lightswitch = {
living-room-lights = {
id = 1741726347213;
alias = "Living Room Light Switch";
mqttDeviceId = "958ff6b3c9df0db21e418aaf6410b996";
lightEntityId = "light.living_room_lights";
};
bedroom-lights = {
id = 1741726231261;
alias = "Bedroom Light Switch";
mqttDeviceId = "de0f34498214842dcccaa6b08967d6b5";
lightEntityId = "light.bedroom_lights";
};
};
};
};
otbr = {
enable = true;
restPort = 8881;
port = 8880;
};
};
# ###################################################
# # User # #
# ###################################################
user = {
name = "admin";
linger = true;
};
};
# ###################################################
# # Boot # #
# ###################################################
boot.kernelPackages = pkgs.${namespace}.linuxPackages_cachyos-server-lto-znver4;
}