From 576884842d342bf04da32052ed9929c353b9667b Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Tue, 15 Jul 2025 00:40:49 +0000 Subject: [PATCH] Contain rpi nix config --- nixos/DICT | 4 ++-- rpi-nixos/hardware-configuration.nix | 16 +++++----------- rpi-nixos/DICT | 4 ++-- rpi-nixos/configuration.nix | 24 +++++++++++++++++++++--- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/nixos/DICT b/nixos/DICT index 92755e5..5751852 100644 --- a/nixos/DICT +++ b/nixos/DICT @@ -1,2 +1,2 @@ -SUDO_FILES="configuration.nix" -SUDO_LOCATIONS="/etc/nixos/configuration.nix" +#SUDO_FILES="configuration.nix" +#SUDO_LOCATIONS="/etc/nixos/configuration.nix" diff --git a/rpi-nixos/DICT b/rpi-nixos/DICT index 46fb3f5..23ddb63 100644 --- a/rpi-nixos/DICT +++ b/rpi-nixos/DICT @@ -1,3 +1,3 @@ DEPS="nixos" -SUDO_FILES="hardware-configuration.nix" -SUDO_LOCATIONS="/etc/nixos/hardware-configuration.nix" +SUDO_FILES="configuration.nix hardware-configuration.nix" +SUDO_LOCATIONS="/etc/nixos/configuration.nix /etc/nixos/hardware-configuration.nix" diff --git a/nixos/configuration.nix b/rpi-nixos/configuration.nix similarity index 87% rename from nixos/configuration.nix rename to rpi-nixos/configuration.nix index 49d0a8b..d188b2b 100644 --- a/nixos/configuration.nix +++ b/rpi-nixos/configuration.nix @@ -14,8 +14,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.forceImportRoot = false; + boot.supportedFilesystems = [ "bcachefs" ]; networking.hostId = "31f59926"; networking.hostName = "wipi"; # Define your hostname. @@ -77,7 +76,6 @@ neofetch git gnumake - zfs tmux htop ]; @@ -124,6 +122,26 @@ syntaxHighlighting.enable = true; }; + services.home-assistant = { + enable = true; + extraComponents = [ + # Components required to complete the onboarding + "analytics" + "google_translate" + "met" + "radio_browser" + "shopping_list" + # Recommended for fast zlib compression + # https://www.home-assistant.io/integrations/isal + "isal" + ]; + config = { + # Includes dependencies for a basic setup + # https://www.home-assistant.io/integrations/default_config/ + default_config = {}; + }; + }; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; diff --git a/rpi-nixos/hardware-configuration.nix b/rpi-nixos/hardware-configuration.nix index 649af25..8c36015 100644 --- a/rpi-nixos/hardware-configuration.nix +++ b/rpi-nixos/hardware-configuration.nix @@ -25,12 +25,11 @@ options = [ "fmask=0077" "dmask=0077" ]; }; - boot.zfs.extraPools = [ "pool" ]; - -# fileSystems."/var/lib/docker" = -# { device = "/pool/docker/var"; -# options = [ "bind" ]; -# }; + fileSystems."/pool" = + { device = "/dev/disk/by-uuid/8c98df84-c85c-401b-8d44-4cec5a87fd82"; + fsType = "bcachefs"; + options = [ "compression=zstd" ]; + }; swapDevices = [ ]; @@ -41,11 +40,6 @@ }; }; - services.zfs = { - autoScrub.enable = true; - trim.enable = true; - }; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction -- Gitblit v1.10.0