Merge remote-tracking branch 'gum/master'

This commit is contained in:
lassulus 2020-08-19 21:16:14 +02:00
commit 6538131f91
13 changed files with 109 additions and 6 deletions

View File

@ -10,8 +10,12 @@ before_script:
- chmod 600 ~/.ssh/gitlab_deploy.key - chmod 600 ~/.ssh/gitlab_deploy.key
- echo "$ssh_git_shackspace_serverkey" >> ~/.ssh/known_hosts - echo "$ssh_git_shackspace_serverkey" >> ~/.ssh/known_hosts
# import secret key for secrets # import secret key for secrets
- which gpg
- which gpg2
- echo "$secrets_gpg_key" | gpg --import - echo "$secrets_gpg_key" | gpg --import
deployment test: deployment test:
tags:
- nix
stage: test stage: test
script: script:
- GIT_SSH_COMMAND="ssh -i ~/.ssh/gitlab_deploy.key" git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain - GIT_SSH_COMMAND="ssh -i ~/.ssh/gitlab_deploy.key" git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain
@ -21,6 +25,8 @@ deployment test:
- $(nix-build krebs/krops.nix --no-out-link --argstr name puyak --argstr target /tmp -A test) - $(nix-build krebs/krops.nix --no-out-link --argstr name puyak --argstr target /tmp -A test)
nix-shell test: nix-shell test:
stage: test stage: test
tags:
- nix
script: script:
- nix-shell --pure --command 'true' -p stdenv && echo success - nix-shell --pure --command 'true' -p stdenv && echo success
- nix-shell --pure --command 'false' -p stdenv || echo success - nix-shell --pure --command 'false' -p stdenv || echo success
@ -29,6 +35,9 @@ nix-shell test:
- gpg --version - gpg --version
- curl --version - curl --version
wolf deployment: wolf deployment:
tags:
- shacklan
- nix
stage: deploy stage: deploy
script: script:
- cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa - cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa
@ -44,6 +53,9 @@ wolf deployment:
- .gitmodules - .gitmodules
puyak deployment: puyak deployment:
stage: deploy stage: deploy
tags:
- shacklan
- nix
script: script:
- cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa - cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa
- git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain - git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain
@ -58,6 +70,8 @@ puyak deployment:
- .gitmodules - .gitmodules
nur-packages makefu: nur-packages makefu:
stage: deploy stage: deploy
tags:
- nix
script: script:
- git reset --hard origin/master - git reset --hard origin/master
- git filter-branch -f --prune-empty --subdirectory-filter makefu/5pkgs HEAD - git filter-branch -f --prune-empty --subdirectory-filter makefu/5pkgs HEAD

View File

@ -14,6 +14,8 @@ in
## registrationConfigurationFile contains: ## registrationConfigurationFile contains:
# CI_SERVER_URL=<CI server URL> # CI_SERVER_URL=<CI server URL>
# REGISTRATION_TOKEN=<registration secret> # REGISTRATION_TOKEN=<registration secret>
# RUNNER_TAG_LIST=nix,shacklan
# RUNNER_NAME=stockholm-runner-$name
registrationConfigFile = <secrets/shackspace-gitlab-ci>; registrationConfigFile = <secrets/shackspace-gitlab-ci>;
#gracefulTermination = true; #gracefulTermination = true;
}; };

View File

@ -2,7 +2,7 @@
# switch.crafting_giesskanne_relay # switch.crafting_giesskanne_relay
let let
glados = import ../lib; glados = import ../lib;
seconds = 5; seconds = 10;
wasser = "switch.crafting_giesskanne_relay"; wasser = "switch.crafting_giesskanne_relay";
in in
{ {

View File

@ -33,6 +33,10 @@
printing = bsd printing = bsd
printcap name = /dev/null printcap name = /dev/null
disable spoolss = yes disable spoolss = yes
# for legacy systems
client min protocol = NT1
server min protocol = NT1
''; '';
}; };
} }

View File

@ -0,0 +1,4 @@
{
MATRIX_TOKEN="a";
MATRIX_ID="b";
}

View File

@ -3,4 +3,8 @@
platform = "generic"; platform = "generic";
still_image_url = http://127.0.0.1:8123/local/lines.png ; still_image_url = http://127.0.0.1:8123/local/lines.png ;
} }
{ name = "XKCD";
platform = "generic";
still_image_url = http://127.0.0.1:8123/local/xkcd.png ;
}
] ]

View File

