summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/1systems/hotdog/config.nix2
-rw-r--r--krebs/2configs/buildbot-stockholm.nix8
-rw-r--r--krebs/2configs/ircd.nix2
-rw-r--r--krebs/2configs/reaktor2.nix40
-rw-r--r--krebs/2configs/repo-sync.nix110
-rw-r--r--krebs/3modules/exim-smarthost.nix9
-rw-r--r--krebs/3modules/github/known-hosts.nix2
-rw-r--r--krebs/3modules/konsens.nix3
-rw-r--r--krebs/5pkgs/haskell/brockman/default.nix4
-rw-r--r--krebs/nixpkgs-unstable.json8
-rw-r--r--krebs/nixpkgs.json8
11 files changed, 92 insertions, 104 deletions
diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix
index 70307a96b..683556081 100644
--- a/krebs/1systems/hotdog/config.nix
+++ b/krebs/1systems/hotdog/config.nix
@@ -12,6 +12,7 @@
<stockholm/krebs/2configs/wiki.nix>
<stockholm/krebs/2configs/acme.nix>
<stockholm/krebs/2configs/mud.nix>
+ <stockholm/krebs/2configs/repo-sync.nix>
<stockholm/krebs/2configs/cal.nix>
<stockholm/krebs/2configs/mastodon.nix>
@@ -21,7 +22,6 @@
];
krebs.build.host = config.krebs.hosts.hotdog;
- krebs.github-hosts-sync.enable = true;
krebs.pages.enable = true;
boot.isContainer = true;
diff --git a/krebs/2configs/buildbot-stockholm.nix b/krebs/2configs/buildbot-stockholm.nix
index 9fc6a79e5..f0b6c324d 100644
--- a/krebs/2configs/buildbot-stockholm.nix
+++ b/krebs/2configs/buildbot-stockholm.nix
@@ -21,21 +21,21 @@
disko.urls = [
"http://cgit.gum.r/disko"
"http://cgit.ni.r/disko"
- "http://cgit.prism.r/disko"
+ "http://cgit.orange.r/disko"
];
krops.urls = [
"http://cgit.ni.r/krops"
- "http://cgit.prism.r/krops"
+ "http://cgit.orange.r/krops"
"https://github.com/krebs/krops.git"
];
nix_writers.urls = [
"http://cgit.ni.r/nix-writers"
- "http://cgit.prism.r/nix-writers"
+ "http://cgit.orange.r/nix-writers"
];
stockholm.urls = [
"http://cgit.gum.r/stockholm"
"http://cgit.ni.r/stockholm"
- "http://cgit.prism.r/stockholm"
+ "http://cgit.orange.r/stockholm"
];
};
};
diff --git a/krebs/2configs/ircd.nix b/krebs/2configs/ircd.nix
index 5435ea166..c56883d3e 100644
--- a/krebs/2configs/ircd.nix
+++ b/krebs/2configs/ircd.nix
@@ -38,6 +38,8 @@
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 39039cc11..0a5031415 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -51,6 +51,45 @@ let
};
};
+ bing = {
+ pattern = "!bing (.*)$";
+ activate = "match";
+ arguments = [1];
+ timeoutSec = 1337;
+ command = {
+ filename = pkgs.writeDash "bing" ''
+ set -efu
+ report_error() {
+ printf '%s' "$*" |
+ curl -Ss http://p.r --data-binary @- |
+ tail -1 |
+ echo "error $(cat)"
+ exit 0
+ }
+ export PATH=${makeBinPath [
+ pkgs.coreutils
+ pkgs.curl
+ pkgs.jq
+ ]}
+ response=$(printf '%s' "$*" |
+ curl -SsG http://bing-gpt.r/api/chat --data-urlencode 'prompt@-'
+ )
+ if [ "$?" -ne 0 ]; then
+ report_error "$response"
+ else
+ if ! text=$(printf '%s' "$response" | jq -er '.item.messages[1].text'); then
+ echo "$_from: $(report_error "$response")"
+ exit 0
+ fi
+ printf '%s' "$text" | echo "$_from: $(cat)"
+
+ printf '%s' "$response" |
+ jq -r '[.item.messages[1].sourceAttributions[].seeMoreUrl] | to_entries[] | "[\(.key + 1)]: \(.value)"'
+ fi
+ '';
+ };
+ };
+
confuse = {
pattern = "!confuse (.*)$";
activate = "match";
@@ -322,6 +361,7 @@ let
}
bedger-add
bedger-balance
+ bing
hooks.sed
interrogate
say
diff --git a/krebs/2configs/repo-sync.nix b/krebs/2configs/repo-sync.nix
index e2be477fd..9f129d81c 100644
--- a/krebs/2configs/repo-sync.nix
+++ b/krebs/2configs/repo-sync.nix
@@ -22,7 +22,6 @@ let
post-receive = pkgs.git-hooks.irc-announce {
channel = "#xxx";
refs = [
- "refs/heads/master"
"refs/heads/newest"
"refs/tags/*"
];
@@ -37,7 +36,6 @@ let
{
user = with config.krebs.users; [
config.krebs.users."${config.networking.hostName}-repo-sync"
- jeschli
lass
makefu
tv
@@ -50,7 +48,7 @@ let
konsens-user
];
repo = [ repo ];
- perm = push ''refs/heads/master'' [ create merge ];
+ perm = push "refs/heads/common" [ create merge ];
}
{
user = attrValues config.krebs.users;
@@ -61,31 +59,18 @@ let
repos."${name}" = repo;
};
- sync-retiolum = {
+ sync-repo = {
name,
+ remotes,
desc ? "mirror for ${name}",
section ? "mirror"
}:
{
krebs.repo-sync.repos.${name} = {
- branches = {
- lassulus = {
- origin.url = "http://cgit.lassul.us/${name}";
- mirror.url = "${mirror}${name}";
- };
- makefu = {
- origin.url = "http://cgit.gum/${name}";
- mirror.url = "${mirror}${name}";
- };
- nin = {
- origin.url = "http://cgit.onondaga.r/${name}";
- mirror.url = "${mirror}${name}";
- };
- tv = {
- origin.url = "http://cgit.ni.r/${name}";
- mirror.url = "${mirror}${name}";
- };
- };
+ branches = (lib.mapAttrs' (user: url: lib.nameValuePair user {
+ origin.url = url;
+ mirror.url = "${mirror}${name}";
+ }) remotes);
latest = {
url = "${mirror}${name}";
ref = "heads/newest";
@@ -94,24 +79,6 @@ let
krebs.git = defineRepo { inherit name desc section; };
};
- sync-remote = {
- name,
- url,
- desc ? "mirror for ${name}",
- section ? "mirror"
- }:
- {
- krebs.repo-sync.repos.${name} = {
- branches = {
- remote = {
- origin.url = url;
- mirror.url = "${mirror}${name}";
- };
- };
- };
- krebs.git = defineRepo { inherit name desc section; };
- };
-
in {
krebs.git = {
enable = true;
@@ -126,7 +93,6 @@ in {
krebs.konsens = {
enable = true;
repos = {
- krops = { branchesToCheck = [ "lassulus" "tv" ]; };
stockholm = {};
};
};
@@ -137,52 +103,20 @@ in {
};
imports = [
- (sync-retiolum { name = "the_playlist"; desc = "Good Music collection + tools"; section = "art"; })
-
- (sync-retiolum { name = "stockholm"; desc = "take all computers hostage, they love it"; section = "configuration"; })
-
- (sync-retiolum { name = "cholerab"; desc = "krebs thesauron & enterprise-patterns"; section = "documentation"; })
-
- (sync-retiolum { name = "buildbot-classic"; desc = "fork of buildbot"; section = "software"; })
- (sync-retiolum { name = "disko"; desc = "take a description of your disk layout and produce a format script"; section = "software"; })
- (sync-retiolum { name = "news"; desc = "take a rss feed and a timeout and print it to stdout"; section = "software"; })
- (sync-retiolum { name = "krops"; desc = "krebs ops"; section = "software"; })
- (sync-retiolum { name = "go"; desc = "url shortener"; section = "software"; })
- (sync-retiolum { name = "much"; desc = "curses email client"; section = "software"; })
- (sync-retiolum { name = "newsbot-js"; desc = "irc rss/atom bot"; section = "software"; })
- (sync-retiolum { name = "nix-writers"; desc = "high level writers for nix"; section = "software"; })
-
- (sync-retiolum { name = "cac-api"; desc = "CloudAtCost API command line interface"; section = "miscellaneous"; })
- (sync-retiolum { name = "dic"; desc = "dict.leo.org command line interface"; section = "miscellaneous"; })
- (sync-retiolum { name = "get"; section = "miscellaneous"; })
- (sync-retiolum { name = "hstool"; desc = "Haskell Development Environment ^_^"; section = "miscellaneous"; })
- (sync-retiolum { name = "htgen"; desc = "toy HTTP server"; section = "miscellaneous"; })
- (sync-retiolum { name = "kirk"; desc = "IRC tools"; section = "miscellaneous"; })
- (sync-retiolum { name = "load-env"; section = "miscellaneous"; })
- (sync-retiolum { name = "loldns"; desc = "toy DNS server"; section = "miscellaneous"; })
- (sync-retiolum { name = "netcup"; desc = "netcup command line interface"; section = "miscellaneous"; })
- (sync-retiolum { name = "populate"; desc = "source code installer"; section = "miscellaneous"; })
- (sync-retiolum { name = "q"; section = "miscellaneous"; })
- (sync-retiolum { name = "regfish"; section = "miscellaneous"; })
- (sync-retiolum { name = "soundcloud"; desc = "SoundCloud command line interface"; section = "miscellaneous"; })
-
- (sync-retiolum { name = "blessings"; section = "Haskell libraries"; })
- (sync-retiolum { name = "mime"; section = "Haskell libraries"; })
- (sync-retiolum { name = "quipper"; section = "Haskell libraries"; })
- (sync-retiolum { name = "scanner"; section = "Haskell libraries"; })
- (sync-retiolum { name = "wai-middleware-time"; section = "Haskell libraries"; })
- (sync-retiolum { name = "web-routes-wai-custom"; section = "Haskell libraries"; })
- (sync-retiolum { name = "xintmap"; section = "Haskell libraries"; })
- (sync-retiolum { name = "xmonad-stockholm"; desc = "krebs xmonad modules"; section = "Haskell libraries"; })
-
- (sync-remote { name = "array"; url = "https://github.com/makefu/array"; })
- (sync-remote { name = "email-header"; url = "https://github.com/4z3/email-header"; })
- (sync-remote { name = "mycube-flask"; url = "https://github.com/makefu/mycube-flask"; })
- (sync-remote { name = "reaktor-titlebot"; url = "https://github.com/makefu/reaktor-titlebot"; })
- (sync-remote { name = "repo-sync"; url = "https://github.com/makefu/repo-sync"; })
- (sync-remote { name = "skytraq-datalogger"; url = "https://github.com/makefu/skytraq-datalogger"; })
- (sync-remote { name = "realwallpaper"; url = "https://github.com/lassulus/realwallpaper"; })
- (sync-remote { name = "painload"; url = "https://github.com/krebs/painload"; })
- (sync-remote { name = "nixos-wiki"; url = "https://github.com/Mic92/nixos-wiki.wiki.git"; })
+ (sync-repo {
+ name = "stockholm";
+ desc = "take all computers hostage, they love it";
+ section = "configuration";
+ remotes = {
+ makefu = "http://cgit.gum.r/stockholm";
+ tv = "http://cgit.ni.r/stockholm";
+ lassulus = "http://cgit.orange.r/stockholm";
+ };
+ })
+ ({ krebs.git = defineRepo {
+ name = "krops";
+ desc = "deployment tools";
+ section = "deployment";
+ };})
];
}
diff --git a/krebs/3modules/exim-smarthost.nix b/krebs/3modules/exim-smarthost.nix
index b3cf212e4..62f15027a 100644
--- a/krebs/3modules/exim-smarthost.nix
+++ b/krebs/3modules/exim-smarthost.nix
@@ -39,6 +39,11 @@ let
default = [];
};
+ extraRouters = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ };
+
internet-aliases = mkOption {
type = types.listOf (types.submodule ({
options = {
@@ -50,6 +55,7 @@ let
};
};
}));
+ default = [];
};
local_domains = mkOption {
@@ -104,6 +110,7 @@ let
};
};
}));
+ default = [];
};
};
@@ -254,6 +261,8 @@ let
transport = home_maildir
cannot_route_message = Unknown user
+ ${lib.optionalString (cfg.extraRouters != null) cfg.extraRouters}
+
begin transports
retiolum_smtp:
diff --git a/krebs/3modules/github/known-hosts.nix b/krebs/3modules/github/known-hosts.nix
index c0d0b588a..3725ff2b8 100644
--- a/krebs/3modules/github/known-hosts.nix
+++ b/krebs/3modules/github/known-hosts.nix
@@ -6,6 +6,6 @@
# update known-hosts.json using ./update
lib.importJSON ./known-hosts.json
;
- publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==";
+ publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=";
};
}
diff --git a/krebs/3modules/konsens.nix b/krebs/3modules/konsens.nix
index 81486810b..439bcc7f4 100644
--- a/krebs/3modules/konsens.nix
+++ b/krebs/3modules/konsens.nix
@@ -39,10 +39,13 @@ let
};
imp = {
+ users.groups.konsens.gid = genid "konsens";
users.users.konsens = rec {
name = "konsens";
+ group = "konsens";
uid = genid name;
home = "/var/lib/konsens";
+ isSystemUser = true;
createHome = true;
};
diff --git a/krebs/5pkgs/haskell/brockman/default.nix b/krebs/5pkgs/haskell/brockman/default.nix
index 6a0c7f9df..a902b5fb1 100644
--- a/krebs/5pkgs/haskell/brockman/default.nix
+++ b/krebs/5pkgs/haskell/brockman/default.nix
@@ -7,12 +7,12 @@
}:
mkDerivation rec {
pname = "brockman";
- version = "4.0.4";
+ version = "5.1.1";
src = fetchFromGitHub {
owner = "kmein";
repo = "brockman";
rev = version;
- sha256 = "sha256-GOEEUjehFgMMf6cNpi0AP/Rz74sTDEcpKRbLD+6YEz0=";
+ sha256 = "sha256-5/2Xjh6YqV3+kkQr8CiXay9Dd8IAnL8D4dc8afnlki4=";
};
isLibrary = false;
isExecutable = true;
diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json
index 96c23d47c..6949ccefc 100644
--- a/krebs/nixpkgs-unstable.json
+++ b/krebs/nixpkgs-unstable.json
@@ -1,9 +1,9 @@
{
"url": "https://github.com/NixOS/nixpkgs",
- "rev": "2caf4ef5005ecc68141ecb4aac271079f7371c44",
- "date": "2023-01-30T22:55:03+01:00",
- "path": "/nix/store/mkif1y61ndjfi6fl2hzm7gmgqn40rchn-nixpkgs",
- "sha256": "1f8d0v4q687r4z3qpg54asglgi3v07ac75hzxzxl0qxjyh0asdz3",
+ "rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
+ "date": "2023-03-31T00:05:00+02:00",
+ "path": "/nix/store/0faiv51kalx5iq4a7y9535wlqvhsqqqb-nixpkgs",
+ "sha256": "1h38yml73lxirxx6ynzmk3h4fw6wlgz8z8105cj733s8cvjyp03h",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json
index 20b1237dc..67580f2ea 100644
--- a/krebs/nixpkgs.json
+++ b/krebs/nixpkgs.json
@@ -1,9 +1,9 @@
{
"url": "https://github.com/NixOS/nixpkgs",
- "rev": "0218941ea68b4c625533bead7bbb94ccce52dceb",
- "date": "2023-01-31T16:39:44+08:00",
- "path": "/nix/store/82grl4czg5pgacsa93nqssf5m7qrmmna-nixpkgs",
- "sha256": "0vwszpqs1x9sgnabvj3413mvcrj7k2ix4wv4hfvw6nmp6k4z6ic1",
+ "rev": "884e3b68be02ff9d61a042bc9bd9dd2a358f95da",
+ "date": "2023-04-01T09:31:50+02:00",
+ "path": "/nix/store/92sykpq1h25i4wzlp6k7prdbfnz6dg3k-nixpkgs",
+ "sha256": "1jgmanzmgbn9lxp0zc55lj1ml09zrkkwb00axx2iii06mbbv6991",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,