107 lines
2.9 KiB
Nix
107 lines
2.9 KiB
Nix
{
|
|
pkgs,
|
|
namespace,
|
|
...
|
|
}:
|
|
{
|
|
${namespace} = {
|
|
# ###################################################
|
|
# # Boot # #
|
|
# ###################################################
|
|
|
|
boot.systemd-boot.enable = true;
|
|
|
|
# ###################################################
|
|
# # Hardware # #
|
|
# ###################################################
|
|
|
|
hardware.disko = {
|
|
enable = true;
|
|
filesystem = "btrfs";
|
|
};
|
|
|
|
# ###################################################
|
|
# # 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";
|
|
useNetworkd = false;
|
|
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 ];
|
|
allowedUDPPorts = [ 8192 ];
|
|
};
|
|
};
|
|
|
|
# ###################################################
|
|
# # 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";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
# ###################################################
|
|
# # User # #
|
|
# ###################################################
|
|
|
|
user = {
|
|
name = "admin";
|
|
linger = true;
|
|
};
|
|
};
|
|
|
|
# ###################################################
|
|
# # Boot # #
|
|
# ###################################################
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_cachyos-server-lto-znver4;
|
|
|
|
}
|