config upd
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{ dream2nix, ... }:
|
||||
let
|
||||
hostAddress = "10.0.1.3";
|
||||
localAddress = "10.0.2.3";
|
||||
hassPort = 8192;
|
||||
hostAddress = "10.0.1.4";
|
||||
localAddress = "10.0.4.2";
|
||||
hassPort = 8123;
|
||||
in
|
||||
{
|
||||
containers.homeassistant = {
|
||||
@@ -11,13 +11,23 @@ in
|
||||
hostAddress = hostAddress;
|
||||
localAddress = localAddress;
|
||||
|
||||
bindMounts = {
|
||||
"/var/lib/homeassistant" = {
|
||||
hostPath = "/var/lib/homeassistant";
|
||||
isReadOnly = false;
|
||||
};
|
||||
USB0 = {
|
||||
hostPath = "/dev/ttyUSB0";
|
||||
mountPoint = "/dev/ttyUSB0";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = { lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./homeassistant.nix
|
||||
({ ... }: { _module.args.dream2nix = dream2nix; })
|
||||
./homeassistant.nix
|
||||
];
|
||||
# inherit dream2nix;
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
@@ -30,13 +40,10 @@ in
|
||||
};
|
||||
|
||||
# Create and set permissions for required directories
|
||||
system.activationScripts.gitea-dirs = ''
|
||||
mkdir -p /var/lib/gitea
|
||||
chown -R gitea:gitea /var/lib/gitea
|
||||
chmod -R 775 /var/lib/gitea
|
||||
mkdir -p /run/secrets/jallen-nas
|
||||
chown -R gitea:gitea /run/secrets/jallen-nas
|
||||
chmod -R 775 /run/secrets/jallen-nas
|
||||
system.activationScripts.hass-dirs = ''
|
||||
mkdir -p /var/lib/homeassistant
|
||||
chown -R homeassistant:homeassistant /var/lib/homeassistat
|
||||
chmod -R 775 /var/lib/homeassistant
|
||||
'';
|
||||
|
||||
services.resolved.enable = true;
|
||||
@@ -52,4 +59,4 @@ in
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user