wip
This commit is contained in:
@@ -9,19 +9,9 @@
|
|||||||
includes = [
|
includes = [
|
||||||
<modules/raspberry-pi/5>
|
<modules/raspberry-pi/5>
|
||||||
<modules/services/traefik>
|
<modules/services/traefik>
|
||||||
|
<modules/services/home-assistant>
|
||||||
];
|
];
|
||||||
nixos = {
|
nixos = {
|
||||||
users.users = {
|
|
||||||
doloro = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [
|
|
||||||
"wheel"
|
|
||||||
"docker"
|
|
||||||
];
|
|
||||||
initialPassword = "meowmeowmeow";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "nixos-001-rp5";
|
networking.hostName = "nixos-001-rp5";
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
|
|||||||
@@ -6,20 +6,34 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# The single rpi5 i have running on the side of my desk
|
# The single rpi5 i have running on the side of my desk
|
||||||
den.aspects.doloro-server = {
|
den.aspects = {
|
||||||
includes = [ <modules/publicKeys/doloro> ];
|
doloro-server = {
|
||||||
|
includes = [
|
||||||
|
<modules/publicKeys/doloro>
|
||||||
|
];
|
||||||
|
nixos = {
|
||||||
|
users.users.doloro = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root-server = {
|
||||||
|
includes = [
|
||||||
|
<modules/publicKeys/doloro>
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
den.hosts.aarch64-linux.rpi5 = {
|
den.hosts.aarch64-linux.rpi5 = {
|
||||||
includes = [ ];
|
includes = [ ];
|
||||||
users.doloro = {
|
users.doloro = {
|
||||||
includes = [
|
|
||||||
<modules/user/groups>
|
|
||||||
<modules/publicKeys/doloro>
|
|
||||||
];
|
|
||||||
aspect = "doloro-server";
|
aspect = "doloro-server";
|
||||||
};
|
};
|
||||||
users.root = {
|
users.root = {
|
||||||
includes = [ <modules/publicKeys/doloro> ];
|
aspect = "root-server";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
36
config/modules/services/home-assistant.nix
Normal file
36
config/modules/services/home-assistant.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
den,
|
||||||
|
__findFile,
|
||||||
|
modules,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# Basic traefik
|
||||||
|
modules.services.provides.home-assistant = {
|
||||||
|
nixos =
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
homeAssistantImg = pkgs.dockerTools.pullImage {
|
||||||
|
imageName = "homeassistant/home-assistant";
|
||||||
|
imageDigest = "sha256:17441c45ba14560b4ef727ee06aac4d605cf0dc0625fc4f2e043cb2551d72749";
|
||||||
|
finalImageName = "homeassistant/home-assistant";
|
||||||
|
finalImageTag = "latest";
|
||||||
|
sha256 = "sha256-fSQ3luRSFHiWP0qDzsiZsEf/l+wYgyrdicjSayZ61yQ=";
|
||||||
|
arch = "aarch64";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
home-assistant = {
|
||||||
|
image = "homeassistant/home-assistant";
|
||||||
|
imageFile = homeAssistantImg;
|
||||||
|
labels = {
|
||||||
|
"traefik.enable" = "true";
|
||||||
|
"traefik.http.routers.websecure.service" = "home-assistant";
|
||||||
|
"traefik.http.routers.websecure.rule" = "Host(`ha.home.doloro.co.uk`)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -39,7 +39,6 @@
|
|||||||
};
|
};
|
||||||
providers = {
|
providers = {
|
||||||
docker = {
|
docker = {
|
||||||
endpoint = "unix:///var/run/docker.sock";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
api.dashboard = true;
|
api.dashboard = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user