diff options
Diffstat (limited to 'lass/2configs')
-rw-r--r-- | lass/2configs/exim-smarthost.nix | 2 | ||||
-rw-r--r-- | lass/2configs/git.nix | 63 | ||||
-rw-r--r-- | lass/2configs/mail.nix | 11 | ||||
-rw-r--r-- | lass/2configs/reaktor-coders.nix | 6 | ||||
-rw-r--r-- | lass/2configs/repo-sync.nix | 142 | ||||
-rw-r--r-- | lass/2configs/websites/lassulus.nix | 4 |
6 files changed, 63 insertions, 165 deletions
diff --git a/lass/2configs/exim-smarthost.nix b/lass/2configs/exim-smarthost.nix index 191e25831..846000a3a 100644 --- a/lass/2configs/exim-smarthost.nix +++ b/lass/2configs/exim-smarthost.nix @@ -87,6 +87,8 @@ with import <stockholm/lib>; { from = "hackbeach@lassul.us"; to = lass.mail; } { from = "transferwise@lassul.us"; to = lass.mail; } { from = "cis@lassul.us"; to = lass.mail; } + { from = "afra@lassul.us"; to = lass.mail; } + { from = "ksp@lassul.us"; to = lass.mail; } ]; system-aliases = [ { from = "mailer-daemon"; to = "postmaster"; } diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 829e62269..300637ff8 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -23,6 +23,10 @@ let ]; }; + cgit-clear-cache = pkgs.cgit-clear-cache.override { + inherit (config.krebs.git.cgit.settings) cache-root; + }; + repos = public-repos // optionalAttrs config.krebs.build.host.secure restricted-repos; @@ -30,6 +34,10 @@ let rules = concatMap make-rules (attrValues repos); public-repos = mapAttrs make-public-repo { + buildbot-classic = { + cgit.desc = "fork of buildbot"; + cgit.section = "software"; + }; cholerab = { cgit.desc = "krebs thesauron & enterprise-patterns"; cgit.section = "documentation"; @@ -38,6 +46,10 @@ let cgit.desc = "take a description of your disk layout and produce a format script"; cgit.section = "software"; }; + krebspage = { + cgit.desc = "homepage of krebs"; + cgit.section = "configuration"; + }; news = { cgit.desc = "take a rss feed and a timeout and print it to stdout"; cgit.section = "software"; @@ -96,15 +108,20 @@ let inherit cgit collaborators name; public = true; hooks = { - post-receive = pkgs.git-hooks.irc-announce { - # TODO make nick = config.krebs.build.host.name the default - nick = config.krebs.build.host.name; - channel = "#xxx"; - server = "irc.r"; - verbose = config.krebs.build.host.name == "prism"; - # TODO define branches in some kind of option per repo - branches = [ "master" ]; - }; + post-receive = '' + ${pkgs.git-hooks.irc-announce { + # TODO make nick = config.krebs.build.host.name the default + nick = config.krebs.build.host.name; + channel = "#xxx"; + # TODO define refs in some kind of option per repo + refs = [ + "refs/heads/master" + ]; + server = "irc.r"; + verbose = config.krebs.build.host.name == "prism"; + }} + ${cgit-clear-cache}/bin/cgit-clear-cache + ''; }; }; @@ -116,16 +133,22 @@ let make-restricted-repo = name: { admins ? [], collaborators ? [], announce ? false, hooks ? {}, ... }: { inherit admins collaborators name; public = false; - hooks = optionalAttrs announce { - post-receive = pkgs.git-hooks.irc-announce { - # TODO make nick = config.krebs.build.host.name the default - nick = config.krebs.build.host.name; - channel = "#xxx"; - server = "irc.r"; - verbose = false; - # TODO define branches in some kind of option per repo - branches = [ "master" "staging*" ]; - }; + hooks = { + post-receive = '' + ${optionalString announce (pkgs.git-hooks.irc-announce { + # TODO make nick = config.krebs.build.host.name the default + nick = config.krebs.build.host.name; + channel = "#xxx"; + # TODO define refs in some kind of option per repo + refs = [ + "refs/heads/master" + "refs/heads/staging*" + ]; + server = "irc.r"; + verbose = false; + })} + ${cgit-clear-cache}/bin/cgit-clear-cache + ''; } // hooks; }; @@ -133,7 +156,7 @@ let with git // config.krebs.users; repo: singleton { - user = [ lass-mors lass-shodan lass-icarus lass-blue ]; + user = [ lass lass-mors lass-shodan lass-icarus lass-blue ]; repo = [ repo ]; perm = push "refs/*" [ non-fast-forward create delete merge ]; } ++ diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 2bb51b50a..9246abfed 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -176,6 +176,11 @@ let # top index bar in email view set pager_index_lines=7 + # top_index_bar toggle + macro pager ,@1 "<enter-command> set pager_index_lines=0; macro pager ] ,@2 'Toggle indexbar<Enter>" + macro pager ,@2 "<enter-command> set pager_index_lines=3; macro pager ] ,@3 'Toggle indexbar<Enter>" + macro pager ,@3 "<enter-command> set pager_index_lines=7; macro pager ] ,@1 'Toggle indexbar<Enter>" + macro pager ] ,@1 'Toggle indexbar # sidebar set sidebar_width = 20 @@ -186,9 +191,9 @@ let bind index <right> sidebar-next # got to next folder in sidebar bind index <space> sidebar-open # open selected folder from sidebar # sidebar toggle - macro index ,@) "<enter-command> set sidebar_visible=no; macro index ~ ,@( 'Toggle sidebar'<Enter>" - macro index ,@( "<enter-command> set sidebar_visible=yes; macro index ~ ,@) 'Toggle sidebar'<Enter>" - macro index ~ ,@( 'Toggle sidebar' # toggle the sidebar + macro index,pager ,@) "<enter-command> set sidebar_visible=no; macro index,pager [ ,@( 'Toggle sidebar'<Enter>" + macro index,pager ,@( "<enter-command> set sidebar_visible=yes; macro index,pager [ ,@) 'Toggle sidebar'<Enter>" + macro index,pager [ ,@( 'Toggle sidebar' # toggle the sidebar ''; mutt = pkgs.symlinkJoin { diff --git a/lass/2configs/reaktor-coders.nix b/lass/2configs/reaktor-coders.nix index 86877df7a..9365582b8 100644 --- a/lass/2configs/reaktor-coders.nix +++ b/lass/2configs/reaktor-coders.nix @@ -106,6 +106,12 @@ with import <stockholm/lib>; exec echo '¯\_(ツ)_/¯' ''; }) + (buildSimpleReaktorPlugin "flip" { + pattern = "^!flip$"; + script = pkgs.writeDash "shrug" '' + exec echo '(╯°□°)╯ ┻━┻' + ''; + }) ]; }; } diff --git a/lass/2configs/repo-sync.nix b/lass/2configs/repo-sync.nix deleted file mode 100644 index 6a07172fe..000000000 --- a/lass/2configs/repo-sync.nix +++ /dev/null @@ -1,142 +0,0 @@ -{ config, lib, pkgs, ... }: - -with import <stockholm/lib>; - -let - mirror = "git@${config.networking.hostName}:"; - - defineRepo = name: announce: let - repo = { - public = true; - name = mkDefault "${name}"; - cgit.desc = mkDefault "mirror for ${name}"; - cgit.section = mkDefault "mirror"; - hooks = mkIf announce (mkDefault { - post-receive = pkgs.git-hooks.irc-announce { - nick = config.networking.hostName; - verbose = false; - channel = "#xxx"; - server = "irc.r"; - branches = [ "newest" ]; - }; - }); - }; - in { - rules = with git; [ - { - user = with config.krebs.users; [ - config.krebs.users."${config.networking.hostName}-repo-sync" - lass - lass-mors - lass-shodan - ]; - repo = [ repo ]; - perm = push ''refs/*'' [ non-fast-forward create delete merge ]; - } - { - user = attrValues config.krebs.users; - repo = [ repo ]; - perm = fetch; - } - ]; - repos."${name}" = repo; - }; - - sync-retiolum = name: - { - krebs.repo-sync.repos.${name} = { - branches = { - makefu = { - origin.url = "http://cgit.gum/${name}"; - mirror.url = "${mirror}${name}"; - }; - tv = { - origin.url = "http://cgit.ni.r/${name}"; - mirror.url = "${mirror}${name}"; - }; - nin = { - origin.url = "http://cgit.onondaga.r/${name}"; - mirror.url = "${mirror}${name}"; - }; - lassulus = { - origin.url = "http://cgit.lassul.us/${name}"; - mirror.url = "${mirror}${name}"; - }; - makefu-staging = { - origin.url = "http://cgit.gum/${name}"; - origin.ref = "heads/staging"; - mirror.url = "${mirror}${name}"; - }; - tv-staging = { - origin.url = "http://cgit.ni.r/${name}"; - origin.ref = "heads/staging"; - mirror.url = "${mirror}${name}"; - }; - nin-staging = { - origin.url = "http://cgit.onondaga.r/${name}"; - origin.ref = "heads/staging"; - mirror.url = "${mirror}${name}"; - }; - }; - latest = { - url = "${mirror}${name}"; - ref = "heads/newest"; - }; - }; - krebs.git = defineRepo name (config.networking.hostName == "prism"); - }; - - sync-remote = name: url: - { - krebs.repo-sync.repos.${name} = { - branches = { - remote = { - origin.url = url; - mirror.url = "${mirror}${name}"; - }; - }; - }; - krebs.git = defineRepo name (config.networking.hostName == "prism"); - }; - - sync-remote-silent = name: url: - { - krebs.repo-sync.repos.${name} = { - branches = { - remote = { - origin.url = url; - mirror.url = "${mirror}${name}"; - }; - }; - }; - krebs.git = defineRepo name false; - }; - -in { - krebs.repo-sync = { - enable = true; - unitConfig.ConditionPathExists = "!/var/run/ppp0.pid"; - }; - imports = [ - (sync-remote "array" "https://github.com/makefu/array") - (sync-remote "email-header" "https://github.com/4z3/email-header") - (sync-remote "mycube-flask" "https://github.com/makefu/mycube-flask") - (sync-remote "reaktor-titlebot" "https://github.com/makefu/reaktor-titlebot") - (sync-remote "repo-sync" "https://github.com/makefu/repo-sync") - (sync-remote "skytraq-datalogger" "https://github.com/makefu/skytraq-datalogger") - (sync-remote "xintmap" "https://github.com/4z3/xintmap") - (sync-remote "realwallpaper" "https://github.com/lassulus/realwallpaper") - (sync-remote "lassulus-blog" "https://github.com/lassulus/lassulus-blog") - (sync-remote "painload" "https://github.com/krebs/painload") - (sync-remote "Reaktor" "https://github.com/krebs/Reaktor") - (sync-remote "nixos-wiki" "https://github.com/Mic92/nixos-wiki.wiki.git") - (sync-retiolum "go") - (sync-retiolum "much") - (sync-retiolum "newsbot-js") - (sync-retiolum "populate") - (sync-retiolum "stockholm") - (sync-retiolum "wai-middleware-time") - (sync-retiolum "xmonad-stockholm") - (sync-retiolum "nix-writers") - ]; -} diff --git a/lass/2configs/websites/lassulus.nix b/lass/2configs/websites/lassulus.nix index f60a66952..8f24fb212 100644 --- a/lass/2configs/websites/lassulus.nix +++ b/lass/2configs/websites/lassulus.nix @@ -82,6 +82,10 @@ in { c-base:$apr1$aQ6mYNR3$ho.aJ7icqSO.y.xKo3GQf0 ''}; ''; + locations."/krebspage".extraConfig = '' + default_type "text/html"; + alias ${pkgs.krebspage}/index.html; + ''; # TODO make this work! locations."= /ddate".extraConfig = let script = pkgs.writeBash "test" '' |