From feb36c2f9a6d4f910c7c36c55a84aa46d30adec4 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 8 Jan 2021 19:18:37 +0100 Subject: ma gum: add workadventure subdomains --- krebs/3modules/makefu/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index 2cb70eec4..c8e1e0386 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -197,6 +197,15 @@ in { wg.euer IN A ${nets.internet.ip4.addr} wiki.euer IN A ${nets.internet.ip4.addr} wikisearch IN A ${nets.internet.ip4.addr} + + meet.euer IN A ${nets.internet.ip4.addr} + work.euer IN A ${nets.internet.ip4.addr} + admin.work.euer IN A ${nets.internet.ip4.addr} + push.work.euer IN A ${nets.internet.ip4.addr} + api.work.euer IN A ${nets.internet.ip4.addr} + maps.work.euer IN A ${nets.internet.ip4.addr} + play.work.euer IN A ${nets.internet.ip4.addr} + ul.work.euer IN A ${nets.internet.ip4.addr} ''; }; cores = 8; -- cgit v1.2.3 From 96b5248e8514fbbf847d2a5c36dcfb047dd393cb Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 18 Jan 2021 23:01:13 +0100 Subject: ma workadventure: init --- makefu/2configs/home-manager/zsh.nix | 7 +- makefu/2configs/workadventure/default.nix | 6 + makefu/2configs/workadventure/jitsi.nix | 59 +++++++++ makefu/2configs/workadventure/workadventure.nix | 161 ++++++++++++++++++++++++ 4 files changed, 231 insertions(+), 2 deletions(-) create mode 100644 makefu/2configs/workadventure/default.nix create mode 100644 makefu/2configs/workadventure/jitsi.nix create mode 100644 makefu/2configs/workadventure/workadventure.nix diff --git a/makefu/2configs/home-manager/zsh.nix b/makefu/2configs/home-manager/zsh.nix index 8d6c1f2f0..74ac12e7f 100644 --- a/makefu/2configs/home-manager/zsh.nix +++ b/makefu/2configs/home-manager/zsh.nix @@ -11,8 +11,7 @@ { #direnv home-manager.users.makefu.home.packages = [ (pkgs.writers.writeDashBin "privatefox" "exec firefox -P Privatefox") - pkgs.direnv pkgs.nur.repos.kalbasit.nixify ]; - # home-manager.users.makefu.home.file.".direnvrc".text = ''''; + ]; } { # bat home-manager.users.makefu.home.packages = [ pkgs.bat ]; @@ -25,6 +24,10 @@ } ]; environment.pathsToLink = [ "/share/zsh" ]; + + programs.direnv.enable = true; + programs.direnv.enableNixDirenvIntegration = true; + home-manager.users.makefu = { programs.fzf.enable = false; # alt-c programs.zsh = { diff --git a/makefu/2configs/workadventure/default.nix b/makefu/2configs/workadventure/default.nix new file mode 100644 index 000000000..3c68fca8d --- /dev/null +++ b/makefu/2configs/workadventure/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./jitsi.nix + ./workadventure.nix + ]; +} diff --git a/makefu/2configs/workadventure/jitsi.nix b/makefu/2configs/workadventure/jitsi.nix new file mode 100644 index 000000000..d5c590746 --- /dev/null +++ b/makefu/2configs/workadventure/jitsi.nix @@ -0,0 +1,59 @@ +{ + # + + + # | | + # | | + # v v + # 80, 443 TCP 443 TCP, 10000 UDP + # +--------------+ +---------------------+ + # | nginx | 5222, 5347 TCP | | + # | jitsi-meet |<-------------------+| jitsi-videobridge | + # | prosody | | | | + # | jicofo | | +---------------------+ + # +--------------+ | + # | +---------------------+ + # | | | + # +----------+| jitsi-videobridge | + # | | | + # | +---------------------+ + # | + # | +---------------------+ + # | | | + # +----------+| jitsi-videobridge | + # | | + # +---------------------+ + + # This is a one server setup + services.jitsi-meet = { + enable = true; + hostName = "meet.euer.krebsco.de"; + + # JItsi COnference FOcus is a server side focus component used in Jitsi Meet conferences. + # https://github.com/jitsi/jicofo + jicofo.enable = true; + + # Whether to enable nginx virtual host that will serve the javascript application and act as a proxy for the XMPP server. + # Further nginx configuration can be done by adapting services.nginx.virtualHosts.. When this is enabled, ACME + # will be used to retrieve a TLS certificate by default. To disable this, set the + # services.nginx.virtualHosts..enableACME to false and if appropriate do the same for + # services.nginx.virtualHosts..forceSSL. + nginx.enable = true; + + # https://github.com/jitsi/jitsi-meet/blob/master/config.js + config = { + enableWelcomePage = true; + defaultLang = "en"; + }; + + # https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js + interfaceConfig = { + SHOW_JITSI_WATERMARK = false; + SHOW_WATERMARK_FOR_GUESTS = false; + }; + }; + + networking.firewall = { + allowedTCPPorts = [ 80 443 ]; + allowedUDPPorts = [ 10000 ]; + }; + +} diff --git a/makefu/2configs/workadventure/workadventure.nix b/makefu/2configs/workadventure/workadventure.nix new file mode 100644 index 000000000..2b7eca250 --- /dev/null +++ b/makefu/2configs/workadventure/workadventure.nix @@ -0,0 +1,161 @@ +{ config, pkgs, lib, ... }: +let + # If your Jitsi environment has authentication set up, + # you MUST set JITSI_PRIVATE_MODE to "true" and + # you MUST pass a SECRET_JITSI_KEY to generate the JWT secret + jitsiPrivateMode = "false"; + + secretJitsiKey = ""; + + jitsiISS = ""; + + workadventureSecretKey = ""; + + jitsiURL = "meet.euer.krebsco.de"; + + domain = "work.euer.krebsco.de"; + # domain will redirect to this map. (not play.${domain}) + defaultMap = "npeguin.github.io/office-map/map.json"; + + apiURL = "api.${domain}"; + apiPort = 9002; + + frontURL = "play.${domain}"; + frontPort = 9004; + + pusherURL = "push.${domain}"; + pusherPort = 9005; + + uploaderURL = "ul.${domain}"; + uploaderPort = 9006; + + frontImage = "thecodingmachine/workadventure-front:develop"; + pusherImage = "thecodingmachine/workadventure-pusher:develop"; + apiImage = "thecodingmachine/workadventure-back:develop"; + uploaderImage = "thecodingmachine/workadventure-uploader:develop"; + +in { + + networking.firewall = { + allowedTCPPorts = [ 80 443 ]; + allowedUDPPorts = [ 80 443 ]; + }; + + services.nginx.enable = true; + services.nginx.recommendedProxySettings = true; + + systemd.services.workadventure-network = { + enable = true; + wantedBy = [ "multi-user.target" ]; + script = '' + ${pkgs.docker}/bin/docker network create --driver bridge workadventure ||: + ''; + after = [ "docker" ]; + before = [ + "docker-workadventure-back.service" + "docker-workadventure-pusher.service" + "docker-workadventure-uploader.service" + "docker-workadventure-website.service" + ]; + }; + + virtualisation.oci-containers.backend = "docker"; + + services.nginx.virtualHosts."${domain}" = { + enableACME = true; + forceSSL = true; + locations."/" = { + return = "301 $scheme://play.${domain}/_/global/${defaultMap}"; + }; + }; + + virtualisation.oci-containers.containers.workadventure-front = { + image = frontImage; + environment = { + API_URL = pusherURL; + JITSI_PRIVATE_MODE = jitsiPrivateMode; + JITSI_URL = jitsiURL; + SECRET_JITSI_KEY = secretJitsiKey; + UPLOADER_URL = uploaderURL; + }; + ports = [ "127.0.0.1:${toString frontPort}:80" ]; + extraOptions = [ "--network=workadventure" ]; + }; + services.nginx.virtualHosts."${frontURL}" = { + enableACME = true; + forceSSL = true; + locations."/" = { proxyPass = "http://127.0.0.1:${toString frontPort}"; }; + }; + + virtualisation.oci-containers.containers.workadventure-pusher = { + image = pusherImage; + environment = { + API_URL = "workadventure-back:50051"; + JITSI_ISS = jitsiISS; + JITSI_URL = jitsiURL; + SECRET_KEY = workadventureSecretKey; + }; + ports = [ "127.0.0.1:${toString pusherPort}:8080" ]; + extraOptions = [ "--network=workadventure" ]; + }; + services.nginx.virtualHosts."${pusherURL}" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString pusherPort}"; + proxyWebsockets = true; + }; + locations."/room" = { + proxyPass = "http://127.0.0.1:${toString pusherPort}"; + proxyWebsockets = true; + }; + }; + + virtualisation.oci-containers.containers.workadventure-back = { + image = apiImage; + environment = { + #DEBUG = "*"; + JITSI_ISS = jitsiISS; + JITSI_URL = jitsiURL; + SECRET_KEY = workadventureSecretKey; + }; + ports = [ "127.0.0.1:${toString apiPort}:8080" "50051" ]; + extraOptions = [ "--network=workadventure" ]; + }; + services.nginx.virtualHosts."${apiURL}" = { + enableACME = true; + forceSSL = true; + locations."/" = { proxyPass = "http://127.0.0.1:${toString apiPort}"; }; + }; + + virtualisation.oci-containers.containers.workadventure-uploader = { + image = uploaderImage; + ports = [ "127.0.0.1:${toString uploaderPort}:8080" ]; + extraOptions = [ "--network=workadventure" ]; + }; + services.nginx.virtualHosts."${uploaderURL}" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString uploaderPort}"; + proxyWebsockets = true; + }; + }; + + systemd.services.docker-workadventure-front.serviceConfig = { + StandardOutput = lib.mkForce "journal"; + StandardError = lib.mkForce "journal"; + }; + systemd.services.docker-workadventure-uploader.serviceConfig = { + StandardOutput = lib.mkForce "journal"; + StandardError = lib.mkForce "journal"; + }; + systemd.services.docker-workadventure-pusher.serviceConfig = { + StandardOutput = lib.mkForce "journal"; + StandardError = lib.mkForce "journal"; + }; + systemd.services.docker-workadventure-back.serviceConfig = { + StandardOutput = lib.mkForce "journal"; + StandardError = lib.mkForce "journal"; + }; +} -- cgit v1.2.3 From 6c11cfd768434c24c81719b1282191775fbd6e31 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 22 Jan 2021 23:59:32 +0100 Subject: ma pkgs.office-radio: init --- makefu/5pkgs/office-radio/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 makefu/5pkgs/office-radio/default.nix diff --git a/makefu/5pkgs/office-radio/default.nix b/makefu/5pkgs/office-radio/default.nix new file mode 100644 index 000000000..2eacb9e23 --- /dev/null +++ b/makefu/5pkgs/office-radio/default.nix @@ -0,0 +1,23 @@ +{ lib, pkgs, fetchFromGitHub, ... }: + +with pkgs.python3Packages;buildPythonPackage rec { + name = "office-radio-${version}"; + version = "0.2.3.4"; + propagatedBuildInputs = [ + flask + psutil + mpd2 + requests + ]; + src = fetchFromGitHub { + owner = "makefu"; + repo = "office-radio"; + rev = "601c650"; + sha256 = "06zf0sjm4zlnbjlmiajbz1klhz1maj1ww5vah2abcvk1vx0p0hn7"; + }; + meta = { + homepage = https://github.com/makefu/office-radio; + description = "manage virtual office radio"; + license = lib.licenses.asl20; + }; +} -- cgit v1.2.3 From dfcf2c428217d16459979bcc1c88de9ef99c8a22 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 25 Jan 2021 08:31:58 +0100 Subject: ma pkgs.kalauerbot: bump --- makefu/5pkgs/kalauerbot/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefu/5pkgs/kalauerbot/default.nix b/makefu/5pkgs/kalauerbot/default.nix index ee90fdeec..b78b2fcd6 100644 --- a/makefu/5pkgs/kalauerbot/default.nix +++ b/makefu/5pkgs/kalauerbot/default.nix @@ -1,11 +1,11 @@ { stdenv, python3, fetchgit }: python3.pkgs.buildPythonPackage rec { name = "kalauerbot"; -rev = "08d98aa"; +rev = "2a1e868"; src = fetchgit { url = "http://cgit.euer.krebsco.de/kalauerbot"; inherit rev; - sha256 = "017hh61smgq4zsxd10brgwmykwgwabgllxjs31xayvs1hnqmkv2v"; + sha256 = "1vymz3dnpgcxwfgbnrpc0plcdmihxcq7xsvpap755c5jvzvb8a1k"; }; propagatedBuildInputs = with python3.pkgs;[ (callPackage ./python-matrixbot.nix { -- cgit v1.2.3 From 52f450b4c5bb178533574dca2de193de9b66b4ba Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 25 Jan 2021 08:32:21 +0100 Subject: ma office-radio: init --- .../bureautomation/office-radio/default.nix | 6 +++ .../2configs/bureautomation/office-radio/mpd.nix | 58 ++++++++++++++++++++++ .../bureautomation/office-radio/mpdconfig.nix | 6 +++ .../bureautomation/office-radio/webserver.nix | 40 +++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 makefu/2configs/bureautomation/office-radio/default.nix create mode 100644 makefu/2configs/bureautomation/office-radio/mpd.nix create mode 100644 makefu/2configs/bureautomation/office-radio/mpdconfig.nix create mode 100644 makefu/2configs/bureautomation/office-radio/webserver.nix diff --git a/makefu/2configs/bureautomation/office-radio/default.nix b/makefu/2configs/bureautomation/office-radio/default.nix new file mode 100644 index 000000000..d1c0f4730 --- /dev/null +++ b/makefu/2configs/bureautomation/office-radio/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./mpd.nix + ./webserver.nix + ]; +} diff --git a/makefu/2configs/bureautomation/office-radio/mpd.nix b/makefu/2configs/bureautomation/office-radio/mpd.nix new file mode 100644 index 000000000..4fc31fff9 --- /dev/null +++ b/makefu/2configs/bureautomation/office-radio/mpd.nix @@ -0,0 +1,58 @@ +{ config, lib, pkgs, ... }: + +let + mpds = import ./mpdconfig.nix; + systemd_mpd = name: value: let + path = "/var/lib/mpd-${name}"; + num = lib.strings.fixedWidthNumber 2 value; + mpdconf = pkgs.writeText "mpd-config-${name}" '' + music_directory "${path}/music" + playlist_directory "${path}/playlists" + db_file "${path}/tag_cache" + state_file "${path}/state" + sticker_file "${path}/sticker.sql" + + bind_to_address "127.0.0.1" + port "66${num}" + log_level "default" + auto_update "yes" + audio_output { + type "httpd" + name "Office Radio ${num} - ${name}" + encoder "vorbis" # optional + port "280${num}" + quality "5.0" # do not define if bitrate is defined + # bitrate "128" # do not define if quality is defined + format "44100:16:2" + always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped. + tags "yes" # httpd supports sending tags to listening streams. + } + ''; +in { + after = [ "network.target" ]; + description = "Office Radio MPD ${toString value} - ${name}"; + wantedBy = ["multi-user.target"]; + serviceConfig = { + #User = "mpd"; + DynamicUser = true; + ExecStart = "${pkgs.mpd}/bin/mpd --no-daemon ${mpdconf}"; + LimitRTPRIO = 50; + LimitRTTIME = "infinity"; + ProtectSystem = true; + NoNewPrivileges = true; + ProtectKernelTunables = true; + ProtectControlGroups = true; + ProtectKernelModules = true; + RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_NETLINK"; + RestrictNamespaces = true; + Restart = "always"; + StateDirectory = [ "mpd-${name}" ]; + }; + }; +in + { + systemd.services = lib.attrsets.mapAttrs' (name: value: + lib.attrsets.nameValuePair + ("office-radio-" +name) (systemd_mpd name value)) + mpds; + } diff --git a/makefu/2configs/bureautomation/office-radio/mpdconfig.nix b/makefu/2configs/bureautomation/office-radio/mpdconfig.nix new file mode 100644 index 000000000..b48ceb629 --- /dev/null +++ b/makefu/2configs/bureautomation/office-radio/mpdconfig.nix @@ -0,0 +1,6 @@ +{ + "cybertisch1" = 0; + "cybertisch2" = 1; + "cyberklo" = 2; + "baellebad" = 3; +} diff --git a/makefu/2configs/bureautomation/office-radio/webserver.nix b/makefu/2configs/bureautomation/office-radio/webserver.nix new file mode 100644 index 000000000..e2fc6d9e8 --- /dev/null +++ b/makefu/2configs/bureautomation/office-radio/webserver.nix @@ -0,0 +1,40 @@ +{ pkgs, ... }: +let + mpds = import ./mpdconfig.nix; + pkg = pkgs.office-radio; +in { + systemd.services.office-radio-appsrv = { + after = [ "network.target" ]; + description = "Office Radio Appserver"; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + ExecStart = "${pkg}/bin/office-radio"; + DynamicUser = true; + ProtectSystem = true; + NoNewPrivileges = true; + ProtectKernelTunables = true; + ProtectControlGroups = true; + ProtectKernelModules = true; + RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_NETLINK"; + RestrictNamespaces = true; + Restart = "always"; + }; + }; + systemd.services.office-radio-stopper = { + after = [ "network.target" ]; + description = "Office Radio Script to stop idle streams"; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + ExecStart = "${pkg}/bin/stop-idle-streams"; + DynamicUser = true; + ProtectSystem = true; + NoNewPrivileges = true; + ProtectKernelTunables = true; + ProtectControlGroups = true; + ProtectKernelModules = true; + RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_NETLINK"; + RestrictNamespaces = true; + Restart = "always"; + }; + }; +} -- cgit v1.2.3 From 549f3fd553155412f04870a31849b29776a63d59 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 26 Jan 2021 17:48:55 +0100 Subject: news: rename brockman-helper to candyman, fix reddit link --- krebs/2configs/news.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/2configs/news.nix b/krebs/2configs/news.nix index 3bf991433..7f4020ca2 100644 --- a/krebs/2configs/news.nix +++ b/krebs/2configs/news.nix @@ -42,7 +42,7 @@ krebs.reaktor2.news = { hostname = "localhost"; port = "6667"; - nick = "brockman-helper"; + nick = "candyman"; plugins = [ { plugin = "register"; @@ -71,7 +71,7 @@ exit 1 fi reddit_channel=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]') - echo "brockman: add r_$reddit_channel http://rss.r/?action=display&bridge=Telegram&username=$reddit_channel&format=Mrss" + echo "brockman: add r_$reddit_channel http://rss.r/?action=display&bridge=Reddit&context=single&r=$reddit_channel&format=Atom" ''; add-telegram.filename = pkgs.writeDash "add-telegram" '' set -euf -- cgit v1.2.3 From 9c6c20f69e7b76e4231ffeae715d2ee5d453bb4d Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 26 Jan 2021 20:23:51 +0100 Subject: ma x.r: enable service --- makefu/1systems/x/config.nix | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index 4781af357..27d265f33 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -19,8 +19,37 @@ { programs.adb.enable = true; } + { + services.openssh.hostKeys = [ + { bits = 4096; path = (toString ); type = "rsa";} + ]; + } + + #{ + # users.users.makefu.packages = with pkgs;[ mpc_cli ncmpcpp ]; + # services.ympd.enable = true; + # services.mpd = { + # enable = true; + # extraConfig = '' + # log_level "default" + # auto_update "yes" + + # audio_output { + # type "httpd" + # name "lassulus radio" + # encoder "vorbis" # optional + # port "8000" + # quality "5.0" # do not define if bitrate is defined + # # bitrate "128" # do not define if quality is defined + # format "44100:16:2" + # always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped. + # tags "yes" # httpd supports sending tags to listening streams. + # } + # ''; + # }; + #} - { systemd.services.docker.wantedBy = lib.mkForce []; } + # { systemd.services.docker.wantedBy = lib.mkForce []; } # # @@ -59,10 +88,13 @@ # # # + # Krebs - # + # + # + # @@ -108,6 +140,7 @@ # + @@ -115,7 +148,7 @@ # Security - + # # temporary # { services.redis.enable = true; } @@ -158,8 +191,8 @@ # configure pulseAudio to provide a HDMI sink as well networking.firewall.enable = true; - networking.firewall.allowedUDPPorts = [ 665 26061 ]; - networking.firewall.trustedInterfaces = [ "vboxnet0" ]; + networking.firewall.allowedUDPPorts = [ 665 26061 1514 ]; + networking.firewall.trustedInterfaces = [ "vboxnet0" "enp0s25" ]; krebs.build.host = config.krebs.hosts.x; -- cgit v1.2.3 From 5184fcda254238c1c650c7c8d16d0c6dbb8a0649 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 22:58:04 +0100 Subject: nixpkgs: a058d00 -> 85abeab aka the sudo thing --- krebs/nixpkgs.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 97afb10f8..b404cb6c9 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "a058d005b3cbb370bf171ebce01839dd6ff52222", - "date": "2021-01-23T17:41:51-05:00", - "path": "/nix/store/6ps307ghgrp10q3mwgw4lq143pmz0h25-nixpkgs", - "sha256": "154mpqw0ya31hzgz9hggg1rb26yx8d00rsj9l90ndsdldrssgvbb", + "rev": "85abeab48b5feda4b163e5bb32f50aad1164e415", + "date": "2021-01-27T09:52:47+01:00", + "path": "/nix/store/la9l82nbilyhjjl2x294qpf7ki9lzkc3-nixpkgs", + "sha256": "1nslb5p6cf5z691pf52j8bf880sdgav1fcf7bxjk3rad92bniq5g", "fetchSubmodules": false, "deepClone": false, "leaveDotGit": false -- cgit v1.2.3 From 54cd4c84e5b05ef6dc5c175098610d5333ffbdcb Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 22:59:21 +0100 Subject: ma x.r: split hardware config --- makefu/1systems/x/config.nix | 51 ++++++++++++++++---------------- makefu/1systems/x/x13/default.nix | 52 +++++++++++++++++++++++++++++++++ makefu/1systems/x/x13/input.nix | 13 +++++++++ makefu/1systems/x/x13/toggle_brightness | 8 +++++ makefu/1systems/x/x13/zfs.nix | 32 ++++++++++++++++++++ makefu/1systems/x/x230/default.nix | 19 ++++++++++++ 6 files changed, 149 insertions(+), 26 deletions(-) create mode 100644 makefu/1systems/x/x13/default.nix create mode 100644 makefu/1systems/x/x13/input.nix create mode 100644 makefu/1systems/x/x13/toggle_brightness create mode 100644 makefu/1systems/x/x13/zfs.nix create mode 100644 makefu/1systems/x/x230/default.nix diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index 27d265f33..6c0388e59 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -4,7 +4,30 @@ { config, pkgs, lib, ... }: { imports = - [ # base + [ + # hardware-dependent + # device + + + ./x13 + # ./x230 + + # Common Hardware Components + + # + # + + # + # + # + + # + + + + + + # base @@ -107,7 +130,7 @@ # Virtualization # - + # #{ # networking.firewall.allowedTCPPorts = [ 8080 ]; # networking.nat = { @@ -128,24 +151,7 @@ - # Hardware - # + bluetooth - # - - # - - # - # - # - - # - - - - - # Filesystem - # Security # @@ -182,7 +188,6 @@ } ]; - makefu.server.primary-itf = "wlp3s0"; nixpkgs.config.allowUnfree = true; nixpkgs.config.oraclejdk.accept_license = true; @@ -198,12 +203,6 @@ krebs.tinc.retiolum.connectTo = [ "omo" "prism" "nextgum" "wbob" ]; - # hard dependency because otherwise the device will not be unlocked - boot.initrd.luks.devices.luksroot = - { - device = "/dev/sda2"; - allowDiscards = true; - }; environment.systemPackages = [ pkgs.passwdqc-utils ]; diff --git a/makefu/1systems/x/x13/default.nix b/makefu/1systems/x/x13/default.nix new file mode 100644 index 000000000..b0400232e --- /dev/null +++ b/makefu/1systems/x/x13/default.nix @@ -0,0 +1,52 @@ +{ pkgs, lib, ... }: +# new zfs deployment +{ + imports = [ + ./zfs.nix + ./input.nix + + # close enough + # + + ]; + boot.zfs.requestEncryptionCredentials = true; + networking.hostId = "f8b8e0a2"; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # services.xserver.enable = lib.mkForce false; + + services.xserver.videoDrivers = [ + "amdgpu" + ]; + hardware.opengl.extraPackages = [ pkgs.amdvlk ]; + # is required for amd graphics support ( xorg wont boot otherwise ) + boot.kernelPackages = pkgs.linuxPackages_latest; + environment.variables.VK_ICD_FILENAMES = + "/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json"; + + + programs.light.enable = true; + services.actkbd = { + enable = true; + bindings = [ + { keys = [ 225 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -A 10"; } + { keys = [ 224 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -U 10"; } + { keys = [ 227 ]; events = [ "key" ]; command = builtins.toString ( + pkgs.writers.writeDash "toggle_lcdshadow" '' + proc=/proc/acpi/ibm/lcdshadow + status=$(${pkgs.gawk}/bin/awk '/status:/{print $2}' "$proc") + if [ "$status" -eq 0 ];then + echo 1 > "$proc" + else + echo 0 > "$proc" + fi + ''); + } + ]; + }; + + users.groups.video = {}; + users.users.makefu.extraGroups = [ "video" ]; +} + diff --git a/makefu/1systems/x/x13/input.nix b/makefu/1systems/x/x13/input.nix new file mode 100644 index 000000000..68b855d8e --- /dev/null +++ b/makefu/1systems/x/x13/input.nix @@ -0,0 +1,13 @@ +{ + # current issues: + # 1. for pressing insert hold shift+fn+Fin + + # scroll by holding middle mouse + services.xserver.displayManager.sessionCommands ='' + xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation" 8 1 + xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Button" 8 2 + xinput set-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 + # configure timeout of pressing and holding middle button + # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 + ''; +} diff --git a/makefu/1systems/x/x13/toggle_brightness b/makefu/1systems/x/x13/toggle_brightness new file mode 100644 index 000000000..dc1436cb6 --- /dev/null +++ b/makefu/1systems/x/x13/toggle_brightness @@ -0,0 +1,8 @@ +#!/bin/sh +proc=/proc/acpi/ibm/lcdshadow +status=$(awk '/status:/{print $2}' "$proc") +if [ "$status" -eq 0 ];then + echo 1 > "$proc" +else + echo 0 > "$proc" +fi diff --git a/makefu/1systems/x/x13/zfs.nix b/makefu/1systems/x/x13/zfs.nix new file mode 100644 index 000000000..adfebbf96 --- /dev/null +++ b/makefu/1systems/x/x13/zfs.nix @@ -0,0 +1,32 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "zroot/root/nixos"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/20BF-2755"; + fsType = "vfat"; + }; + + fileSystems."/home" = + { device = "zroot/root/home"; + fsType = "zfs"; + }; + + swapDevices = [ ]; +} diff --git a/makefu/1systems/x/x230/default.nix b/makefu/1systems/x/x230/default.nix new file mode 100644 index 000000000..c2a635ca7 --- /dev/null +++ b/makefu/1systems/x/x230/default.nix @@ -0,0 +1,19 @@ +{ + imports = [ + # + bluetooth + + + + + + # hard dependency because otherwise the device will not be unlocked + { + boot.initrd.luks.devices.luksroot = + { + device = "/dev/sda2"; + allowDiscards = true; + }; + } + { makefu.server.primary-itf = "wlp3s0"; } + ]; +} -- cgit v1.2.3 From 0088e2b3cf88e21278b104fc2035d0b073f8bec9 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:00:02 +0100 Subject: ma gumr.: enable workadventure --- makefu/1systems/gum/config.nix | 30 ++++++++++++++++++++++-------- makefu/1systems/gum/hardware-config.nix | 2 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index f65c6672b..2fd99122a 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -65,7 +65,7 @@ in { }; networking.firewall = { allowedTCPPorts = - [ + [ 53 655 21031 @@ -83,6 +83,9 @@ in { # + ### systemdUltras ### + + ###### Shack ##### # # @@ -98,7 +101,7 @@ in { { krebs.exim.enable = mkDefault true; } # sharing - + # samba sahre @@ -145,7 +148,10 @@ in { + # + + @@ -177,12 +183,19 @@ in { { bits = 4096; path = (toString ); type = "rsa"; } { path = (toString ); type = "ed25519"; } ]; ###### stable - - services.nginx.virtualHosts."cgit.euer.krebsco.de" = { - forceSSL = true; - enableACME = true; - locations."/".proxyPass = "http://localhost/"; - locations."/".extraConfig = ''proxy_set_header Host cgit;''; + security.acme.certs."cgit.euer.krebsco.de" = { + email = "letsencrypt@syntax-fehler.de"; + webroot = "/var/lib/acme/acme-challenge"; + group = "nginx"; + }; + services.nginx.virtualHosts."cgit" = { + serverAliases = [ "cgit.euer.krebsco.de" ]; + addSSL = true; + sslCertificate = "/var/lib/acme/cgit.euer.krebsco.de/fullchain.pem"; + sslCertificateKey = "/var/lib/acme/cgit.euer.krebsco.de/key.pem"; + locations."/.well-known/acme-challenge".extraConfig = '' + root /var/lib/acme/acme-challenge; + ''; }; krebs.build.host = config.krebs.hosts.gum; @@ -190,6 +203,7 @@ in { # Network networking = { firewall = { + allowedTCPPorts = [ 80 443 ]; allowPing = true; logRefusedConnections = false; }; diff --git a/makefu/1systems/gum/hardware-config.nix b/makefu/1systems/gum/hardware-config.nix index 2d7efe9cf..1881329ce 100644 --- a/makefu/1systems/gum/hardware-config.nix +++ b/makefu/1systems/gum/hardware-config.nix @@ -69,7 +69,7 @@ in { fsType = "ext4"; options = [ "nofail" ]; }; - fileSystems."/var/www/o.euer.krebsco.de" = { + fileSystems."/var/lib/nextcloud/data" = { device = "/dev/nixos/nextcloud"; fsType = "ext4"; options = [ "nofail" ]; -- cgit v1.2.3 From f7443e2835eb5141b00463e9a79a5ac1e5bd3a17 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:01:44 +0100 Subject: ma newsbot: obsolete --- makefu/2configs/deployment/newsbot.nix | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 makefu/2configs/deployment/newsbot.nix diff --git a/makefu/2configs/deployment/newsbot.nix b/makefu/2configs/deployment/newsbot.nix deleted file mode 100644 index 748803447..000000000 --- a/makefu/2configs/deployment/newsbot.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, pkgs, ... }: - -let - newsfile = pkgs.writeText "feeds" '' - nixoswiki-bot|https://github.com/Mic92/nixos-wiki/wiki.atom|#krebs - ''; -in { - environment.systemPackages = [ - pkgs.newsbot-js - ]; - krebs.newsbot-js = { - enable = true; - ircServer = "chat.freenode.net"; - feeds = newsfile; - urlShortenerHost = "go"; - urlShortenerPort = "80"; - }; -} -- cgit v1.2.3 From ae3f6ff1ac62ac83861f87dda931e47c1fde68d7 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:02:53 +0100 Subject: ma wiki-irc-bot: obsolete --- .../2configs/deployment/wiki-irc-bot/default.nix | 19 --------- .../deployment/wiki-irc-bot/wiki-output.patch | 45 ---------------------- 2 files changed, 64 deletions(-) delete mode 100644 makefu/2configs/deployment/wiki-irc-bot/default.nix delete mode 100644 makefu/2configs/deployment/wiki-irc-bot/wiki-output.patch diff --git a/makefu/2configs/deployment/wiki-irc-bot/default.nix b/makefu/2configs/deployment/wiki-irc-bot/default.nix deleted file mode 100644 index 12686efba..000000000 --- a/makefu/2configs/deployment/wiki-irc-bot/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, pkgs, ... }: - -let - pkg = pkgs.lib.overrideDerivation pkgs.newsbot-js (original: { - patches = [ ./wiki-output.patch ]; - }); - newsfile = pkgs.writeText "feeds" '' - nixoswiki-bot|https://nixos.wiki/api.php?days=7&limit=50&hidecategorization=1&action=feedrecentchanges&feedformat=rss|#krebs - ''; -in { - krebs.newsbot-js = { - enable = true; - package = pkg; - ircServer = "chat.freenode.net"; - feeds = newsfile; - urlShortenerHost = "go"; - urlShortenerPort = "80"; - }; -} diff --git a/makefu/2configs/deployment/wiki-irc-bot/wiki-output.patch b/makefu/2configs/deployment/wiki-irc-bot/wiki-output.patch deleted file mode 100644 index 6e1e27853..000000000 --- a/makefu/2configs/deployment/wiki-irc-bot/wiki-output.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/newsbot.js b/newsbot.js -index 42d0666..a284011 100644 ---- a/newsbot.js -+++ b/newsbot.js -@@ -92,8 +92,9 @@ function create_feedbot (nick, uri, channels) { - } - - function broadcast_new_item (item) { -+ console.log('Broadcasting item ',item.link) - return getShortLink(item.link, function (error, shortlink) { -- return broadcast(item.title + ' ' + shortlink) -+ return broadcast('"'+ item.title + '" edited by ' + item.author + ' ' + shortlink) - }) - } - -@@ -152,15 +153,18 @@ function create_feedbot (nick, uri, channels) { - - if (client.lastItems) { - items.forEach(function (item) { -- if (!client.lastItems.hasOwnProperty(item.title)) { -+ -+ if (!client.lastItems.hasOwnProperty(item.guid)) { - broadcast_new_item(item) -+ }else { -+ console.log("Item already seen:",item.guid) - } - }) - } - - client.lastItems = {} - items.forEach(function (item) { -- client.lastItems[item.title] = true -+ client.lastItems[item.guid] = true - }) - - return continue_loop() -@@ -199,6 +203,8 @@ function run_command (methodname, params, callback) { - } - - function getShortLink (link, callback) { -+ callback(null,link) -+ return - var form = new FormData() - try { - form.append('uri', link) -- cgit v1.2.3 From 2cd994a1be9934c1b81599b3d90e85c58170be97 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:03:29 +0100 Subject: ma mycube.connector.one: cleanup --- makefu/2configs/deployment/mycube.connector.one.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/makefu/2configs/deployment/mycube.connector.one.nix b/makefu/2configs/deployment/mycube.connector.one.nix index 379176f78..aa9ff514c 100644 --- a/makefu/2configs/deployment/mycube.connector.one.nix +++ b/makefu/2configs/deployment/mycube.connector.one.nix @@ -1,15 +1,12 @@ { config, lib, pkgs, ... }: # more than just nginx config but not enough to become a module -with import ; let hostname = config.krebs.build.host.name; external-ip = config.krebs.build.host.nets.internet.ip4.addr; wsgi-sock = "${config.services.uwsgi.runDir}/uwsgi.sock"; in { - services.redis = { - enable = true; - }; - systemd.services.redis.serviceConfig.LimitNOFILE=10032; + services.redis = { enable = true; }; + systemd.services.redis.serviceConfig.LimitNOFILE=65536; services.uwsgi = { enable = true; @@ -28,7 +25,7 @@ in { }; services.nginx = { - enable = mkDefault true; + enable = lib.mkDefault true; virtualHosts."mybox.connector.one" = { locations = { "/".extraConfig = '' -- cgit v1.2.3 From 426e0b0c6de8a16228811bf81c467b209b0b3ad7 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:04:10 +0100 Subject: ma ham: add more automations --- makefu/2configs/ham/automation/giesskanne.nix | 2 +- makefu/2configs/ham/automation/moodlight.nix | 41 +++++++++++ .../ham/automation/wohnzimmer_rf_fernbedienung.nix | 82 ++++++++++++++++++++-- 3 files changed, 120 insertions(+), 5 deletions(-) create mode 100644 makefu/2configs/ham/automation/moodlight.nix diff --git a/makefu/2configs/ham/automation/giesskanne.nix b/makefu/2configs/ham/automation/giesskanne.nix index d89ea595b..4b0fb61dd 100644 --- a/makefu/2configs/ham/automation/giesskanne.nix +++ b/makefu/2configs/ham/automation/giesskanne.nix @@ -7,7 +7,7 @@ let light = "light.espcam_02_light"; seconds = 60; # default shutoff to protect the LED from burning out }; - seconds = 6; + seconds = 60; pump = "switch.arbeitszimmer_giesskanne_relay"; # sensor = "sensor.statistics_for_sensor_crafting_brotbox_soil_moisture"; in diff --git a/makefu/2configs/ham/automation/moodlight.nix b/makefu/2configs/ham/automation/moodlight.nix new file mode 100644 index 000000000..df229f16b --- /dev/null +++ b/makefu/2configs/ham/automation/moodlight.nix @@ -0,0 +1,41 @@ +# uses: + +let + wohnzimmer = "light.wohnzimmer_fenster_lichterkette_licht"; + arbeitszimmer = "light.box_led_status"; + final_off = "01:00"; + + turn_on = entity_id: at: + { alias = "Turn on ${entity_id} at ${at}"; + trigger = [ + { platform = "time"; inherit at; } + ]; + action = + [ + { service = "light.turn_on"; inherit entity_id; } + ]; + }; +in +{ + services.home-assistant.config = + { + automation = + [ + (turn_on wohnzimmer "17:30") + (turn_on arbeitszimmer "9:00") + + { alias = "Always turn off the lights at ${final_off}"; + trigger = [ + { platform = "time"; at = final_off; } + ]; + action = + [ + { + service = "light.turn_off"; + entity_id = [ wohnzimmer arbeitszimmer]; + } + ]; + } + ]; + }; +} diff --git a/makefu/2configs/ham/automation/wohnzimmer_rf_fernbedienung.nix b/makefu/2configs/ham/automation/wohnzimmer_rf_fernbedienung.nix index f06094662..4303cdfa5 100644 --- a/makefu/2configs/ham/automation/wohnzimmer_rf_fernbedienung.nix +++ b/makefu/2configs/ham/automation/wohnzimmer_rf_fernbedienung.nix @@ -26,6 +26,81 @@ let data.entity_id = light; }; }; + rf_state = code: light: halfbright: + let + maxbright = 255; + transition = 0.2; # seconds + in + # this function implements a simple state machine based on the state and brightness of the light (light must support brightness + { + alias = "Cycle through states of ${light} via rf code ${code}"; + trigger = { + platform = "event"; + event_type = "esphome.rf_code_received"; + event_data.code = code; + }; + action = { + choose = [ + { + # state 0: off to half + conditions = { + condition = "template"; + value_template = ''{{ states("${light}") == "off" }}''; + }; + sequence = [ + { + service = "light.turn_on"; + data = { + entity_id = light; + brightness = halfbright; + }; + } + ]; + } + { + # state 1: half to full + conditions = { + condition = "template"; + value_template = ''{{ states('${light}') == 'on' and ( ${toString (halfbright - 1)} <= state_attr("${light}","brightness") <= ${toString (halfbright + 1)})}}''; + }; + sequence = [ + { + service = "light.turn_on"; + data = { + entity_id = light; + brightness = maxbright; + }; + } + ]; + } + { + # state 2: full to off + conditions = { + condition = "template"; + # TODO: it seems like the devices respond with brightness-1 , maybe off-by-one somewhere? + value_template = ''{{ states("${light}") == "on" and state_attr("${light}","brightness") >= ${toString (maxbright - 1)}}}''; + }; + sequence = [ + { + service = "light.turn_off"; + data = { + entity_id = light; + }; + } + ]; + } + ]; + # default: on to off + # this works because state 0 checks for "state == off" + default = [{ + service = "light.turn_off"; + data = { + entity_id = light; + }; + }]; + }; + } +; rf_toggle = code: light: { alias = "Toggle ${light} via rf code ${code}"; @@ -39,14 +114,13 @@ let data.entity_id = light; }; }; - in { services.home-assistant.config.automation = [ (rf_toggle "400551" "light.wohnzimmer_fernseher_led_strip") # A - (rf_toggle "401151" "light.wohnzimmer_stehlampe_osram") # B - (rf_toggle "401451" "light.wohnzimmer_komode_osram") # C - (rf_toggle "401511" "light.wohnzimmer_schrank_osram") # D + (rf_state "401151" "light.wohnzimmer_stehlampe_osram" 128) # B + (rf_state "401451" "light.wohnzimmer_komode_osram" 128) # C + (rf_state "401511" "light.wohnzimmer_schrank_osram" 128) # D # OFF Lane (rf_turn_off "400554" "all") # A -- cgit v1.2.3 From 4c9a1d5666de6eede96cba1c10d6815f09730441 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:04:50 +0100 Subject: ma home-manager: use old nixify script again --- makefu/2configs/home-manager/zsh.nix | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/makefu/2configs/home-manager/zsh.nix b/makefu/2configs/home-manager/zsh.nix index 74ac12e7f..cf6f1d334 100644 --- a/makefu/2configs/home-manager/zsh.nix +++ b/makefu/2configs/home-manager/zsh.nix @@ -8,7 +8,7 @@ }; }; imports = [ - { #direnv + { home-manager.users.makefu.home.packages = [ (pkgs.writers.writeDashBin "privatefox" "exec firefox -P Privatefox") ]; @@ -23,12 +23,34 @@ }; } ]; - environment.pathsToLink = [ "/share/zsh" ]; + environment.pathsToLink = [ + "/share/zsh" + ]; - programs.direnv.enable = true; - programs.direnv.enableNixDirenvIntegration = true; + nix.extraOptions = '' + keep-outputs = true + keep-derivations = true + ''; home-manager.users.makefu = { + + programs.direnv.enable = true; + programs.direnv.enableNixDirenvIntegration = true; + programs.direnv.enableZshIntegration = true; + home.packages = [ (pkgs.writeDashBin "nixify" '' +test ! -e shell.nix && cat > shell.nix < {}}: + +pkgs.mkShell { + nativeBuildInputs = [ pkgs.hello ]; +} +EOF +echo "use nix" >> .envrc +direnv allow +'') + ]; + #home.packages = [ pkgs.direnv pkgs.nix-direnv ]; + programs.fzf.enable = false; # alt-c programs.zsh = { enable = true; -- cgit v1.2.3 From a4e498badeb91164afe13f0087e50a80c4fb4641 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:05:29 +0100 Subject: ma hw/droidcam: add new required modules and packages --- makefu/2configs/hw/droidcam.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makefu/2configs/hw/droidcam.nix b/makefu/2configs/hw/droidcam.nix index c638123bb..adc0aa379 100644 --- a/makefu/2configs/hw/droidcam.nix +++ b/makefu/2configs/hw/droidcam.nix @@ -1,7 +1,9 @@ -{ pkgs, config, ... }: +{ pkgs, config, ... }: { boot.extraModprobeConfig = "options v4l2loopback_dc width=640 height=480"; boot.extraModulePackages = [ (pkgs.callPackage ../../5pkgs/v4l2loopback-dc { kernel = config.boot.kernelPackages.kernel; }) ]; + boot.initrd.availableKernelModules = [ "v4l2loopback-dc" ]; + users.users.makefu.packages = [ pkgs.droidcam ]; } -- cgit v1.2.3 From 082954c0c470ef4e9c32e104f4dbf83b69cfedb4 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:05:45 +0100 Subject: ma share/omo: share photos --- makefu/2configs/share/omo.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/makefu/2configs/share/omo.nix b/makefu/2configs/share/omo.nix index 1a488e69c..d9e22ad71 100644 --- a/makefu/2configs/share/omo.nix +++ b/makefu/2configs/share/omo.nix @@ -60,6 +60,12 @@ in { browseable = "yes"; "guest ok" = "yes"; }; + photos = { + path = "/media/cryptX/photos"; + "read only" = "yes"; + browseable = "yes"; + "guest ok" = "yes"; + }; crypX-games = { path = "/media/cryptX/games"; "read only" = "yes"; -- cgit v1.2.3 From 0ea65cef9aa2f936f357c624fc53a393f79d8fcc Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 27 Jan 2021 23:06:35 +0100 Subject: ma tools/mobility: exfat comes with kernel --- makefu/2configs/tools/mobility.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/makefu/2configs/tools/mobility.nix b/makefu/2configs/tools/mobility.nix index 0cf218d46..98bc748dd 100644 --- a/makefu/2configs/tools/mobility.nix +++ b/makefu/2configs/tools/mobility.nix @@ -5,12 +5,10 @@ mosh sshfs rclone - exfat (pkgs.callPackage ./secrets.nix {}) opensc pcsctools libu2f-host ]; - boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ]; boot.supportedFilesystems = [ "exfat" ]; } -- cgit v1.2.3 From 5d4e3a953e2c1f8a6c606640f7e8a94e4f64133d Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 30 Jan 2021 12:12:13 +0100 Subject: nixpkgs: 85abeab -> 6e7f250 --- krebs/nixpkgs.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index b404cb6c9..d40e678cc 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "85abeab48b5feda4b163e5bb32f50aad1164e415", - "date": "2021-01-27T09:52:47+01:00", - "path": "/nix/store/la9l82nbilyhjjl2x294qpf7ki9lzkc3-nixpkgs", - "sha256": "1nslb5p6cf5z691pf52j8bf880sdgav1fcf7bxjk3rad92bniq5g", + "rev": "6e7f25001fe6874f7ae271891f709bbf50a22c45", + "date": "2021-01-29T09:54:18+01:00", + "path": "/nix/store/prpymxalqbhadpl734jpr4wsscj9hsvi-nixpkgs", + "sha256": "1x04j4351pqiqbpkq6g308mxcvb5aqnwv8l2vmlxkgvq5phzky7z", "fetchSubmodules": false, "deepClone": false, "leaveDotGit": false -- cgit v1.2.3 From 161d5f2d964dadc848bc722fded69a75c9398b9d Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 4 Feb 2021 17:56:36 +0100 Subject: brockman: 3.2.3 -> 3.2.4 --- krebs/5pkgs/haskell/brockman.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/krebs/5pkgs/haskell/brockman.nix b/krebs/5pkgs/haskell/brockman.nix index 5f1166a25..aec89b7ad 100644 --- a/krebs/5pkgs/haskell/brockman.nix +++ b/krebs/5pkgs/haskell/brockman.nix @@ -1,26 +1,26 @@ -{ mkDerivation, aeson, aeson-pretty, base, bloomfilter, bytestring +{ mkDerivation, aeson, aeson-pretty, base, bytestring , case-insensitive, conduit, containers, directory, feed, filepath -, hslogger, html-entity, http-client, irc-conduit, lens, network -, optparse-applicative, random, safe, stdenv, text, time, timerep -, wreq +, hslogger, html-entity, http-client, irc-conduit, lens, lrucache +, network, optparse-applicative, random, safe, stdenv, text, time +, timerep, wreq , fetchFromGitHub }: mkDerivation rec { pname = "brockman"; - version = "3.2.3"; + version = "3.2.4"; src = fetchFromGitHub { owner = "kmein"; repo = "brockman"; rev = version; - sha256 = "1qbjbf0l1ikfzmvky4cnvv7nlcwi2in4afliifh618j0a4f7j427"; + sha256 = "1jh2i3rxbw8x0p5xs9ph95ixpsa6h6qm0msjb9xqnw9j8by2fkk2"; }; isLibrary = false; isExecutable = true; executableHaskellDepends = [ - aeson aeson-pretty base bloomfilter bytestring case-insensitive - conduit containers directory feed filepath hslogger html-entity - http-client irc-conduit lens network optparse-applicative random - safe text time timerep wreq + aeson aeson-pretty base bytestring case-insensitive conduit + containers directory feed filepath hslogger html-entity http-client + irc-conduit lens lrucache network optparse-applicative random safe + text time timerep wreq ]; license = stdenv.lib.licenses.mit; } -- cgit v1.2.3 From f21e8d00ad99f7ba47864c97222cb8f9b026ef46 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 4 Feb 2021 18:15:38 +0100 Subject: nixpkgs: 6e7f250 -> 90cec09 --- krebs/nixpkgs.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index d40e678cc..74a8665c8 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "6e7f25001fe6874f7ae271891f709bbf50a22c45", - "date": "2021-01-29T09:54:18+01:00", - "path": "/nix/store/prpymxalqbhadpl734jpr4wsscj9hsvi-nixpkgs", - "sha256": "1x04j4351pqiqbpkq6g308mxcvb5aqnwv8l2vmlxkgvq5phzky7z", + "rev": "90cec09c3642b9be6699015a35e404ecb503aa0d", + "date": "2021-02-02T17:56:41+01:00", + "path": "/nix/store/jrvfl6bw8fwb6sq8w4m6mhj26y52nhr7-nixpkgs", + "sha256": "0134xglcwrq8wp4mnxn6byww9pf2iipxghwpm92bdyknf79msdv1", "fetchSubmodules": false, "deepClone": false, "leaveDotGit": false -- cgit v1.2.3 From 61305cb1e2d93f72d49af7e51419ab77899cd54e Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 4 Feb 2021 19:21:42 +0100 Subject: brockman: move to folder --- krebs/5pkgs/haskell/brockman.nix | 26 -------------------------- krebs/5pkgs/haskell/brockman/default.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) delete mode 100644 krebs/5pkgs/haskell/brockman.nix create mode 100644 krebs/5pkgs/haskell/brockman/default.nix diff --git a/krebs/5pkgs/haskell/brockman.nix b/krebs/5pkgs/haskell/brockman.nix deleted file mode 100644 index aec89b7ad..000000000 --- a/krebs/5pkgs/haskell/brockman.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ mkDerivation, aeson, aeson-pretty, base, bytestring -, case-insensitive, conduit, containers, directory, feed, filepath -, hslogger, html-entity, http-client, irc-conduit, lens, lrucache -, network, optparse-applicative, random, safe, stdenv, text, time -, timerep, wreq -, fetchFromGitHub -}: -mkDerivation rec { - pname = "brockman"; - version = "3.2.4"; - src = fetchFromGitHub { - owner = "kmein"; - repo = "brockman"; - rev = version; - sha256 = "1jh2i3rxbw8x0p5xs9ph95ixpsa6h6qm0msjb9xqnw9j8by2fkk2"; - }; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ - aeson aeson-pretty base bytestring case-insensitive conduit - containers directory feed filepath hslogger html-entity http-client - irc-conduit lens lrucache network optparse-applicative random safe - text time timerep wreq - ]; - license = stdenv.lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/brockman/default.nix b/krebs/5pkgs/haskell/brockman/default.nix new file mode 100644 index 000000000..aec89b7ad --- /dev/null +++ b/krebs/5pkgs/haskell/brockman/default.nix @@ -0,0 +1,26 @@ +{ mkDerivation, aeson, aeson-pretty, base, bytestring +, case-insensitive, conduit, containers, directory, feed, filepath +, hslogger, html-entity, http-client, irc-conduit, lens, lrucache +, network, optparse-applicative, random, safe, stdenv, text, time +, timerep, wreq +, fetchFromGitHub +}: +mkDerivation rec { + pname = "brockman"; + version = "3.2.4"; + src = fetchFromGitHub { + owner = "kmein"; + repo = "brockman"; + rev = version; + sha256 = "1jh2i3rxbw8x0p5xs9ph95ixpsa6h6qm0msjb9xqnw9j8by2fkk2"; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + aeson aeson-pretty base bytestring case-insensitive conduit + containers directory feed filepath hslogger html-entity http-client + irc-conduit lens lrucache network optparse-applicative random safe + text time timerep wreq + ]; + license = stdenv.lib.licenses.mit; +} -- cgit v1.2.3 From bd7f002fefc7acd01b1248a995854891d8520b71 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 15:50:28 +0100 Subject: news: let candyman react to his name --- krebs/2configs/news.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/krebs/2configs/news.nix b/krebs/2configs/news.nix index 7f4020ca2..ce4e83408 100644 --- a/krebs/2configs/news.nix +++ b/krebs/2configs/news.nix @@ -39,10 +39,12 @@ }; }; - krebs.reaktor2.news = { + krebs.reaktor2.news = let + name = "candyman"; + in { hostname = "localhost"; port = "6667"; - nick = "candyman"; + nick = name; plugins = [ { plugin = "register"; @@ -60,14 +62,14 @@ hooks.PRIVMSG = [ { activate = "match"; - pattern = "^brockman-helper:\\s*(\\S*)(?:\\s+(.*\\S))?\\s*$"; + pattern = "^${name}:\\s*(\\S*)(?:\\s+(.*\\S))?\\s*$"; command = 1; arguments = [2]; commands = { add-reddit.filename = pkgs.writeDash "add-reddit" '' set -euf if [ "$#" -ne 1 ]; then - echo 'usage: brockman-helper: add-reddit $reddit_channel' + echo 'usage: ${name}: add-reddit $reddit_channel' exit 1 fi reddit_channel=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]') @@ -76,7 +78,7 @@ add-telegram.filename = pkgs.writeDash "add-telegram" '' set -euf if [ "$#" -ne 1 ]; then - echo 'usage: brockman-helper: add-telegram $telegram_user' + echo 'usage: ${name}: add-telegram $telegram_user' exit 1 fi telegram_user=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]') @@ -85,7 +87,7 @@ add-youtube.filename = pkgs.writeDash "add-youtube" '' set -euf if [ "$#" -ne 1 ]; then - echo 'usage: brockman-helper: add-youtube $nick $channelid' + echo 'usage: ${name}: add-youtube $nick $channelid' exit 1 fi youtube_nick=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]') @@ -95,7 +97,7 @@ search.filename = pkgs.writeDash "search" '' set -euf if [ "$#" -ne 1 ]; then - echo 'usage: brockman-helper: search $searchterm' + echo 'usage: ${name}: search $searchterm' exit 1 fi searchterm=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]') -- cgit v1.2.3 From f32fcc3e4a23b4883bcf8d470041e88fc04e7e4c Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 15:50:55 +0100 Subject: brockman module: wait 5 sec when restarting --- krebs/3modules/brockman.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/3modules/brockman.nix b/krebs/3modules/brockman.nix index 32aa3489b..9b2ed4a71 100644 --- a/krebs/3modules/brockman.nix +++ b/krebs/3modules/brockman.nix @@ -29,6 +29,7 @@ in { PrivateTmp = true; RuntimeDirectory = "brockman"; WorkingDirectory = "%t/brockman"; + RestartSec = 5; }; }; }; -- cgit v1.2.3 From ce0393f43aab8928c783276ac6d14e92f754391b Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 15:58:59 +0100 Subject: brockman: 3.2.4 -> 3.4.0 --- krebs/5pkgs/haskell/brockman/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/krebs/5pkgs/haskell/brockman/default.nix b/krebs/5pkgs/haskell/brockman/default.nix index aec89b7ad..92051a025 100644 --- a/krebs/5pkgs/haskell/brockman/default.nix +++ b/krebs/5pkgs/haskell/brockman/default.nix @@ -1,26 +1,26 @@ { mkDerivation, aeson, aeson-pretty, base, bytestring , case-insensitive, conduit, containers, directory, feed, filepath -, hslogger, html-entity, http-client, irc-conduit, lens, lrucache -, network, optparse-applicative, random, safe, stdenv, text, time -, timerep, wreq +, hashable, hslogger, html-entity, http-client, irc-conduit, lens +, lrucache, lrucaching, network, optparse-applicative, random, safe +, stdenv, text, time, timerep, wreq , fetchFromGitHub }: mkDerivation rec { pname = "brockman"; - version = "3.2.4"; + version = "3.4.0"; src = fetchFromGitHub { owner = "kmein"; repo = "brockman"; rev = version; - sha256 = "1jh2i3rxbw8x0p5xs9ph95ixpsa6h6qm0msjb9xqnw9j8by2fkk2"; + sha256 = "02nval6a9xcddj6znzxvcb8g6klzjydj1lb4ych64i9mr4a8jvic"; }; isLibrary = false; isExecutable = true; executableHaskellDepends = [ aeson aeson-pretty base bytestring case-insensitive conduit - containers directory feed filepath hslogger html-entity http-client - irc-conduit lens lrucache network optparse-applicative random safe - text time timerep wreq + containers directory feed filepath hashable hslogger html-entity + http-client irc-conduit lens lrucache lrucaching network + optparse-applicative random safe text time timerep wreq ]; license = stdenv.lib.licenses.mit; } -- cgit v1.2.3 From d462900b7a9a38b18ab08f831efc6d30343e9a78 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 15:59:36 +0100 Subject: rss-bridge: 2020-11-10 -> unstable-2021-01-10 --- krebs/5pkgs/simple/rss-bridge/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/5pkgs/simple/rss-bridge/default.nix b/krebs/5pkgs/simple/rss-bridge/default.nix index 13ad9d69a..bbe5c1bdb 100644 --- a/krebs/5pkgs/simple/rss-bridge/default.nix +++ b/krebs/5pkgs/simple/rss-bridge/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "rss-bridge"; - version = "2020-11-10"; + version = "unstable-2021-01-10"; src = fetchFromGitHub { owner = "RSS-Bridge"; repo = "rss-bridge"; - rev = version; - sha256 = "00cp61lqvhi7b7j0rglsqg3l7cg8s9b8vq098bgvg5dygyi44hyv"; + rev = "98352845a14b9f2eb8925ad7a04a5f6cc6a5af06"; + sha256 = "1nv1f6f17cn057k9mydd3a0bmj2xa5k410fdq7nhw5b7msyxy2qv"; }; patchPhase = '' -- cgit v1.2.3 From 9d18a8a108e2b3578ebd20b8de9ff01bb9f22930 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 16:01:27 +0100 Subject: l tdlib-purple: 0.7.6 -> 0.7.8 --- lass/5pkgs/tdlib-purple/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lass/5pkgs/tdlib-purple/default.nix b/lass/5pkgs/tdlib-purple/default.nix index 445839a4b..54841588e 100644 --- a/lass/5pkgs/tdlib-purple/default.nix +++ b/lass/5pkgs/tdlib-purple/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "tdlib-purple"; - version = "0.7.6"; + version = "0.7.8"; src = fetchFromGitHub { owner = "ars3niy"; repo = pname; rev = "v${version}"; - sha256 = "1inamfzbrz0sy4y431jgwjfg6lz14a7c71khrg02481raxchhzzf"; + sha256 = "17g54mcxsidcx37l6m4p8i06ln1hvq3347dhdl9xkkn7pqpwvv1c"; }; cmakeFlags = [ -- cgit v1.2.3 From 7c194fff54ddd96b9ec34de8225e2d76663b4a8b Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 16:03:12 +0100 Subject: l yellow.r: enable jellyfin --- lass/1systems/yellow/config.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lass/1systems/yellow/config.nix b/lass/1systems/yellow/config.nix index 1afad003c..178a5adf1 100644 --- a/lass/1systems/yellow/config.nix +++ b/lass/1systems/yellow/config.nix @@ -152,10 +152,11 @@ with import ; krebs.iptables = { enable = true; tables.filter.INPUT.rules = [ - { predicate = "-p tcp --dport 80"; target = "ACCEPT"; } - { predicate = "-p tcp --dport 9091"; target = "ACCEPT"; } - { predicate = "-p tcp --dport 51413"; target = "ACCEPT"; } - { predicate = "-p udp --dport 51413"; target = "ACCEPT"; } + { predicate = "-p tcp --dport 80"; target = "ACCEPT"; } # nginx web dir + { predicate = "-p tcp --dport 9091"; target = "ACCEPT"; } # transmission-web + { predicate = "-p tcp --dport 51413"; target = "ACCEPT"; } # transmission-traffic + { predicate = "-p udp --dport 51413"; target = "ACCEPT"; } # transmission-traffic + { predicate = "-p tcp --dport 8096"; target = "ACCEPT"; } # jellyfin ]; }; @@ -265,4 +266,9 @@ with import ; ''; }; }; + + services.jellyfin = { + enable = true; + group = "download"; + }; } -- cgit v1.2.3 From f3b9a51ea442530c10e49878b68fe8442d70bbd0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 16:05:53 +0100 Subject: nixpkgs: 90cec09 -> d4c29df --- krebs/nixpkgs.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 74a8665c8..2e0b0257b 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "90cec09c3642b9be6699015a35e404ecb503aa0d", - "date": "2021-02-02T17:56:41+01:00", - "path": "/nix/store/jrvfl6bw8fwb6sq8w4m6mhj26y52nhr7-nixpkgs", - "sha256": "0134xglcwrq8wp4mnxn6byww9pf2iipxghwpm92bdyknf79msdv1", + "rev": "d4c29df154dc6397ea47a7ed7dd0450a46dd4695", + "date": "2021-02-08T22:02:05+01:00", + "path": "/nix/store/sbgnjrs0f1dqyqlmk2bm4wxgsy6pgjqp-nixpkgs", + "sha256": "015xcdirr9vh49dszgfb2rayr6mqscmmv2d3dh99ghv8gjcv050y", "fetchSubmodules": false, "deepClone": false, "leaveDotGit": false -- cgit v1.2.3 From 90782e21f8afd89aa408b2e9ea930a52c9d37889 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 21:48:58 +0100 Subject: nixpkgs-unstable: f217c0e -> 8c87313 --- krebs/nixpkgs-unstable.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index 321fafac6..57d30799b 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "f217c0ea7c148ddc0103347051555c7c252dcafb", - "date": "2021-01-21T09:50:34+01:00", - "path": "/nix/store/8srlzkkvbvlg4g585g9iyzd3ryiilm8a-nixpkgs", - "sha256": "0cyksxg2lnzxd0pss09rmmk2c2axz0lf9wvgvfng59nwf8dpq2kf", + "rev": "8c8731330b53ba0061686f36f10f101e662a4717", + "date": "2021-02-08T20:46:59+01:00", + "path": "/nix/store/agilvsqqdsqx36wf4zkq5gnhnab47qpd-nixpkgs", + "sha256": "0ak4d254myq6cl3d7jkq6n0apxabvwjz62zdw9habnrqg8asl8gk", "fetchSubmodules": false, "deepClone": false, "leaveDotGit": false -- cgit v1.2.3 From 5d0c18a7f62646ab80c8d191a7aaa9ccefc04df8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 10 Feb 2021 23:28:30 +0100 Subject: home-assistant: import from unstable --- krebs/5pkgs/simple/home-assistant.nix | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 krebs/5pkgs/simple/home-assistant.nix diff --git a/krebs/5pkgs/simple/home-assistant.nix b/krebs/5pkgs/simple/home-assistant.nix new file mode 100644 index 000000000..58a6edf33 --- /dev/null +++ b/krebs/5pkgs/simple/home-assistant.nix @@ -0,0 +1,8 @@ +{ pkgs, lib, ... }: let + unstable = pkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nixpkgs"; + rev = (lib.importJSON ../../nixpkgs-unstable.json).rev; + sha256 = (lib.importJSON ../../nixpkgs-unstable.json).sha256; + }; +in (import unstable {}).home-assistant -- cgit v1.2.3 From f0e8399b81b911da6c88d7af442bc305a1827c66 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 11 Feb 2021 11:07:58 +0100 Subject: nixpkgs: d4c29df -> 2394284 --- krebs/nixpkgs.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 2e0b0257b..8670999e0 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "d4c29df154dc6397ea47a7ed7dd0450a46dd4695", - "date": "2021-02-08T22:02:05+01:00", - "path": "/nix/store/sbgnjrs0f1dqyqlmk2bm4wxgsy6pgjqp-nixpkgs", - "sha256": "015xcdirr9vh49dszgfb2rayr6mqscmmv2d3dh99ghv8gjcv050y", + "rev": "2394284537b89471c87065b040d3dedd8b5907fe", + "date": "2021-02-10T23:24:22+01:00", + "path": "/nix/store/rqgraycidchn5wc5mki5sqj8bl5cpx78-nixpkgs", + "sha256": "1j7vp735is5d32mbrgavpxi3fbnsm6d99a01ap8gn30n5ysd14sl", "fetchSubmodules": false, "deepClone": false, "leaveDotGit": false -- cgit v1.2.3 From 438567e9b1cad51515791023a424d1b5773e148f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 4 Feb 2021 14:00:44 +0100 Subject: mic92: add grandalf to tinc . --- krebs/3modules/external/mic92.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix index 29d0b27fa..76f7d9b09 100644 --- a/krebs/3modules/external/mic92.nix +++ b/krebs/3modules/external/mic92.nix @@ -453,6 +453,29 @@ in { }; }; }; + + grandalf = { + owner = config.krebs.users.mic92; + nets = { + retiolum = { + ip4.addr = "10.243.29.187"; + aliases = [ + "grandalf.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAn1wLOI8DluJAKvscyImoyG0gjxyVC1/Ky8A63YO7INy0SYBg3wU7 + XPSbix5VJZdADQ382LWg31ORYjnDg40c49gCGLfR6+awgd+Rb0sb4eAz07XENXJC + qc70oQrrXLi8HIfeckCsJHe514LJOMA3pU+muaMShOiSygoTiTlEH6RRrkC8HROL + 2/V7Hm2Sg7YS+MY8bI/x61MIagfkQKH2eFyqGG54Y80bIhm5SohMkiANu78GdngI + jb+EGlT/vq3+oGNFJ7Shy/VsR5GLDoZ5KCsT45DM87lOjGB7m+bOdizZQtWmJtC/ + /btEPWJPAD9lIY2iGtPrmeMWDNTW9c0iCwIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; + eva = { owner = config.krebs.users.mic92; nets = rec { -- cgit v1.2.3 From b879ccaeb92b6ee725719c53d93a53427d984a2f Mon Sep 17 00:00:00 2001 From: Harshavardhan Unnibhavi Date: Thu, 4 Feb 2021 16:26:03 +0000 Subject: Add redha to tinc --- krebs/3modules/external/mic92.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix index 76f7d9b09..3d5672b00 100644 --- a/krebs/3modules/external/mic92.nix +++ b/krebs/3modules/external/mic92.nix @@ -453,6 +453,28 @@ in { }; }; }; + + redha = { + owner = config.krebs.users.mic92; + nets = { + retiolum = { + ip4.addr = "10.243.29.188"; + aliases = [ + "redha.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAx7STxTTPMxXugweHpUGOeLUrrTSCt7j5l+fjNtArIygOGKEiAC5O + s0G4WHK2IcrNnv7pxS09S5mnXywi51aAL+G2fKzcU3YgLFuoUN4Kk5LohMvBynEE + a3kZK2/D+LMeFfpK2RWBPjLnulN29ke11Iot42TC6+NIMWiZh/Y2T0mKirUJQGsH + RV3zRlR7YfIOdR1AZ5S+qrmPF8hLb7O08TTXrHo8NQk5NAVUS89OYcn1pc9hnf/e + FK5qRrQFMRFB8KGV+n3+cx3XCM2q0ZPTNf06N+Usx6vTKLASa/4GaTcbBx+9Dndm + mFVWq9JjLa8e65tojzj8PhmgxqaNCf8aKwIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; grandalf = { owner = config.krebs.users.mic92; -- cgit v1.2.3 From dd6a591c752696b2238a7f7df94614551a88842e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 8 Feb 2021 11:59:58 +0100 Subject: mic92: init dimitrios-desktop --- krebs/3modules/external/mic92.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix index 3d5672b00..e45367a54 100644 --- a/krebs/3modules/external/mic92.nix +++ b/krebs/3modules/external/mic92.nix @@ -97,6 +97,27 @@ in { }; }; }; + dimitrios-desktop = { + owner = config.krebs.users.mic92; + nets = { + retiolum = { + ip4.addr = "10.243.29.189"; + aliases = [ + "dimitrios-desktop.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAz9aKIhzk8+ZNBQmU054yc1yTdMyaw1aqWXYyQZoCmFaBIlMvF8I0 + dd+56cGjK8O7KkEhheDL/ijj9cCcxbqHSTktXz47ScyTaN63h13+MBUIUzDwSO4E + 9fRUUn3lbZenhGoON7hlaHb/qAR0yLxip0Tw77bcq4hvKleD74NnAJILPoP1KRDY + O5vs8C8wpdJUtnlsfkAa058wDI+7GNPb0cs0/pBQVR2GUGb1xqVJ5obO/lFKOJ/e + DKemnlg736cEaIF6v9M+w4VmL8mNudDy6RxA6/xIErP5Ru2aK5lH5UBHVCwdLLCy + 8y3It9Tgji3G9nOFbhaeKDjeIAJ8sG+WjQIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; donna = { owner = config.krebs.users.mic92; nets = rec { -- cgit v1.2.3 From b144f7150a50800d498f257873891c9b03b38bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 8 Feb 2021 12:22:39 +0100 Subject: mic92: fix tinc name --- krebs/3modules/external/mic92.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix index e45367a54..d4b2e4633 100644 --- a/krebs/3modules/external/mic92.nix +++ b/krebs/3modules/external/mic92.nix @@ -97,13 +97,13 @@ in { }; }; }; - dimitrios-desktop = { + dimitriosxps = { owner = config.krebs.users.mic92; nets = { retiolum = { ip4.addr = "10.243.29.189"; aliases = [ - "dimitrios-desktop.r" + "dimitriosxps.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- -- cgit v1.2.3 From d0e7bc46b4cdb15f7505aa069ac29588b02ddf92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 11 Feb 2021 11:37:55 +0100 Subject: mic92: fix trailing whitespace for lassulus --- krebs/3modules/external/mic92.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix index d4b2e4633..306ab34eb 100644 --- a/krebs/3modules/external/mic92.nix +++ b/krebs/3modules/external/mic92.nix @@ -474,7 +474,7 @@ in { }; }; }; - + redha = { owner = config.krebs.users.mic92; nets = { @@ -506,14 +506,14 @@ in { "grandalf.r" ]; tinc.pubkey = '' - -----BEGIN RSA PUBLIC KEY----- - MIIBCgKCAQEAn1wLOI8DluJAKvscyImoyG0gjxyVC1/Ky8A63YO7INy0SYBg3wU7 - XPSbix5VJZdADQ382LWg31ORYjnDg40c49gCGLfR6+awgd+Rb0sb4eAz07XENXJC - qc70oQrrXLi8HIfeckCsJHe514LJOMA3pU+muaMShOiSygoTiTlEH6RRrkC8HROL - 2/V7Hm2Sg7YS+MY8bI/x61MIagfkQKH2eFyqGG54Y80bIhm5SohMkiANu78GdngI - jb+EGlT/vq3+oGNFJ7Shy/VsR5GLDoZ5KCsT45DM87lOjGB7m+bOdizZQtWmJtC/ - /btEPWJPAD9lIY2iGtPrmeMWDNTW9c0iCwIDAQAB - -----END RSA PUBLIC KEY----- + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAn1wLOI8DluJAKvscyImoyG0gjxyVC1/Ky8A63YO7INy0SYBg3wU7 + XPSbix5VJZdADQ382LWg31ORYjnDg40c49gCGLfR6+awgd+Rb0sb4eAz07XENXJC + qc70oQrrXLi8HIfeckCsJHe514LJOMA3pU+muaMShOiSygoTiTlEH6RRrkC8HROL + 2/V7Hm2Sg7YS+MY8bI/x61MIagfkQKH2eFyqGG54Y80bIhm5SohMkiANu78GdngI + jb+EGlT/vq3+oGNFJ7Shy/VsR5GLDoZ5KCsT45DM87lOjGB7m+bOdizZQtWmJtC/ + /btEPWJPAD9lIY2iGtPrmeMWDNTW9c0iCwIDAQAB + -----END RSA PUBLIC KEY----- ''; }; }; -- cgit v1.2.3 From 2c59f04f5f15d36dbc826cfc7581f5cea1f5d0d1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 11 Feb 2021 17:13:04 +0100 Subject: remove broken hass override --- krebs/5pkgs/simple/home-assistant.nix | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 krebs/5pkgs/simple/home-assistant.nix diff --git a/krebs/5pkgs/simple/home-assistant.nix b/krebs/5pkgs/simple/home-assistant.nix deleted file mode 100644 index 58a6edf33..000000000 --- a/krebs/5pkgs/simple/home-assistant.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, lib, ... }: let - unstable = pkgs.fetchFromGitHub { - owner = "nixos"; - repo = "nixpkgs"; - rev = (lib.importJSON ../../nixpkgs-unstable.json).rev; - sha256 = (lib.importJSON ../../nixpkgs-unstable.json).sha256; - }; -in (import unstable {}).home-assistant -- cgit v1.2.3 From 72700a220fdcad7a34be05b748335068898880cf Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 11 Feb 2021 17:13:55 +0100 Subject: l hass: use unstable hass package --- lass/2configs/hass/default.nix | 158 ++++++++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 67 deletions(-) diff --git a/lass/2configs/hass/default.nix b/lass/2configs/hass/default.nix index 3cd6e0ebf..7765db84e 100644 --- a/lass/2configs/hass/default.nix +++ b/lass/2configs/hass/default.nix @@ -1,7 +1,29 @@ { config, lib, pkgs, ... }: with import ./lib.nix { inherit lib; }; +let + unstable = import (pkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nixpkgs"; + rev = (lib.importJSON ../../../krebs/nixpkgs-unstable.json).rev; + sha256 = (lib.importJSON ../../../krebs/nixpkgs-unstable.json).sha256; + }) {}; + dwdwfsapi = pkgs.python3Packages.buildPythonPackage rec { + pname = "dwdwfsapi"; + version = "1.0.3"; -{ + src = pkgs.python3Packages.fetchPypi { + inherit pname version; + sha256 = "0fcv79xiq0qr4kivhd68iqpgrsjc7djxqs2h543pyr0sdgb5nz9x"; + }; + + buildInputs = with pkgs.python3Packages; [ + requests ciso8601 + ]; + + # LC_ALL = "en_US.UTF-8"; + }; + +in { imports = [ ./zigbee.nix ./rooms/bett.nix @@ -21,78 +43,80 @@ with import ./lib.nix { inherit lib; }; services.home-assistant = { enable = true; - package = pkgs.home-assistant.override { - # extraComponents = [ "hue" ]; + package = (unstable.home-assistant.overrideAttrs (old: { + doInstallCheck = false; + })).override { + extraPackages = _: [ dwdwfsapi ]; }; configWritable = true; lovelaceConfigWritable = true; - }; - - services.home-assistant.config = let - tasmota_s20 = name: topic: { - platform = "mqtt"; - inherit name; - state_topic = "stat/${topic}/POWER"; - command_topic = "cmnd/${topic}/POWER"; - payload_on = "ON"; - payload_off = "OFF"; - }; - in { - homeassistant = { - name = "Home"; - time_zone = "Europe/Berlin"; - latitude = "52.46187"; - longitude = "13.41489"; - elevation = 90; - unit_system = "metric"; - customize = friendly_names; - }; - config = {}; - sun.elevation = 66; - shopping_list = {}; - discovery = {}; - frontend = {}; - mqtt = { - broker = "localhost"; - port = 1883; - client_id = "home-assistant"; - username = "gg23"; - password = "gg23-mqtt"; - keepalive = 60; - protocol = 3.1; - - discovery = true; - birth_message = { - topic = "/hass/status"; - payload = "online"; + config = let + tasmota_s20 = name: topic: { + platform = "mqtt"; + inherit name; + state_topic = "stat/${topic}/POWER"; + command_topic = "cmnd/${topic}/POWER"; + payload_on = "ON"; + payload_off = "OFF"; + }; + in { + homeassistant = { + name = "Home"; + time_zone = "Europe/Berlin"; + latitude = "52.46187"; + longitude = "13.41489"; + elevation = 90; + unit_system = "metric"; + customize = friendly_names; }; - will_message = { - topic = "/hass/status"; - payload = "offline"; + config = {}; + sun.elevation = 66; + shopping_list = {}; + discovery = {}; + frontend = {}; + http = {}; + mqtt = { + broker = "localhost"; + port = 1883; + client_id = "home-assistant"; + username = "gg23"; + password = "gg23-mqtt"; + keepalive = 60; + protocol = 3.1; + + discovery = true; + birth_message = { + topic = "/hass/status"; + payload = "online"; + }; + will_message = { + topic = "/hass/status"; + payload = "offline"; + }; }; + sensor = [ + { + platform = "dwd_weather_warnings"; + region_name = "Berlin"; + } + ]; + switch = [ + (tasmota_s20 "TV" "tv") + (tasmota_s20 "Drucker Strom" "drucker") + (tasmota_s20 "Waschmaschine" "wasch") + (tasmota_s20 "Stereo Anlage" "stereo") + ]; + mobile_app = {}; + weather = [ + { + platform = "openweathermap"; + api_key = "xxx"; # TODO put into secrets + } + ]; + system_health = {}; + history = {}; + shopping_list = {}; }; - sensor = [ - { - platform = "dwd_weather_warnings"; - region_name = "Berlin"; - } - ]; - switch = [ - (tasmota_s20 "TV" "tv") - (tasmota_s20 "Drucker Strom" "drucker") - (tasmota_s20 "Waschmaschine" "wasch") - (tasmota_s20 "Stereo Anlage" "stereo") - ]; - mobile_app = {}; - weather = [ - { - platform = "openweathermap"; - api_key = "xxx"; # TODO put into secrets - } - ]; - system_health = {}; - history = {}; - shopping_list = {}; }; services.mosquitto = { -- cgit v1.2.3 From 29885a16635fada6be60cef71c5b7d2b9069b78a Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 15 Feb 2021 11:11:40 +0100 Subject: l xmonad: ignore minimized windows --- lass/5pkgs/custom/xmonad-lass/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix index 5a741353d..3b45552b3 100644 --- a/lass/5pkgs/custom/xmonad-lass/default.nix +++ b/lass/5pkgs/custom/xmonad-lass/default.nix @@ -35,6 +35,7 @@ import XMonad.Hooks.ManageHelpers (doCenterFloat, doRectFloat, (-?>)) import XMonad.Hooks.Place (placeHook, smart) import XMonad.Hooks.UrgencyHook (focusUrgent) import XMonad.Hooks.UrgencyHook (withUrgencyHook, UrgencyHook(..)) +import XMonad.Layout.BoringWindows (boringWindows, focusDown, focusUp) import XMonad.Layout.FixedColumn (FixedColumn(..)) import XMonad.Layout.Grid (Grid(..)) import XMonad.Layout.Minimize (minimize) @@ -93,7 +94,7 @@ main' = do myLayoutHook = defLayout where - defLayout = minimize $ ((avoidStruts $ Mirror (Tall 1 (3/100) (1/2))) ||| Full ||| FixedColumn 2 80 80 1 ||| Tall 1 (3/100) (1/2) ||| simplestFloat ||| mouseResizableTile ||| Grid) + defLayout = minimize . boringWindows $ ((avoidStruts $ Mirror (Tall 1 (3/100) (1/2))) ||| Full ||| FixedColumn 2 80 80 1 ||| Tall 1 (3/100) (1/2) ||| simplestFloat ||| mouseResizableTile ||| Grid) floatHooks = composeAll [ className =? "Pinentry" --> doCenterFloat @@ -123,6 +124,11 @@ myKeyMap = , ("", gridselectWorkspace gridConfig W.view) , ("M4-C-k", spawn "${pkgs.xorg.xkill}/bin/xkill") + , ("M4-", focusDown) + , ("M4-S-", focusUp) + , ("M4-j", focusDown) + , ("M4-k", focusUp) + , ("M4-a", focusUrgent) , ("M4-S-r", renameWorkspace myXPConfig) , ("M4-S-a", addWorkspacePrompt myXPConfig) -- cgit v1.2.3 From 34ac22e4419fff0e07afc3a71615dc30399aecff Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Feb 2021 19:50:25 +0100 Subject: l: default user is yubikey --- krebs/3modules/lass/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index c5cf5cb15..555f39be0 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -690,7 +690,7 @@ in { }; }; users = rec { - lass = lass-blue; + lass = lass-yubikey; lass-yubikey = { mail = lass.mail; pubkey = builtins.readFile ./ssh/yubikey.rsa; -- cgit v1.2.3 From 892ae1f8a70ce3a6062a2ffa6ac5b3e3df3ba99c Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Feb 2021 21:58:48 +0100 Subject: glados: import unstable home-assistant --- krebs/2configs/shack/glados/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/krebs/2configs/shack/glados/default.nix b/krebs/2configs/shack/glados/default.nix index d546564c5..53d6e6f4a 100644 --- a/krebs/2configs/shack/glados/default.nix +++ b/krebs/2configs/shack/glados/default.nix @@ -1,5 +1,11 @@ { config, pkgs, lib, ... }: let + unstable = import (pkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nixpkgs"; + rev = (lib.importJSON ../../../nixpkgs-unstable.json).rev; + sha256 = (lib.importJSON ../../../nixpkgs-unstable.json).sha256; + }) {}; in { services.nginx.virtualHosts."hass.shack" = { serverAliases = [ "glados.shack" ]; @@ -40,6 +46,9 @@ in { { enable = true; autoExtraComponents = true; + package = unstable.home-assistant.overrideAttrs (old: { + doInstallCheck = false; + }); config = { homeassistant = { name = "Glados"; -- cgit v1.2.3 From 57da9035d2f4ac805fa05a92fa70eee942b2db06 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 16 Feb 2021 23:02:08 +0100 Subject: ircd: raise all limits --- krebs/2configs/ircd.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/krebs/2configs/ircd.nix b/krebs/2configs/ircd.nix index 789fc2f2f..0de07a027 100644 --- a/krebs/2configs/ircd.nix +++ b/krebs/2configs/ircd.nix @@ -5,6 +5,8 @@ 6667 6669 ]; + systemd.services.charybdis.serviceConfig.LimitNOFILE = 16384; + krebs.charybdis = { enable = true; motd = '' @@ -15,7 +17,7 @@ serverinfo { name = "${config.krebs.build.host.name}.irc.r"; sid = "1as"; - description = "miep!"; + description = "irc!"; network_name = "irc.r"; vhost = "0.0.0.0"; @@ -26,7 +28,7 @@ #ssl_dh_params = "etc/dh.pem"; #ssld_count = 1; - default_max_clients = 100000; + default_max_clients = 2048; #nicklen = 30; }; @@ -38,12 +40,12 @@ */ host = "0.0.0.0"; port = 6667; - sslport = 6697; + #sslport = 6697; /* Listen on IPv6 (if you used host= above). */ host = "::"; port = 6667; - sslport = 6697; + #sslport = 6697; }; class "users" { @@ -53,9 +55,9 @@ number_per_ip_global = 4096; cidr_ipv4_bitlen = 24; cidr_ipv6_bitlen = 64; - number_per_cidr = 65536; - max_number = 100000; - sendq = 10 megabyte; + number_per_cidr = 65535; + max_number = 65535; + sendq = 1000 megabyte; }; privset "op" { @@ -91,7 +93,7 @@ use_knock = yes; knock_delay = 5 minutes; knock_delay_channel = 1 minute; - max_chans_per_user = 15; + max_chans_per_user = 150; max_bans = 100; max_bans_large = 500; default_split_user_count = 0; -- cgit v1.2.3 From ac10edb22a05258326ac7a84571c09147f603a09 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 18 Feb 2021 19:56:54 +0100 Subject: l: remove deprecated cgit aliases --- krebs/3modules/lass/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 555f39be0..9dd76a627 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -125,7 +125,6 @@ in { ip6.addr = r6 "1e1"; aliases = [ "uriel.r" - "cgit.uriel.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- @@ -151,7 +150,6 @@ in { ip6.addr = r6 "dea7"; aliases = [ "mors.r" - "cgit.mors.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- @@ -185,7 +183,6 @@ in { ip6.addr = r6 "50da"; aliases = [ "shodan.r" - "cgit.shodan.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- @@ -220,7 +217,6 @@ in { ip6.addr = r6 "1205"; aliases = [ "icarus.r" - "cgit.icarus.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- @@ -254,7 +250,6 @@ in { ip6.addr = r6 "daed"; aliases = [ "daedalus.r" - "cgit.daedalus.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- @@ -286,7 +281,6 @@ in { ip6.addr = r6 "5ce7"; aliases = [ "skynet.r" - "cgit.skynet.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- -- cgit v1.2.3 From 1580aca24d352eaf649305e367ad92537b25f314 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 18 Feb 2021 19:57:38 +0100 Subject: l: init coaxmetal.r --- krebs/3modules/lass/default.nix | 42 ++++++++++++++++++++++++++++ lass/1systems/coaxmetal/config.nix | 53 ++++++++++++++++++++++++++++++++++++ lass/1systems/coaxmetal/physical.nix | 52 +++++++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 lass/1systems/coaxmetal/config.nix create mode 100644 lass/1systems/coaxmetal/physical.nix diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 9dd76a627..2123ec962 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -682,6 +682,48 @@ in { ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII3OpzRB3382d7c2apdHC+U/R0ZlaWxXZa3GFAj54ZhU "; syncthing.id = "JAVJ6ON-WLCWOA3-YB7EHPX-VGIN4XF-635NIVZ-WZ4HN4M-QRMLT4N-5PL5MQN"; }; + + coaxmetal = { + cores = 16; + nets = { + retiolum = { + ip4.addr = "10.243.0.17"; + ip6.addr = r6 "17"; + aliases = [ + "coaxmetal.r" + ]; + tinc.pubkey = '' + -----BEGIN PUBLIC KEY----- + MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAwcuMl/W6DZ7UMK4RHrxA + xCc8CkqpUTYldPdB9KJmcH6OpbQqCcPxGOvRe42NdOfCyy11WjAjUMRGnzMyi4MK + gMEjcrl5CnQd9nF9f8Mom8cuSOVm1j46qY7Trl/MsEKsKHiYAHtLFpHz2+UI+HBU + WbSeDLLA8g79SZq/pqWHfp3YKzqP4p+dmi8j+aOZJWkGu9l+Q40qQrTJQCxYgEek + ODeBFCY3DGfJRn79IFGuhF1/jGiAwF3/1j2Rxlesazl6/Lyvmtioplsqn8J94z32 + G5wyGpqn/BcXkJTlWtwb3Rrg6OOALJAqy2H5EoIVT26gwmvkEStMtvgLfAeYjL8F + G2bAtaeQGzwQZNuVJAMI9Qtb+PHw322Wz+P8U669C/HCdGCumMf+M7UDHP79kXOO + IFs1NvkU3z/iO/5bj41v8u0W8+b9NWe++dI8N8q0hWLPgnz5PI998xW06Dul7pAX + K1OMIMfTTGgAZHAF1Kdn1BSXezgwkutwzy5h8XkYclyHB2nPXkXIYmahi1XgWeAE + 7B4NmefbS6H8dLOU7yMEWuxmYl41UOybtyrsp1za5wtERpQgzl6EWfIXISEdx1Ly + bmb3SGtB85RyqqCe2O9DzVZCw7mXgN69R5efyEuq3HIIN9udLNrybPNNyD/OlAqo + l/xwDxiSCEsO6yY5lGc0MCMCAwEAAQ== + -----END PUBLIC KEY----- + ''; + }; + wiregrill = { + ip6.addr = w6 "17"; + aliases = [ + "coaxmetal.w" + ]; + wireguard.pubkey = '' + lkjR14oOVKl03/0sUzOmddf28ps+v5qRxrbRY03Pg38= + ''; + }; + }; + ssh.privkey.path = ; + ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO9vAYuTv07c9bOjDJId3ShXJ1qIEuyrjkVYkJn9yMET "; + syncthing.id = "W5BJ4TL-GAQ46WS-ZB72HFS-XOURLBA-RNBVMYC-POFH4UA-CBORQID-BMIHNQZ"; + }; + }; users = rec { lass = lass-yubikey; diff --git a/lass/1systems/coaxmetal/config.nix b/lass/1systems/coaxmetal/config.nix new file mode 100644 index 000000000..3e0b1674a --- /dev/null +++ b/lass/1systems/coaxmetal/config.nix @@ -0,0 +1,53 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + + + + + + + + + + + + + + + + + + + ]; + + krebs.build.host = config.krebs.hosts.coaxmetal; + + environment.shellAliases = { + deploy = pkgs.writeDash "deploy" '' + set -eu + export SYSTEM="$1" + $(nix-build $HOME/sync/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" -A deploy) + ''; + usb-tether-on = pkgs.writeDash "usb-tether-on" '' + adb shell su -c service call connectivity 33 i32 1 s16 text + ''; + usb-tether-off = pkgs.writeDash "usb-tether-off" '' + adb shell su -c service call connectivity 33 i32 0 s16 text + ''; + }; + + programs.adb.enable = true; + + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + # config.General.Disable = "Headset"; + extraConfig = '' + [General] + Disable = Headset + ''; + }; + hardware.pulseaudio.package = pkgs.pulseaudioFull; +} diff --git a/lass/1systems/coaxmetal/physical.nix b/lass/1systems/coaxmetal/physical.nix new file mode 100644 index 000000000..c94740c54 --- /dev/null +++ b/lass/1systems/coaxmetal/physical.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = [ + ./config.nix + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + networking.hostId = "e0c335ea"; + boot.zfs.requestEncryptionCredentials = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.grub = { + enable = true; + # device = "/dev/disk/by-id/nvme-WDC_PC_SN730_SDBQNTY-1T00-1001_205349800040"; + device = "nodev"; + efiSupport = true; + # efiInstallAsRemovable = true; + }; + + services.xserver.videoDrivers = [ + "amdgpu" + ]; + + hardware.opengl.extraPackages = [ pkgs.amdvlk ]; + # is required for amd graphics support ( xorg wont boot otherwise ) + boot.kernelPackages = pkgs.linuxPackages_latest; + environment.variables.VK_ICD_FILENAMES = + "/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json"; + + boot.initrd.availableKernelModules = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.kernelModules = [ "kvm-amd" ]; + + fileSystems."/" = { + device = "zpool/root/root"; + fsType = "zfs"; + }; + + fileSystems."/home" = { + device = "zpool/root/home"; + fsType = "zfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/50A7-1889"; + fsType = "vfat"; + }; + + services.logind.lidSwitch = "ignore"; + services.logind.lidSwitchDocked = "ignore"; + boot.extraModprobeConfig = '' + options psmouse proto=imps + ''; +} -- cgit v1.2.3 From 8b7477926d0b7c1ac3d92d07e6934f9e593ea9ff Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 18 Feb 2021 20:16:07 +0100 Subject: l: fix lass-yubikey mail --- krebs/3modules/lass/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 2123ec962..6978c0b4e 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -728,7 +728,7 @@ in { users = rec { lass = lass-yubikey; lass-yubikey = { - mail = lass.mail; + mail = "lass@lassul.us"; pubkey = builtins.readFile ./ssh/yubikey.rsa; pgp.pubkeys.default = builtins.readFile ./pgp/yubikey.pgp; }; -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/92100000.lock: No such file or directory (2)