From e27e76e3160c93808338d824f0bb4a5ebb8ad6d5 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 14 Dec 2019 18:15:37 +1300 Subject: [PATCH] porani: setup to be a video box --- configs/porani/configuration.nix | 35 ++++++++++++++++-------------- configs/porani/kodi.nix | 8 ++++++- system/all/default.nix | 2 +- system/server/graylog-exporter.nix | 3 ++- system/server/netdata.nix | 2 +- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/configs/porani/configuration.nix b/configs/porani/configuration.nix index 0c8566d..520883e 100644 --- a/configs/porani/configuration.nix +++ b/configs/porani/configuration.nix @@ -10,7 +10,7 @@ #./packages.nix #./home-assistant.nix #./wifi-access-point.nix - #./kodi.nix + ./kodi.nix #./mpd.nix ]; @@ -29,29 +29,32 @@ environment.systemPackages = [ pkgs.mosh ]; # wifi setup - #system.custom.wifi = { - # enable = true; - # configurationFile = ; - # interfaces = [ "wlp3s0" ]; - #}; - # nix-shell -p speedtest_cli --run speedtest - #configuration.fireqos = { - # enable = true; - # interface = "wlp3s0"; - # input = 2500; - # output = 1200; - # balance = false; - #}; - + system.custom.wifi = { + enable = true; + configurationFile = ; + interfaces = [ "wlp3s0" ]; + }; # nix-shell -p speedtest_cli --run speedtest configuration.fireqos = { enable = true; - interface = "eth0"; + interface = "wlp3s0"; input = 2500; output = 1200; balance = false; }; + # nix-shell -p speedtest_cli --run speedtest + #configuration.fireqos = { + # enable = true; + # interface = "eth0"; + # input = 2500; + # output = 1200; + # balance = false; + #}; + + # new Zealand overwrites + services.netdata.enable = lib.mkForce false ; + services.SystemdJournal2Gelf.enable = lib.mkForce false; } diff --git a/configs/porani/kodi.nix b/configs/porani/kodi.nix index 27dc32b..9dfb671 100644 --- a/configs/porani/kodi.nix +++ b/configs/porani/kodi.nix @@ -4,7 +4,7 @@ services.xserver = { enable = true; - autorun = false; + autorun = true; desktopManager = { kodi.enable = true; default = "kodi"; @@ -14,6 +14,12 @@ enable = true; autoLogin.enable = true; autoLogin.user = config.users.users.kodi.name; + + # todo test it + # if kodi crashes restart the whole xsession to trigger the login + extraConfig = '' + session-cleanup-script=service lightdm restart + ''; }; }; diff --git a/system/all/default.nix b/system/all/default.nix index a5a1df3..086177f 100644 --- a/system/all/default.nix +++ b/system/all/default.nix @@ -11,7 +11,7 @@ # cross-compiling - + # ./grub.nix ./networking-qos.nix diff --git a/system/server/graylog-exporter.nix b/system/server/graylog-exporter.nix index 92a0922..e976bde 100644 --- a/system/server/graylog-exporter.nix +++ b/system/server/graylog-exporter.nix @@ -1,5 +1,6 @@ +{ lib, ... }: { # send data to graylog - services.SystemdJournal2Gelf.enable = true; + services.SystemdJournal2Gelf.enable = lib.mkDefault true; services.SystemdJournal2Gelf.graylogServer = "workhorse.private:11201"; } diff --git a/system/server/netdata.nix b/system/server/netdata.nix index da4336b..4f52bba 100644 --- a/system/server/netdata.nix +++ b/system/server/netdata.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { services.netdata = { - enable = true; + enable = lib.mkDefault true; # https://docs.netdata.cloud/daemon/config/ config = { global = {