2023-07-01 18:46:19 +02:00
|
|
|
{
|
|
|
|
description = "Home Assistant example for Self Host Blocks";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
|
|
|
|
|
|
selfhostblocks.url = "/home/timi/Projects/selfhostblocks";
|
|
|
|
selfhostblocks.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
selfhostblocks.inputs.sops-nix.follows = "sops-nix";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs@{ self, nixpkgs, sops-nix, selfhostblocks, ... }: {
|
|
|
|
colmena = {
|
|
|
|
meta = {
|
|
|
|
nixpkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
|
|
|
specialArgs = inputs;
|
|
|
|
};
|
|
|
|
|
2023-11-19 18:06:53 +01:00
|
|
|
myserver = { config, ... }: {
|
2023-07-01 18:46:19 +02:00
|
|
|
deployment = {
|
2023-11-19 18:06:53 +01:00
|
|
|
targetHost = "example";
|
2023-07-01 18:46:19 +02:00
|
|
|
targetPort = 2222;
|
|
|
|
targetUser = "nixos";
|
|
|
|
};
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
./configuration.nix
|
|
|
|
sops-nix.nixosModules.default
|
2023-11-19 18:06:53 +01:00
|
|
|
selfhostblocks.nixosModules.x86_64-linux.default
|
2023-07-01 18:46:19 +02:00
|
|
|
];
|
|
|
|
|
2023-11-19 18:06:53 +01:00
|
|
|
# Set to true for more debug info with `journalctl -f -u nginx`.
|
|
|
|
shb.nginx.accessLog = true;
|
|
|
|
shb.nginx.debugLog = true;
|
|
|
|
|
|
|
|
shb.ldap = {
|
|
|
|
enable = true;
|
|
|
|
domain = "example.com";
|
|
|
|
subdomain = "ldap";
|
|
|
|
ldapPort = 3890;
|
|
|
|
httpPort = 17170;
|
|
|
|
dcdomain = "dc=example,dc=com";
|
|
|
|
sopsFile = ./secrets.yaml;
|
|
|
|
};
|
|
|
|
|
2023-07-01 18:46:19 +02:00
|
|
|
shb.home-assistant = {
|
|
|
|
enable = true;
|
2023-11-19 18:06:53 +01:00
|
|
|
domain = "example.com";
|
|
|
|
ldapEndpoint = "http://127.0.0.1:${builtins.toString config.shb.ldap.httpPort}";
|
2023-07-01 18:46:19 +02:00
|
|
|
subdomain = "ha";
|
|
|
|
sopsFile = ./secrets.yaml;
|
|
|
|
};
|
2023-11-19 18:06:53 +01:00
|
|
|
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
nix.settings.trusted-users = [
|
|
|
|
"nixos"
|
|
|
|
];
|
2023-07-01 18:46:19 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|