From d7c3a2d3dd732fee3a772b4b344060199a9b2723 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Wed, 26 Feb 2025 17:57:09 -0600 Subject: [PATCH] nm --- flake.nix | 3 +- hosts/homeassistant/boot.nix | 1 + hosts/homeassistant/configuration.nix | 65 +++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index c7f4f5b..81ac966 100644 --- a/flake.nix +++ b/flake.nix @@ -251,7 +251,6 @@ "jallen-hass" = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = [ - nixos-hardware.nixosModules.raspberry-pi-4 impermanence.nixosModules.impermanence ./hosts/homeassistant/configuration.nix sops-nix.nixosModules.sops @@ -260,7 +259,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.hass = import ./hosts/hass/home.nix; + home-manager.users.hass = import ./hosts/homeassistant/home.nix; } ]; }; diff --git a/hosts/homeassistant/boot.nix b/hosts/homeassistant/boot.nix index f3d022c..a236a14 100644 --- a/hosts/homeassistant/boot.nix +++ b/hosts/homeassistant/boot.nix @@ -7,6 +7,7 @@ in boot = { kernelModules = [ "nct6775" ]; loader = { + systemd-boot.enable = true; efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot"; diff --git a/hosts/homeassistant/configuration.nix b/hosts/homeassistant/configuration.nix index 371d88f..97a278f 100644 --- a/hosts/homeassistant/configuration.nix +++ b/hosts/homeassistant/configuration.nix @@ -8,8 +8,8 @@ let user = "hass"; password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06"; SSID = "Joey's Jungle 5G"; - SSIDpassword = config.sops.templates."wifi-password".content; - interface = "wlan0"; + SSIDpassword = "kR8v&3Qd"; # config.sops.templates."wifi-password".content; + interface = "wlp0s20f3"; timezone = "America/Chicago"; hostname = "jallen-hass"; in @@ -34,7 +34,54 @@ in time.timeZone = timezone; networking = { - networkmanager.enable = lib.mkForce true; + networkmanager = { + enable = true; + + # Configure the static connection for eno1 +# ensureProfiles = { +# profiles = { +# joeys-jungle = { +# connection = { +# id = "joeys-jungle"; +# permissions = ""; +# type = "wifi"; +# }; +# ipv4 = { +# dns-search = ""; +# method = "auto"; +# }; +# ipv6 = { +# addr-gen-mode = "stable-privacy"; +# dns-search = ""; +# method = "auto"; +# }; +# wifi = { +# mac-address-blacklist = ""; +# mode = "infrastructure"; +## ssid = SSID; +# }; +# wifi-security = { +# auth-alg = "open"; +# key-mgmt = "wpa-psk"; +# psk = SSIDpassword; +# }; +# }; +# "static-eno1" = { +# connection = { +# id = "static-eno1"; +# type = "ethernet"; +# interface-name = "eno1"; +# }; +# ipv4 = { +# method = "manual"; +# addresses = "10.0.1.19/24"; +# gateway = "10.0.1.1"; +# dns = "10.0.1.1"; +# }; +# }; +# }; +# }; + }; hostName = hostname; wireless = { enable = false; @@ -50,6 +97,18 @@ in ]; services.openssh.enable = true; + + # Enable Avahi for .local hostname resolution + services.avahi = { + enable = true; + nssmdns4 = true; # For modern systems, use nssmdns4 instead of nssmdns + publish = { + enable = true; + addresses = true; + domain = true; + workstation = true; + }; + }; users = { mutableUsers = false;