updated nix based backend image generation

This commit is contained in:
Sebastian Wendel 2023-06-19 14:35:24 +02:00
parent f0701f9b2c
commit 1c770042c6
No known key found for this signature in database
GPG key ID: 14ED8B1EC3371ECE
4 changed files with 25 additions and 6 deletions

View file

@ -1,5 +1,5 @@
{ {
description = "FabNet IoT Platform"; description = "Smart Energy Monitor";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -91,11 +91,11 @@
}; };
deploy.nodes.gateway = { deploy.nodes.gateway = {
hostname = "fabnet"; hostname = "sem";
fastConnection = true; fastConnection = true;
profiles = { profiles = {
system = { system = {
sshUser = "fabnet"; sshUser = "sem";
path = path =
deploy-rs.lib.aarch64-linux.activate.nixos deploy-rs.lib.aarch64-linux.activate.nixos
self.nixosConfigurations.gateway; self.nixosConfigurations.gateway;

View file

@ -1,7 +1,7 @@
{self, ...}: system: {self, ...}: system:
with self.pkgs.${system}; with self.pkgs.${system};
mkShell { mkShell {
name = "FabNet"; name = "Smart Energy Monitor";
nativeBuildInputs = nativeBuildInputs =
[ [
# Development # Development

View file

@ -20,7 +20,7 @@
]; ];
system.stateVersion = lib.mkForce "23.05"; system.stateVersion = lib.mkForce "23.05";
networking.hostName = "fabnet"; networking.hostName = "sem";
networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" config.networking.hostName); networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" config.networking.hostName);
networking.firewall.allowedTCPPorts = lib.mkDefault [ networking.firewall.allowedTCPPorts = lib.mkDefault [
1880 # Node-Red 1880 # Node-Red
@ -38,7 +38,26 @@
services.node-red.enable = lib.mkDefault true; services.node-red.enable = lib.mkDefault true;
services.influxdb2.enable = lib.mkDefault true; services.influxdb2.enable = lib.mkDefault true;
services.prometheus.enable = lib.mkDefault true; services.prometheus.enable = lib.mkDefault true;
services.octoprint.enable = lib.mkDefault true; services.octoprint.enable = lib.mkDefault true;
services.octoprint.plugins = plugins:
with plugins; [
themeify
stlviewer
];
services.octoprint.extraConfig = lib.mkDefault {
appearance.name = "FabNet";
api.enabled = true;
slicing.enabled = true;
serial = {
port = "/dev/ttyACM0";
autoconnect = true;
};
webcam = {
stream = "http://<stream host>:<stream port>/?action=stream";
ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg";
};
};
services.grafana.enable = lib.mkDefault true; services.grafana.enable = lib.mkDefault true;
services.grafana.settings.server.http_port = 7878; services.grafana.settings.server.http_port = 7878;

View file

@ -5,7 +5,7 @@
... ...
}: { }: {
networking.firewall.enable = lib.mkForce true; networking.firewall.enable = lib.mkForce true;
networking.wireless.enable = lib.mkDefault true; # networking.wireless.enable = lib.mkDefault true;
networking.networkmanager.enable = lib.mkDefault true; networking.networkmanager.enable = lib.mkDefault true;
services.avahi.enable = lib.mkDefault true; services.avahi.enable = lib.mkDefault true;