Merge branch 'master' of prism.r:stockholm into staging/jeschli
This commit is contained in:
commit
4c0d0f64ed
|
@ -503,6 +503,7 @@ with import <stockholm/lib>;
|
|||
# ip6.addr = "42:5a02:2c30:c1b1:3f2e:7c19:2496:a732";
|
||||
aliases = [
|
||||
"wbob.r"
|
||||
"hydra.wbob.r"
|
||||
];
|
||||
tinc.pubkey = ''
|
||||
-----BEGIN RSA PUBLIC KEY-----
|
||||
|
|
|
@ -21,13 +21,21 @@ let
|
|||
'';
|
||||
|
||||
mailboxes = {
|
||||
wireguard = [ "to:wireguard@lists.zx2c4" ];
|
||||
c-base = [ "to:c-base.org" ];
|
||||
security = [ "to:seclists.org" "to:security" "to:bugtraq" ];
|
||||
dezentrale = [ "to:dezentrale.space" ];
|
||||
kaosstuff = [ "to:gearbest@lassul.us" "to:banggood@lassul.us" ];
|
||||
nix-devel = [ "to:nix-devel@googlegroups.com" ];
|
||||
patreon = [ "to:patreon@lassul.us" ];
|
||||
security = [ "to:seclists.org" "to:security" "to:bugtraq" ];
|
||||
shack = [ "to:shackspace.de" ];
|
||||
wireguard = [ "to:wireguard@lists.zx2c4" ];
|
||||
};
|
||||
|
||||
tag-mails = pkgs.writeDashBin "nm-init-tag" ''
|
||||
${pkgs.notmuch}/bin/notmuch new
|
||||
${concatMapStringsSep "\n" (i: ''${pkgs.notmuch}/bin/notmuch tag -inbox +${i.name} -- tag:inbox ${concatMapStringsSep " or " (f: "${f}") i.value}'') (mapAttrsToList nameValuePair mailboxes)}
|
||||
'';
|
||||
|
||||
muttrc = pkgs.writeText "muttrc" ''
|
||||
# gpg
|
||||
source ${pkgs.neomutt}/share/doc/mutt/samples/gpg.rc
|
||||
|
@ -80,10 +88,9 @@ let
|
|||
# V
|
||||
''} %r |"
|
||||
|
||||
virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox ${concatMapStringsSep " " (f: "and NOT ${f}") (flatten (attrValues mailboxes))}"
|
||||
virtual-mailboxes "INBOX" "notmuch://?query=tag:inbox"
|
||||
virtual-mailboxes "Unread" "notmuch://?query=tag:unread"
|
||||
${concatMapStringsSep "\n" (i: ''${" "}virtual-mailboxes "${i.name}" "notmuch://?query=${concatMapStringsSep " or " (f: "${f}") i.value}"'') (mapAttrsToList nameValuePair mailboxes)}
|
||||
virtual-mailboxes "BOX" "notmuch://?query=${concatMapStringsSep " and " (f: "NOT ${f}") (flatten (attrValues mailboxes))}"
|
||||
${concatMapStringsSep "\n" (i: ''${" "}virtual-mailboxes "${i.name}" "notmuch://?query=tag:${i.name}"'') (mapAttrsToList nameValuePair mailboxes)}
|
||||
virtual-mailboxes "TODO" "notmuch://?query=tag:TODO"
|
||||
virtual-mailboxes "Starred" "notmuch://?query=tag:*"
|
||||
virtual-mailboxes "Archive" "notmuch://?query=tag:archive"
|
||||
|
@ -163,5 +170,6 @@ in {
|
|||
mutt
|
||||
pkgs.much
|
||||
pkgs.notmuch
|
||||
tag-mails
|
||||
];
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ in {
|
|||
# <stockholm/makefu/2configs/vncserver.nix>
|
||||
|
||||
# Services
|
||||
<stockholm/makefu/2configs/remote-build/slave.nix>
|
||||
<stockholm/makefu/2configs/hydra/stockholm.nix>
|
||||
|
||||
<stockholm/makefu/2configs/share/wbob.nix>
|
||||
(let
|
||||
musicDirectory = "/data/music";
|
||||
|
@ -83,6 +84,9 @@ in {
|
|||
load-module module-filter-apply
|
||||
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
|
||||
load-module module-switch-on-connect
|
||||
# may be required for "system-wide" pulse to connect to bluetooth
|
||||
#module-bluez5-device
|
||||
#module-bluez5-discover
|
||||
'';
|
||||
};
|
||||
# connect via https://nixos.wiki/wiki/Bluetooth#Using_Bluetooth_headsets_with_PulseAudio
|
||||
|
|
|
@ -28,6 +28,7 @@ let
|
|||
init-stockholm = {
|
||||
cgit.desc = "Init stuff for stockholm";
|
||||
};
|
||||
hydra-stockholm = { };
|
||||
};
|
||||
|
||||
priv-repos = mapAttrs make-priv-repo {
|
||||
|
|
34
makefu/2configs/hydra/stockholm.nix
Normal file
34
makefu/2configs/hydra/stockholm.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
# iterative:
|
||||
# $ hydra-create-user krebs --password derp --role admin
|
||||
# curl 'http://hydra.wbob.r/project/.new' -X PUT -H 'Host: hydra.wbob.r' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'X-Requested-With: XMLHttpRequest' -H 'Cookie: redirect_to=%252F; hydra_session=abcdefghijklmnopqrstuvwxyz' -H 'Connection: keep-alive' --data 'enabled=on&visible=on&name=stockholm&displayname=Stockholm&description=make+all+systems+into+1systems&homepage=https%3A%2F%2Fkrebsco.de&owner=krebs&declfile=spec.json&decltype=git&declvalue=http%3A%2F%2Fcgit.euer.krebsco.de%2Fhydra-stockholm'
|
||||
|
||||
{
|
||||
|
||||
# TODO postgres backup
|
||||
services.postgresql.enable = true;
|
||||
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
hydraURL = "http://hydra.wbob.r"; # externally visible URL
|
||||
notificationSender = "hydra@wbob.r";
|
||||
# you will probably also want, otherwise *everything* will be built from scratch
|
||||
useSubstitutes = true;
|
||||
port = 3030;
|
||||
buildMachinesFiles = [];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."hydra.wbob.r" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3030/";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,7 +3,7 @@ self: super: let
|
|||
|
||||
# This callPackage will try to detect obsolete overrides.
|
||||
callPackage = path: args: let
|
||||
override = super.callPackage path args;
|
||||
override = super.callPackage path args;
|
||||
upstream = optionalAttrs (override ? "name")
|
||||
(super.${(parseDrvName override.name).name} or {});
|
||||
in if upstream ? "name" &&
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
{ stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "programs-db";
|
||||
src = builtins.fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz ;
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
installPhase = ''
|
||||
cp programs.sqlite $out
|
||||
'';
|
||||
|
||||
}
|
Loading…
Reference in a new issue