diff options
Diffstat (limited to 'krebs')
-rw-r--r-- | krebs/1systems/puyak/config.nix | 2 | ||||
-rw-r--r-- | krebs/1systems/wolf/config.nix | 1 | ||||
-rw-r--r-- | krebs/2configs/exim-smarthost.nix | 1 | ||||
-rw-r--r-- | krebs/2configs/ircd.nix | 1 | ||||
-rw-r--r-- | krebs/2configs/reaktor2.nix | 20 | ||||
-rw-r--r-- | krebs/2configs/shack/prometheus/unifi.nix | 2 | ||||
-rw-r--r-- | krebs/3modules/acl.nix | 2 | ||||
-rw-r--r-- | krebs/3modules/exim-smarthost.nix | 2 | ||||
-rw-r--r-- | krebs/3modules/iana-etc.nix | 9 | ||||
-rw-r--r-- | krebs/3modules/permown.nix | 16 | ||||
-rw-r--r-- | krebs/5pkgs/haskell/email-header.nix | 4 | ||||
-rw-r--r-- | krebs/5pkgs/simple/fzfmenu/default.nix | 2 | ||||
-rw-r--r-- | krebs/5pkgs/simple/htgen-paste/src/htgen-paste | 4 | ||||
-rw-r--r-- | krebs/5pkgs/simple/irc-announce/default.nix | 2 | ||||
-rw-r--r-- | krebs/5pkgs/simple/netcup/default.nix | 2 | ||||
-rw-r--r-- | krebs/5pkgs/simple/realwallpaper/default.nix | 2 | ||||
-rw-r--r-- | krebs/nixpkgs-unstable.json | 8 | ||||
-rw-r--r-- | krebs/nixpkgs.json | 8 |
18 files changed, 57 insertions, 31 deletions
diff --git a/krebs/1systems/puyak/config.nix b/krebs/1systems/puyak/config.nix index 931ebe70b..a4f22d39c 100644 --- a/krebs/1systems/puyak/config.nix +++ b/krebs/1systems/puyak/config.nix @@ -113,6 +113,8 @@ ]; krebs.build.host = config.krebs.hosts.puyak; + krebs.hosts.puyak.ssh.privkey.path = <secrets/ssh.id_ed25519>; + sound.enable = false; boot = { loader.systemd-boot.enable = true; diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index 12ce4db3e..2415bd32f 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -51,6 +51,7 @@ in # uninteresting stuff ##################### krebs.build.host = config.krebs.hosts.wolf; + krebs.hosts.wolf.ssh.privkey.path = <secrets/ssh.id_ed25519>; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "virtio_pci" "virtio_blk" diff --git a/krebs/2configs/exim-smarthost.nix b/krebs/2configs/exim-smarthost.nix index c2f6b4dc0..2842e10d4 100644 --- a/krebs/2configs/exim-smarthost.nix +++ b/krebs/2configs/exim-smarthost.nix @@ -42,6 +42,7 @@ in { "makefu@krebsco.de" = makefu; "spam@krebsco.de" = spam-ml; "tv@krebsco.de" = tv; + "xkey@krebsco.de" = { mail = "lennart@cope.cool"; }; # XXX These are no internet aliases # XXX exim-retiolum hosts should be able to relay to retiolum addresses "lass@retiolum" = lass; diff --git a/krebs/2configs/ircd.nix b/krebs/2configs/ircd.nix index c56883d3e..b82aba45a 100644 --- a/krebs/2configs/ircd.nix +++ b/krebs/2configs/ircd.nix @@ -38,7 +38,6 @@ hidden = false; password = "$2a$04$0AtVycWQJ07ymrDdKyAm2un3UVSVIzpzL3wsWbWb3PF95d1CZMcMO"; }; - server.max-line-length = 1024; server.lookup-hostnames = true; }; }; diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 231c3d46c..61b44fc27 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -253,6 +253,24 @@ let }; }; + vicuna = { + pattern = "^!vicuna (.*)$"; + activate = "match"; + arguments = [1]; + timeoutSec = 1337; + command = { + filename = pkgs.writeDash "vicuna" '' + set -efu + + mkdir -p ${stateDir}/vicuna + export CONTEXT=${stateDir}/vicuna/"$_msgtarget".context + ${pkgs.vicuna-chat}/bin/vicuna-chat "$@" | + echo "$_from: $(cat)" | + fold -s -w 426 + ''; + }; + }; + locationsLib = pkgs.writeText "locations.sh" '' ENDPOINT=http://c.r/poi.json get_locations() { @@ -413,6 +431,7 @@ let hooks.sed interrogate say + vicuna (generators.command_hook { inherit (commands) dance random-emoji nixos-version; tell = { @@ -607,6 +626,7 @@ in { channels = [ "#noise" "#xxx" + "#fin" ]; }; } diff --git a/krebs/2configs/shack/prometheus/unifi.nix b/krebs/2configs/shack/prometheus/unifi.nix index 401ecb024..34e47add9 100644 --- a/krebs/2configs/shack/prometheus/unifi.nix +++ b/krebs/2configs/shack/prometheus/unifi.nix @@ -5,6 +5,6 @@ unifiAddress = "https://unifi.shack:8443/"; unifiInsecure = true; unifiUsername = "prometheus"; # needed manual login after setup to confirm the password - unifiPassword = lib.replaceChars ["\n"] [""] (builtins.readFile <secrets/shack/unifi-prometheus-pw>); + unifiPassword = lib.replaceStrings ["\n"] [""] (builtins.readFile <secrets/shack/unifi-prometheus-pw>); }; } diff --git a/krebs/3modules/acl.nix b/krebs/3modules/acl.nix index d23706499..05f7e824b 100644 --- a/krebs/3modules/acl.nix +++ b/krebs/3modules/acl.nix @@ -33,7 +33,7 @@ in { default = {}; }; config = { - systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceChars ["/"] ["_"] path}" { + systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceStrings ["/"] ["_"] path}" { wantedBy = [ "multi-user.target" ]; path = [ pkgs.acl diff --git a/krebs/3modules/exim-smarthost.nix b/krebs/3modules/exim-smarthost.nix index 7b3dace6a..093ae2030 100644 --- a/krebs/3modules/exim-smarthost.nix +++ b/krebs/3modules/exim-smarthost.nix @@ -40,7 +40,7 @@ let }; extraRouters = mkOption { - type = types.nullOr types.str; + type = types.nullOr types.lines; default = null; }; diff --git a/krebs/3modules/iana-etc.nix b/krebs/3modules/iana-etc.nix index 3195f71d9..dabe2f8aa 100644 --- a/krebs/3modules/iana-etc.nix +++ b/krebs/3modules/iana-etc.nix @@ -1,5 +1,6 @@ -{ config, pkgs, lib, ... }: -with lib; { +{ config, lib, pkgs, ... }: let + slib = import ../../lib/pure.nix { inherit lib; }; +in with lib; { options.krebs.iana-etc.services = mkOption { default = {}; @@ -7,7 +8,7 @@ with lib; { options = { port = mkOption { default = config._module.args.name; - type = types.addCheck types.str (test "[1-9][0-9]*"); + type = types.addCheck types.str (slib.test "[1-9][0-9]*"); }; } // genAttrs ["tcp" "udp"] (protocol: mkOption { default = null; @@ -30,7 +31,7 @@ with lib; { (proto: let line = "${entry.${proto}.name} ${entry.port}/${proto}"; in /* sh */ '' - echo ${shell.escape line} + echo ${slib.shell.escape line} '') (filter (proto: entry.${proto} != null) ["tcp" "udp"])} '') (attrValues config.krebs.iana-etc.services)} diff --git a/krebs/3modules/permown.nix b/krebs/3modules/permown.nix index 3ebbc44fe..ae8702978 100644 --- a/krebs/3modules/permown.nix +++ b/krebs/3modules/permown.nix @@ -1,4 +1,6 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, ... }: let + slib = import ../../lib/pure.nix { inherit lib; }; +in with lib; { options.krebs.permown = mkOption { @@ -16,7 +18,7 @@ with lib; { group = mkOption { apply = x: if x == null then "" else x; default = null; - type = types.nullOr types.groupname; + type = types.nullOr slib.types.groupname; }; keepGoing = mkOption { default = false; @@ -28,15 +30,15 @@ with lib; { ''; }; owner = mkOption { - type = types.username; + type = slib.types.username; }; path = mkOption { default = config._module.args.name; - type = types.absolute-pathname; + type = slib.types.absolute-pathname; }; umask = mkOption { default = "0027"; - type = types.file-mode; + type = slib.types.file-mode; }; }; })); @@ -48,11 +50,11 @@ with lib; { system.activationScripts.permown = let mkdir = plan: /* sh */ '' - ${pkgs.coreutils}/bin/mkdir -p ${shell.escape plan.path} + ${pkgs.coreutils}/bin/mkdir -p ${slib.shell.escape plan.path} ''; in concatMapStrings mkdir plans; - systemd.services = genAttrs' plans (plan: let + systemd.services = slib.genAttrs' plans (plan: let continuable = command: if plan.keepGoing then /* sh */ "{ ${command}; } || :" diff --git a/krebs/5pkgs/haskell/email-header.nix b/krebs/5pkgs/haskell/email-header.nix index e1e9d423f..f8ce03f39 100644 --- a/krebs/5pkgs/haskell/email-header.nix +++ b/krebs/5pkgs/haskell/email-header.nix @@ -18,9 +18,9 @@ let sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x"; }; }.${versions.majorMinor version} or { - version = "0.4.1-tv2"; + version = "0.4.2-tv1"; rev = "refs/tags/v${cfg.version}"; - sha256 = "1yg4b5318lpviwgjs4kdcqg8cwfnxxfcdckcjq12r2nnj2k4ms2d"; + sha256 = "JZfqvkbb/1t0q1iWmZHmmCN2Vr+QKTiq4LVncrG+xMU="; }; in mkDerivation { diff --git a/krebs/5pkgs/simple/fzfmenu/default.nix b/krebs/5pkgs/simple/fzfmenu/default.nix index fe5d5e27a..eb2441330 100644 --- a/krebs/5pkgs/simple/fzfmenu/default.nix +++ b/krebs/5pkgs/simple/fzfmenu/default.nix @@ -39,7 +39,7 @@ let }; in -pkgs.writeDashBin "fzfmenu" '' +pkgs.writers.writeDashBin "fzfmenu" '' set -efu # Spawn terminal if called without one, like e.g. from a window manager. diff --git a/krebs/5pkgs/simple/htgen-paste/src/htgen-paste b/krebs/5pkgs/simple/htgen-paste/src/htgen-paste index bc806e870..74266e53a 100644 --- a/krebs/5pkgs/simple/htgen-paste/src/htgen-paste +++ b/krebs/5pkgs/simple/htgen-paste/src/htgen-paste @@ -46,8 +46,8 @@ case "$Method $abs_path" in cp -v $content $item >&2 fi - if test -n ${reg_content_type-}; then - echo -n "$req_content_type" > "$item".content_type + if test -n "${req_content_type_override-}"; then + echo -n "$req_content_type_override" > "$item".content_type fi base32short=$(echo $base32 | cut -b-7) diff --git a/krebs/5pkgs/simple/irc-announce/default.nix b/krebs/5pkgs/simple/irc-announce/default.nix index 7b2af0307..75036d41c 100644 --- a/krebs/5pkgs/simple/irc-announce/default.nix +++ b/krebs/5pkgs/simple/irc-announce/default.nix @@ -1,6 +1,6 @@ { pkgs, lib, ... }: -pkgs.writeDashBin "irc-announce" '' +pkgs.writers.writeDashBin "irc-announce" '' set -euf IRC_SERVER=$1 diff --git a/krebs/5pkgs/simple/netcup/default.nix b/krebs/5pkgs/simple/netcup/default.nix index 408672eff..750e9cfa9 100644 --- a/krebs/5pkgs/simple/netcup/default.nix +++ b/krebs/5pkgs/simple/netcup/default.nix @@ -3,7 +3,7 @@ with stockholm.lib; let readJSON = path: fromJSON (readFile path); - sed.escape = replaceChars ["/"] ["\\/"]; # close enough + sed.escape = replaceStrings ["/"] ["\\/"]; # close enough PATH = makeBinPath [ coreutils curl diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index 236d75d72..544abb3a3 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -9,7 +9,7 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' gnused file findutils - imagemagick6 + imagemagick inkscape jq nomads-cloud diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index 83131c2b8..244a2cc54 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", - "date": "2023-07-01T19:09:17+02:00", - "path": "/nix/store/s5zy1prlscbr2iz6h9fj5la3973isaxw-nixpkgs", - "sha256": "02hpby5ln7p5kix9518hn0ady4q3i41z5ycamvwsarv3gvlzbsb4", + "rev": "3c7487575d9445185249a159046cc02ff364bff8", + "date": "2023-07-06T17:30:45-04:00", + "path": "/nix/store/cjn75bb2d5fgf0kj4nnk3p53z5qg2x80-nixpkgs", + "sha256": "0sll858mrfx64g5hc3sysg5cz4py9nxi8g7m9j5idhh8yq8lcz5p", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index aed82e9f3..5d61372b7 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "0de86059128947b2438995450f2c2ca08cc783d5", - "date": "2023-07-01T05:19:59+03:00", - "path": "/nix/store/fwazy7k5nlavyj4637jnsqabdzdiad90-nixpkgs", - "sha256": "0m3aqg2xx5705v4yglal1ksknqnj3cbdyzcyw1dvz6qqvn9ng7i5", + "rev": "d8bb6c681cf86265fdcf3cc3119f757bbb085835", + "date": "2023-07-07T23:10:04+02:00", + "path": "/nix/store/v2mnhk8j1p2g67zvr8mlhasmvj6187yy-nixpkgs", + "sha256": "1jsgl8i78avkdm31lzyazzn9nb3yrb099c6msa450yigsbxcmjqn", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, |