@ -6,21 +6,29 @@ let
in { in {
systemd.services.comic-updater = { systemd.services.comic-updater = {
startAt = "daily"; startAt = "daily";
description = "Send led change to message queue"; description = "update our comics";
after = [ "network-online.target" ] ++ (lib.optional config.services.mosquitto.enable "mosquitto.service"); after = [ "network-online.target" ] ++ (lib.optional config.services.mosquitto.enable "mosquitto.service");
path = with pkgs; [ wget xmlstarlet ]; path = with pkgs; [ wget xmlstarlet ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
User = "hass"; User = "hass";
WorkingDirectory = config.services.home-assistant.configDir; WorkingDirectory = config.services.home-assistant.configDir;
ExecStart = pkgs.writeDash "update-poorly-drawn-lines" '' ExecStart = pkgs.writeDash "update-comics" ''
set -euf set -euf
mkdir -p www/ mkdir -p www/
cd www/ cd www/
# poorly drawn lines
pic=$(wget -O- http://www.poorlydrawnlines.com/feed/ \ pic=$(wget -O- http://www.poorlydrawnlines.com/feed/ \
| xml sel -t -v '/rss/channel/item/content:encoded' \ | xml sel -t -v '/rss/channel/item/content:encoded' \
| head -n 2 | sed -n 's/.*src="\([^"]\+\)".*/\1/p' ) | head -n 2 | sed -n 's/.*src="\([^"]\+\)".*/\1/p' )
wget "$pic" -nc && cp -v "$(basename "$pic")" lines.png wget "$pic" -nc && cp -v "$(basename "$pic")" lines.png
#pic=$(curl -L xkcd.com 2>/dev/null | grep imgs.xkcd.com | grep title | sed -n 's/.*src="\([^"]\+\)" .*/https:\1/p')
# xkcd
pic=$(wget -O- https://xkcd.com/rss.xml \
| xml sel -t -v '/rss/channel/item/description' \
| head -n 1 | sed -n 's/.*src="\([^"]\+\)".*/\1/p' )
wget "$pic" -nc && cp -v "$(basename "$pic")" xkcd.png
''; '';
PrivateTmp = true; PrivateTmp = true;
}; };

View File

@ -137,9 +137,9 @@ in {
++ frosch.binary_sensor ++ frosch.binary_sensor
++ aramark.binary_sensor; ++ aramark.binary_sensor;
sensor = sensor = []
# [{ platform = "version"; }] ++ # pyhaversion ++ [{ platform = "version"; }] # pyhaversion
(import ./sensor/pollen.nix) ++ (import ./sensor/pollen.nix)
++ (import ./sensor/espeasy.nix) ++ (import ./sensor/espeasy.nix)
++ (import ./sensor/airquality.nix) ++ (import ./sensor/airquality.nix)
++ ((import ./sensor/outside.nix) {inherit lib;}) ++ ((import ./sensor/outside.nix) {inherit lib;})
@ -238,6 +238,7 @@ in {
"camera.Autobahn_Singen" "camera.Autobahn_Singen"
"camera.puppies" "camera.puppies"
"camera.poorly_drawn_lines" "camera.poorly_drawn_lines"
"camera.xkcd"
]; ];
nachtlicht = [ nachtlicht = [
"switch.nachtlicht_a" "switch.nachtlicht_a"

View File

@ -19,6 +19,7 @@ let
cgit.desc = "Yet Another Check-Out System"; cgit.desc = "Yet Another Check-Out System";
}; };
ebk-notify.cgit.desc = "Ebay Kleinanzeigen Notify"; ebk-notify.cgit.desc = "Ebay Kleinanzeigen Notify";
kalauerbot.cgit.desc = "Kalauer König";
}; };
krebs-repos = mapAttrs make-krebs-repo { krebs-repos = mapAttrs make-krebs-repo {

View File

@ -5,5 +5,7 @@
hdl-dump hdl-dump
bin2iso bin2iso
cue2pops cue2pops
nx_game_info
hactool
]; ];
} }

View File

@ -7,6 +7,7 @@
vlc vlc
mumble mumble
mplayer mplayer
mpv
# quodlibet # exfalso # quodlibet # exfalso
tinymediamanager tinymediamanager

View File

@ -0,0 +1,30 @@
{ lib, stdenv, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "hactool";
name = "${pname}-${version}";
version = "1.4.0";
src = fetchFromGitHub {
owner = "SciresM";
repo = "hactool";
rev = version;
sha256 = "0305ngsnwm8npzgyhyifasi4l802xnfz19r0kbzzniirmcn4082d";
};
preBuild = ''
cp config.mk.template config.mk
'';
installPhase = ''
install -D hactool $out/bin/hactool
'';
buildInputs = [ ];
nativeBuildInputs = [ ];
meta = {
description = "tool to view information about, decrypt, and extract common file formats for the Nintendo Switch, especially Nintendo Content Archives";
homepage = https://github.com/SciresM/hactool;
license = stdenv.lib.licenses.isc;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ makefu ];
};
}

View File

@ -0,0 +1,32 @@
{ lib, stdenv, fetchurl , mono , unzip
}:
stdenv.mkDerivation rec {
pname = "NX_Game_Info";
name = "${pname}-${version}";
version = "0.7.1";
src = fetchurl {
url = "https://github.com/garoxas/NX_Game_Info/releases/download/v${version}/NX.Game.Info_${version}_cli.zip";
sha256 = "179hkgraydm5hg5fcs1xwh07cx7rbcfwklfak83f0sl1pbya542h";
};
sourceRoot = ".";
buildInputs = [ unzip ];
buildPhase = ":";
installPhase = ''
mkdir -p $out/{bin,lib}
cp * $out/lib/
cat > $out/bin/nxgameinfo_cli <<EOF
${mono}/bin/mono $out/lib/nxgameinfo_cli.exe "\$@"
EOF
chmod +x $out/bin/nxgameinfo_cli
'';
meta = {
description = "Tool to read information from Nintendo Switch game files";
homepage = https://github.com/garoxas/NX_Game_Info;
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ makefu ];
};
}