NixOS - flake input for setting up services.teslamate? #4753
shaunsmiley-xevo
started this conversation in
General
Replies: 1 comment
-
This does need to be better documented. Am assuming this is a nixos flake that uses In the teslamate.url = "github:teslamate-org/teslamate/main"; Or if you want the mcu2 branch: teslamate.url = "github:teslamate-org/teslamate/mcu2-upgraded-cars"; Add the outputs =
inputs:
[...] In the call to nixosSystem call add nixosConfigurations.iot2 = inputs.nixpkgs-stable.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ... ];
specialArgs = {
inherit (inputs) teslamate;
};
}; (your flake probably won't look exactly like this) Then update the module as per my other post: {
config,
teslamate,
...
}: {
age.secrets.teslamate = {file = ../secrets/teslamate.age;};
imports = [teslamate.nixosModules.default];
services.teslamate = {
enable = true;
secretsFile = config.age.secrets.teslamate.path;
listenAddress = "127.0.0.1";
port = 4001;
virtualHost = "[censored]";
postgres = {
user = "teslamate";
database = "teslamate";
host = "localhost";
};
mqtt = {
enable = true;
host = "[censored]";
port = 8883;
};
grafana = {
enable = true;
listenAddress = "127.0.0.1";
port = 3000;
};
};
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've used the docker compose for some time via https://github.com/aksiksi/compose2nix. I just discovered there has been a nix folder here the whole time!
However, I don't see a flake.nix nor any instructions on a recommended way of consuming this as a module on a standard NixOS setup using flakes.
NB: I did see #4503, but that didn't seem to give the info I seek.
Beta Was this translation helpful? Give feedback.
All reactions