Merge branch 'home-assistant'

This commit is contained in:
Filippo Berto 2022-11-11 14:44:10 +01:00
commit 47714d161f
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
3 changed files with 107 additions and 16 deletions

12
flake.lock generated
View file

@ -62,11 +62,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1668084757,
"narHash": "sha256-/RRIVnNrg1EZkYMaPdQFuxCQ72LPWkVjvWEClR8FqvI=",
"lastModified": 1668157555,
"narHash": "sha256-s5rt2FSmV4PWt89rjt4cvBGOhPizStsinkIB0BXnKrk=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "11a42a580de22355934ffd9235b81b64004a2e98",
"rev": "062c3cca468a4b404ddd964fb444b665e4da982e",
"type": "github"
},
"original": {
@ -77,11 +77,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1668108235,
"narHash": "sha256-/Di1OkjDhSrkDi1i/V1T+9NnmWBm8VBAg9xRoX4Xy8E=",
"lastModified": 1668163658,
"narHash": "sha256-sOVWRdSx9fTIKvHxglj+rZQLhPNR3yf8VERJjaLfioE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "58f933e321d5076cab0e0a98b994d84a9f175d40",
"rev": "37e9b04dd221eb11b6de8727e37ed55c7dbdfb6f",
"type": "github"
},
"original": {

View file

@ -22,7 +22,7 @@ with lib; {
hardware = {
enableRedistributableFirmware = true;
nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
# nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
# nvidia.nvidiaPersistenced = true; # HEADLESS
# nvidia.prime = {
# offload.enable = false;
@ -209,7 +209,7 @@ with lib; {
};
xserver = {
# enable = true;
videoDrivers = [ "nvidia" ];
# videoDrivers = [ "nvidia" ];
# layout = "it";
# xkbOptions = "eurosign:e;";
# libinput.enable = true;
@ -386,16 +386,106 @@ with lib; {
# virtualbox.host.enable = true;
oci-containers.containers = {
hass = {
image = "ghcr.io/home-assistant/home-assistant:stable";
environment = { TZ = "Europe/Rome"; };
extraOptions = [ "--privileged" "--network=host" "--pull=always" ];
ports = [ "8123:8123" ];
volumes = [ "/var/lib/hass:/config" "/mnt/raid0/condiviso:/media" ];
};
# hass = {
# image = "ghcr.io/home-assistant/home-assistant:stable";
# environment = { TZ = "Europe/Rome"; };
# extraOptions = [ "--privileged" "--network=host" "--pull=always" ];
# ports = [ "8123:8123" ];
# volumes = [ "/var/lib/hass:/config" "/mnt/raid0/condiviso:/media" ];
# };
};
};
services.home-assistant = {
enable = true;
# package = pkgs.unstable.home-assistant;
# openFirewall = true;
# config = {
# default_config = { };
# name = "Casa";
# latitude = 45.05197317019396;
# longitude = 11.653331816196443;
# elevation = 17;
# unit_system = "metric";
# time_zone = "Europe/Rome";
# };
config = null;
configDir = "/var/lib/hass";
configWritable = true;
extraComponents = [
"default_config"
"accuweather"
"alert"
"analytics"
"automation"
"backup"
"bayesian"
"binary_sensor"
"blueprint"
# "bluetooth_le_tracker"
# "bluetooth_tracker"
"button"
"camera"
"cast"
"citybikes"
"config"
"configurator"
"coronavirus"
"counter"
"cover"
"default_config"
"derivative"
"device_automation"
"device_sun_light_trigger"
"device_tracker"
"dhcp"
"dlib_face_detect"
"dlib_face_identify"
"dlna_dmr"
"dlna_dms"
"esphome"
"flux"
"group"
"hassio"
"input_boolean"
"input_button"
"input_datetime"
"input_number"
"input_select"
"input_text"
"jellyfin"
"local_file"
"media_player"
"met"
# "meteoalarm"
"mobile_app"
"network"
"notify"
"ping"
"plex"
"proximity"
"radarr"
"radio_browser"
"random"
# "schedule"
"script"
"sonarr"
# "spotify"
"tcp"
"template"
"threshold"
"timer"
"tod" # times of the day
"trend"
"upnp"
"workday"
"zeroconf"
"zoneminder"
];
};
security.sudo.extraConfig = ''
Defaults pwfeedback
'';

View file

@ -1,6 +1,7 @@
{
{ pkgs, ... }: {
services.zerotierone = {
enable = true;
package = pkgs.unstable.zerotierone;
joinNetworks = [ "8056c2e21cf9c753" ];
};
}