diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/3modules/makefu/default.nix | 27 | ||||
-rw-r--r-- | krebs/3modules/tinc_graphs.nix | 2 | ||||
-rw-r--r-- | krebs/5pkgs/simple/brain/default.nix | 12 | ||||
-rw-r--r-- | krebs/5pkgs/simple/krebszones/default.nix | 36 | ||||
-rw-r--r-- | krebs/5pkgs/simple/ovh-zone/default.nix | 25 | ||||
-rw-r--r-- | krebs/5pkgs/simple/urlencode/default.nix | 22 |
6 files changed, 99 insertions, 25 deletions
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index c95e1761c..4c0ce0fe3 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -782,6 +782,29 @@ with import <stockholm/lib>; }; }; + horisa = rec { + cores = 2; + nets = { + retiolum = { + ip4.addr = "10.243.226.213"; + ip6.addr = "42:432e:2379:0cd2:8486:f3b5:335a:5d83"; + aliases = [ + "horisa.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEA1hhBqCku98gimv0yXr6DFwE2HUemigyqX8o7IsPOW5XT/K8o+V40 + Oxk3r0+c7IYREvug/raxoullf5TMJFzTzqzX4njgsiTs25V8D7hVT4jcRKTcXmBn + XpjtD+tIeDW1E6dIMMDbxKCyfd/qaeg83G7gPobeFYr4JNqQLXrnotlWMO9S13UT + +EgSP2pixv/dGIqX8WRg23YumO8jZKbso/sKKFMIEOJvnh/5EcWb24+q2sDRCitP + sWJ5j/9M1Naec/Zl27Ac2HyMWRk39F9Oo+iSbc47QvjKTEmn37P4bBg3hY9FSSFo + M90wG/NRbw1Voz6BgGlwOAoA+Ln0rVKqDQIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; + tahoe = rec { cores = 1; nets = { @@ -942,6 +965,10 @@ with import <stockholm/lib>; ciko = { mail = "wieczorek.stefan@googlemail.com"; }; + ulrich = { + pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1sobyfvUu/G2Ms+T0cI4CSgtjCoO2qEYVK1jkqC2A9mLJfNoPsToLowfGszpOAM9S4Rtn+OJ+vPMvs2E4pkZmXcmJZFAKKPNadmzwqCQyskBdoyszkj7DXngX56ZQ+ZEf+vPp2tu/IN0CFNVUllUcWP2TD2ECH5qkBODBHLyGf4PvV35yGpuYNFhFSWkTxwXZ7d5eat2kmwTfryX91Z+M901t6MK0ADyUwBkbotwSn/B6xUEZzExlGhRziRlIM0MrmSMvUA1mcmMJWVfHbb5Sw8yVstUuaU98C3EzDPNlVTbu5al2sDk4+jjireMMMVHC0j8aj7DlhvcF2t7ZpAKy+HN/PFuV7+RgN3DmIMLwbSRfykH3ATVdBzoL0/XmGBRXht6M22igAMFt9o/oHtwWt2JYcNX5poS8kLcjPzGHcx7KOslZ7VZev4BTpFAZIeMYhlzsNCI88bxUqdFxIcofNIQMy4Ep4qJXlgMduQbYtPDRpclDe82yiblhz48+HF/j8+0ZBx4w3jb4XBtgeTfwM2nARsD7MRzokfMfbGf6cZ8AU0/h69ECdsy2KYCKzgFxV/SHN2fDk6SZWLHmxDZ8N02VqgXMTvkYHvDBiaNxM0/iNMKqYCfuxjQPSusBENSgwhUnBGgoGYZuz0r2oMdtzqrkC/VbDxi5gSKl+ZoaMQ== shackspace.de@myvdr.de"; + mail = "shackspace.de@myvdr.de"; + }; exco = { mail = "dickbutt@excogitation.de"; pubkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7HCK+TzelJp7atCbvCbvZZnXFr3cE35ioactgpIJL7BOyQM6lJ/7y24WbbrstClTuV7n0rWolDgfjx/8kVQExP3HXEAgCwV6tIcX/Ep84EXSok7QguN0ozZMCwX9CYXOEyLmqpe2KAx3ggXDyyDUr2mWs04J95CFjiR/YgOhIfM4+gVBxGtLSTyegyR3Fk7O0KFwYDjBRLi7a5TIub3UYuOvw3Dxo7bUkdhtf38Kff8LEK8PKtIku/AyDlwZ0mZT4Z7gnihSG2ezR5mLD6QXVuGhG6gW/gsqfPVRF4aZbrtJWZCp2G21wBRafpEZJ8KFHtR18JNcvsuWA1HJmFOj2K0mAY5hBvzCbXGhSzBtcGxKOmTBDTRlZ7FIFgukP/ckSgDduydFUpsv07ZRj+qY07zKp3Nhh3RuN7ZcveCo2WpaAzTuWCMPB0BMhEQvsO8I/p5YtTaw2T1poOPorBbURQwEgNrZ92kB1lL5t1t1ZB4oNeDJX5fddKLkgnLqQZWOZBTKtoq0EAVXojTDLZaA+5z20h8DU7sicDQ/VG4LWtqm9fh8iDpvt/3IHUn/HJEEnlfE1Gd+F2Q+R80yu4e1PClmuzfWjCtkPc4aY7oDxfcJqyeuRW6husAufPqNs31W6X9qXwoaBh9vRQ1erZUo46iicxbzujXIy/Hwg67X8dw== dickbutt@excogitation.de"; diff --git a/krebs/3modules/tinc_graphs.nix b/krebs/3modules/tinc_graphs.nix index 197835e73..8390eccbb 100644 --- a/krebs/3modules/tinc_graphs.nix +++ b/krebs/3modules/tinc_graphs.nix @@ -48,7 +48,7 @@ let external domainname to be used for anonymous graphs it will be used if you want to enable ACME ''; - default = "graphs.krebsco.de"; + default = "graph.krebsco.de"; }; complete = mkOption { diff --git a/krebs/5pkgs/simple/brain/default.nix b/krebs/5pkgs/simple/brain/default.nix new file mode 100644 index 000000000..079db825f --- /dev/null +++ b/krebs/5pkgs/simple/brain/default.nix @@ -0,0 +1,12 @@ +{ pass, writeOut, writeDash, ... }: + +writeOut "brain" { + "/bin/brain-pass".link = writeDash "brain-pass" '' + PASSWORD_STORE_DIR=$HOME/brain \ + exec ${pass}/bin/pass $@ + ''; + "/bin/brain-passmenu".link = writeDash "brain-passmenu" '' + PASSWORD_STORE_DIR=$HOME/brain \ + exec ${pass}/bin/passmenu $@ + ''; +} diff --git a/krebs/5pkgs/simple/krebszones/default.nix b/krebs/5pkgs/simple/krebszones/default.nix index 9230192bd..b54c95d88 100644 --- a/krebs/5pkgs/simple/krebszones/default.nix +++ b/krebs/5pkgs/simple/krebszones/default.nix @@ -1,25 +1,13 @@ -{ lib, pkgs,python3Packages,fetchurl, ... }: +{ pkgs, ... }: -# TODO: Prepare a diff of future and current -## ovh-zone export krebsco.de --config ~/secrets/krebs/cfg.json |sed 's/[ ]\+/ /g' | sort current -## sed 's/[ ]\+/ /g'/etc/zones/krebsco.de | sort > future -## diff future.sorted current.sorted - -python3Packages.buildPythonPackage rec { - name = "krebszones-${version}"; - version = "0.4.4"; - propagatedBuildInputs = with pkgs.python3Packages;[ - d2to1 # for setup to work - ovh - docopt - ]; - src = fetchurl { - url = "https://pypi.python.org/packages/source/k/krebszones/krebszones-${version}.tar.gz"; - sha256 = "1bzfc2b9468769j1yj93j12zdlccqbjiqfhql2larximh491sg4d"; - }; - meta = { - homepage = http://krebsco.de/; - description = "OVH Zone Upload"; - license = lib.licenses.wtfpl; - }; -} +pkgs.writeDashBin "krebszones" '' + set -efu + export OVH_ZONE_CONFIG=$HOME/.secrets/krebs/ovh-zone.conf + case $* in + import) + set -- import /etc/zones/krebsco.de krebsco.de + echo "+ krebszones $*" >&2 + ;; + esac + exec ${pkgs.ovh-zone}/bin/ovh-zone "$@" +'' diff --git a/krebs/5pkgs/simple/ovh-zone/default.nix b/krebs/5pkgs/simple/ovh-zone/default.nix new file mode 100644 index 000000000..051a14e8d --- /dev/null +++ b/krebs/5pkgs/simple/ovh-zone/default.nix @@ -0,0 +1,25 @@ +{ lib, pkgs,python3Packages,fetchurl, ... }: + +# TODO: Prepare a diff of future and current +## ovh-zone export krebsco.de --config ~/secrets/krebs/cfg.json |sed 's/[ ]\+/ /g' | sort current +## sed 's/[ ]\+/ /g'/etc/zones/krebsco.de | sort > future +## diff future.sorted current.sorted + +python3Packages.buildPythonPackage rec { + name = "ovh-zone-${version}"; + version = "0.4.4"; + propagatedBuildInputs = with pkgs.python3Packages;[ + d2to1 # for setup to work + ovh + docopt + ]; + src = fetchurl { + url = "https://pypi.python.org/packages/source/k/krebszones/krebszones-${version}.tar.gz"; + sha256 = "1bzfc2b9468769j1yj93j12zdlccqbjiqfhql2larximh491sg4d"; + }; + meta = { + homepage = http://krebsco.de/; + description = "OVH Zone Upload"; + license = lib.licenses.wtfpl; + }; +} diff --git a/krebs/5pkgs/simple/urlencode/default.nix b/krebs/5pkgs/simple/urlencode/default.nix new file mode 100644 index 000000000..afa42b83f --- /dev/null +++ b/krebs/5pkgs/simple/urlencode/default.nix @@ -0,0 +1,22 @@ +{ jq, gnused, writeBashBin, ... }: + +writeBashBin "urlencode" '' + set -efu + + decode() { + printf %b "$(${gnused}/bin/sed 's/ /+/g; s/%/\\x/g')" + } + + encode() { + ${jq}/bin/jq -Rr '@uri "\(.)"' + } + + # shellcheck disable=SC2048 + case $* in + -d) decode;; + "") encode;; + *) + echo "$0: error: your argument is invalid" >&2 + exit 1 + esac +'' |