diff options
Diffstat (limited to 'makefu/2configs')
-rw-r--r-- | makefu/2configs/bureautomation/default.nix | 2 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/rhasspy.nix | 41 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/zigbee2mqtt/default.nix | 1 | ||||
-rw-r--r-- | makefu/2configs/default.nix | 2 | ||||
-rw-r--r-- | makefu/2configs/editor/vim.nix | 3 | ||||
-rw-r--r-- | makefu/2configs/editor/vimrc | 6 | ||||
-rw-r--r-- | makefu/2configs/home/ham/sensor/outside.nix | 14 |
7 files changed, 66 insertions, 3 deletions
diff --git a/makefu/2configs/bureautomation/default.nix b/makefu/2configs/bureautomation/default.nix index 44690271d..cd162ba3b 100644 --- a/makefu/2configs/bureautomation/default.nix +++ b/makefu/2configs/bureautomation/default.nix @@ -10,6 +10,7 @@ in { # ./puppy-proxy.nix ./zigbee2mqtt + ./rhasspy.nix # hass config ## complex configs @@ -64,6 +65,7 @@ in { extraOptions = ["--net=host" ]; volumes = [ "${confdir}:/config" + "/data/music:/config/media" #"${confdir}/docker-run:/etc/services.d/home-assistant/run:" ]; }; diff --git a/makefu/2configs/bureautomation/rhasspy.nix b/makefu/2configs/bureautomation/rhasspy.nix new file mode 100644 index 000000000..8fbfd9312 --- /dev/null +++ b/makefu/2configs/bureautomation/rhasspy.nix @@ -0,0 +1,41 @@ +{ config, ... }: +let + profiles = "/var/lib/rhasspy"; + kiosk_id = toString config.users.users.kiosk.uid; +in +{ + virtualisation.oci-containers.containers.rhasspy = { + image = "rhasspy/rhasspy:latest"; + + environment = { + TZ = "Europe/Berlin"; + #PULSE_SERVER = "unix:/run/user/0/pulse/native"; + PULSE_SERVER = "tcp:${ config.krebs.build.host.name }:4713"; + + }; + + ports = [ + "12101:12101" + # "12183:12183" + ]; + #user = kiosk_id; + + volumes = [ + "/etc/localtime:/etc/localtime:ro" + "${profiles}:/profiles" + # TODO pulseaudio + #"/run/user/${kiosk_id}/pulse/native:/run/user/0/pulse/native" + #"${config.users.users.kiosk.home}/.config/pulse/cookie:/root/.config/pulse/cookie:ro" + ]; + + cmd = [ "--user-profiles" "/profiles" "--profile" "de" ]; + extraOptions = [ + "--device=/dev/snd:/dev/snd" "--group-add=audio" + "--net=host" + ]; + }; + systemd.tmpfiles.rules = [ + "d ${profiles} 0770 root root - -" + ]; + systemd.services.docker-rhasspy.after = [ "desktop-manager.service" ]; +} diff --git a/makefu/2configs/bureautomation/zigbee2mqtt/default.nix b/makefu/2configs/bureautomation/zigbee2mqtt/default.nix index b35019793..d42abd790 100644 --- a/makefu/2configs/bureautomation/zigbee2mqtt/default.nix +++ b/makefu/2configs/bureautomation/zigbee2mqtt/default.nix @@ -16,6 +16,7 @@ in permit_join = true; serial.port = "/dev/cc2531"; homeassistant = true; + frontend.port = 8521; }; }; diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 9a08a4497..ef4f8fbcd 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -68,7 +68,7 @@ with import <stockholm/lib>; }; nixpkgs.config.packageOverrides = pkgs: { - nano = pkgs.runCommand "empty" {} "mkdir -p $out"; + #nano = pkgs.runCommand "empty" {} "mkdir -p $out"; tinc = pkgs.tinc_pre; }; diff --git a/makefu/2configs/editor/vim.nix b/makefu/2configs/editor/vim.nix index b37f2409a..f53be58ff 100644 --- a/makefu/2configs/editor/vim.nix +++ b/makefu/2configs/editor/vim.nix @@ -11,7 +11,8 @@ "YouCompleteMe" #"UltiSnips" # vim-nix handles indentation better but does not perform sanity - "vim-addon-nix" + "vim-nix" + # "vim-addon-nix" "vim-better-whitespace" ]; }; diff --git a/makefu/2configs/editor/vimrc b/makefu/2configs/editor/vimrc index 309e81a05..e24d29974 100644 --- a/makefu/2configs/editor/vimrc +++ b/makefu/2configs/editor/vimrc @@ -7,7 +7,7 @@ set listchars=tab:▸\ filetype off filetype plugin indent on -colorscheme darkblue +colorscheme desert set background=dark set number @@ -49,6 +49,10 @@ set matchtime=3 set hlsearch autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red +hi MatchParen cterm=none ctermbg=green ctermfg=blue + +let g:better_whitespace_enabled=1 +let g:strip_whitespace_on_save=1 " save on focus lost diff --git a/makefu/2configs/home/ham/sensor/outside.nix b/makefu/2configs/home/ham/sensor/outside.nix index d05e8a1f6..e7467617b 100644 --- a/makefu/2configs/home/ham/sensor/outside.nix +++ b/makefu/2configs/home/ham/sensor/outside.nix @@ -26,5 +26,19 @@ { platform = "met"; } + { + platform = "openweathermap"; + api_key = "!secret openweathermap"; + language = "de"; + mode = "hourly"; + } + { + platform = "tomorrowio"; + api_key = "!secret tomorrowio"; + } + { platform = "octoprint"; } + { platform = "accuweather"; + api_key = "!secret accuweather"; + } ]; } |