RIP specialArgs.lib

This commit is contained in:
tv 2016-02-14 16:43:44 +01:00
parent 9f16d7ea71
commit 673853e092
119 changed files with 171 additions and 183 deletions

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
ReaktorConfig = pkgs.writeText "config.py" ''
@ -16,7 +16,7 @@ let
out = {
options.krebs.Reaktor = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }:
with lib;
with config.krebs.lib;
let
acng-config = pkgs.writeTextFile {
name = "acng-configuration";
@ -151,5 +151,5 @@ let
in
{
options.krebs.apt-cacher-ng = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
}

View File

@ -1,9 +1,9 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
out = {
options.krebs.backup = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
cfg = config.krebs.backup;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
gunicorn = pkgs.pythonPackages.gunicorn;
bepasty = pkgs.pythonPackages.bepasty-server;
@ -10,8 +10,8 @@ let
out = {
options.krebs.bepasty = api;
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.serveNginx nginx-imp)
config = lib.mkIf cfg.enable (lib.mkMerge [
(lib.mkIf cfg.serveNginx nginx-imp)
imp
]);
};

View File

@ -1,6 +1,6 @@
{ config, lib, ... }:
with lib;
with config.krebs.lib;
let
out = {

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }:
with lib;
with config.krebs.lib;
let
buildbot = pkgs.buildbot;
buildbot-master-config = pkgs.writeText "buildbot-master.cfg" ''
@ -381,5 +381,5 @@ let
in
{
options.krebs.buildbot.master = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
}

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, ... }:
with lib;
with config.krebs.lib;
let
buildbot-slave-init = pkgs.writeText "buildbot-slave.tac" ''
import os
@ -182,5 +182,5 @@ let
in
{
options.krebs.buildbot.slave = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
}

View File

@ -1,13 +1,13 @@
{ config, pkgs, lib, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.current;
out = {
options.krebs.current = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,6 +1,6 @@
{ config, lib, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs;
@ -33,7 +33,7 @@ let
./urlwatch.nix
];
options.krebs = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {
@ -84,13 +84,13 @@ let
};
};
imp = mkMerge [
{ krebs = import ./lass { inherit lib; }; }
{ krebs = import ./makefu { inherit lib; }; }
{ krebs = import ./miefda { inherit lib; }; }
{ krebs = import ./mv { inherit lib; }; }
{ krebs = import ./shared { inherit lib; }; }
{ krebs = import ./tv { inherit lib; }; }
imp = lib.mkMerge [
{ krebs = import ./lass { inherit config lib; }; }
{ krebs = import ./makefu { inherit config lib; }; }
{ krebs = import ./miefda { inherit config lib; }; }
{ krebs = import ./mv { inherit config lib; }; }
{ krebs = import ./shared { inherit config lib; }; }
{ krebs = import ./tv { inherit config lib; }; }
{
krebs.dns.providers = {
de.krebsco = "zones";

View File

@ -1,12 +1,12 @@
{ config, pkgs, lib, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.exim-retiolum;
out = {
options.krebs.exim-retiolum = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,13 +1,12 @@
{ config, pkgs, lib, ... }:
with builtins;
with lib;
with config.krebs.lib;
let
cfg = config.krebs.exim-smarthost;
out = {
options.krebs.exim-smarthost = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,13 +1,13 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.fetchWallpaper;
out = {
options.krebs.fetchWallpaper = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, pkgs, ... }:
# TODO unify logging of shell scripts to user and journal
# TODO move all scripts to ${etcDir}, so ControlMaster connections
@ -6,13 +6,13 @@
# TODO when authorized_keys changes, then restart ssh
# (or kill already connected users somehow)
with lib;
with config.krebs.lib;
let
cfg = config.krebs.git;
out = {
options.krebs.git = api;
config = mkIf cfg.enable (mkMerge [
config = with lib; mkIf cfg.enable (mkMerge [
(mkIf cfg.cgit cgit-imp)
git-imp
]);
@ -86,7 +86,7 @@ let
singleton {
user = [ config.krebs.users.tv ];
repo = [ testing ]; # see literal example of repos
perm = push "refs/*" (with lib.git; [
perm = push "refs/*" (with config.krebs.lib.git; [
non-fast-forward create delete merge
]);
}

View File

@ -1,12 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.github-hosts-sync;
out = {
options.krebs.github-hosts-sync = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,13 +1,13 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.go;
out = {
options.krebs.go = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,6 +1,6 @@
{ lib, ... }:
{ config, lib, ... }:
with lib;
with config.krebs.lib;
{
hosts = {

View File

@ -1,6 +1,6 @@
{ lib, ... }:
{ config, lib, ... }:
with lib;
with config.krebs.lib;
{
hosts = {

View File

@ -1,6 +1,6 @@
{ lib, ... }:
{ config, lib, ... }:
with lib;
with config.krebs.lib;
{
hosts = {

View File

@ -1,6 +1,6 @@
{ lib, ... }:
{ config, ... }:
with lib;
with config.krebs.lib;
{
hosts = {

View File

@ -1,13 +1,12 @@
{ config, pkgs, lib, ... }:
{ config, lib, pkgs, ... }:
with builtins;
with lib;
with config.krebs.lib;
let
cfg = config.krebs.nginx;
out = {
options.krebs.nginx = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,11 +1,11 @@
{ config, pkgs, lib, ... }:
with lib;
{ config, lib, pkgs, ... }:
with config.krebs.lib;
let
cfg = config.krebs.nixpkgs;
out = {
options.krebs.nixpkgs = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {
@ -37,7 +37,7 @@ let
};
};
imp = mkIf (cfg.allowUnfreePredicate != null) {
imp = lib.mkIf (cfg.allowUnfreePredicate != null) {
nixpkgs.config.allowUnfreePredicate = cfg.allowUnfreePredicate;
};
in out

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.per-user;

View File

@ -1,12 +1,12 @@
arg@{ config, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.realwallpaper;
out = {
options.krebs.realwallpaper = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,12 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.retiolum-bootstrap;
out = {
options.krebs.retiolum-bootstrap = api;
config = mkIf cfg.enable imp ;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,11 +1,11 @@
{ config, pkgs, lib, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.retiolum;
out = {
options.krebs.retiolum = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.setuid;

View File

@ -1,9 +1,8 @@
{ lib, ... }:
with lib;
{ config, ... }:
with config.krebs.lib;
let
testHosts = lib.genAttrs [
testHosts = genAttrs [
"test-arch"
"test-centos6"
"test-centos7"

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.krebs.tinc_graphs;
internal_dir = "${cfg.workingDir}/internal";
@ -8,7 +8,7 @@ let
out = {
options.krebs.tinc_graphs = api;
config = mkIf cfg.enable imp ;
config = lib.mkIf cfg.enable imp ;
};
api = {

View File

@ -1,6 +1,6 @@
{ lib, ... }:
{ config, ... }:
with lib;
with config.krebs.lib;
{
dns.providers = {

View File

@ -5,14 +5,14 @@
# cache = url: "${cfg.dataDir}/.urlwatch/cache/${hashString "sha1" url}"
# TODO hooks.py
with lib;
with config.krebs.lib;
let
cfg = config.krebs.urlwatch;
# TODO assert sendmail's existence
out = {
options.krebs.urlwatch = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,5 +1,5 @@
{ lib, pkgs, ... }:
with lib;
{ config, lib, pkgs, ... }:
with config.krebs.lib;
rec {
execve = name: { filename, argv ? null, envp ? {}, destination ? "" }: let
in writeC name { inherit destination; } ''

View File

@ -1,5 +1,5 @@
{ lib, pkgs, ... }@args:
with lib;
{ config, lib, pkgs, ... }@args:
with config.krebs.lib;
{
nixpkgs.config.packageOverrides = pkgs: {
haskellPackages = pkgs.haskellPackages.override {

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
imports = [
../2configs/vim.nix

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
rpc-password = import <secrets/transmission-pw.nix>;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
createStaticPage = domain:

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
environment.systemPackages = [
pkgs.go

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
services.teamviewer.enable = true;
}

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
pkgs.writeText "Xresources" ''
URxvt*scrollBar: false

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }@args:
with lib;
with config.krebs.lib;
let
# TODO krebs.build.user

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.services.xserver;

View File

@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }:
with builtins;
with lib;
with config.krebs.lib;
let
cfg = config.lass.dnsmasq;

View File

@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }:
with builtins;
with lib;
with config.krebs.lib;
let
cfg = config.lass.newsbot-js;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.lass.owncloud;

View File

@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }:
with builtins;
with lib;
with config.krebs.lib;
let
cfg = config.lass.per-user;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.lass.staticPage;

View File

@ -3,8 +3,7 @@
let
in
with builtins;
with lib;
with config.krebs.lib;
{
options = {

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.lass.wordpress;

View File

@ -6,8 +6,7 @@
#
#
with builtins;
with lib;
with config.krebs.lib;
let

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
external-ip = head config.krebs.build.host.nets.internet.addrs4;
internal-ip = head config.krebs.build.host.nets.retiolum.addrs4;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
external-ip = head config.krebs.build.host.nets.internet.addrs4;

View File

@ -1,5 +1,5 @@
{ config, lib, ... }:
with lib;
with config.krebs.lib;
let
startAt = "0,6,12,18:00";
defaultBackupServer = config.krebs.hosts.omo;

View File

@ -21,7 +21,7 @@
# URxvt.visualBell: false
# URxvt.font : xft:Terminus
with lib;
with config.krebs.lib;
let
mainUser = config.krebs.build.user.name;
awesomecfg = pkgs.awesomecfg.full;

View File

@ -10,7 +10,7 @@
# wildcard.krebsco.de.key
# bepasty-secret.nix <- contains single string
with lib;
with config.krebs.lib;
let
sec = toString <secrets>;
# secKey is nothing worth protecting on a local machine

View File

@ -2,7 +2,7 @@
# graphite-web on port 8080
# carbon cache on port 2003 (tcp/udp)
with lib;
with config.krebs.lib;
let
connect-time-cfg = with pkgs; writeText "collectd-connect-time.cfg" ''
LoadPlugin python

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
system.stateVersion = "15.09";

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
krebs.exim-retiolum.enable = true;
environment.systemPackages = with pkgs; [

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
# vda1 ext4 (label nixos) -> only root partition
with lib;
with config.krebs.lib;
{
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;

View File

@ -8,7 +8,7 @@
# / (main-root)
# /home (main-home)
with lib;
with config.krebs.lib;
{
imports = [

View File

@ -3,7 +3,7 @@
# sda: bootloader grub2
# sda1: boot ext4 (label nixboot)
# sda2: cryptoluks -> ext4
with lib;
with config.krebs.lib;
{
boot = {
loader.grub.enable = true;

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
# vda1 ext4 (label nixos) -> only root partition
with lib;
with config.krebs.lib;
{
imports = [
./single-partition-ext4.nix

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
# TODO: remove tv lib :)
with lib;
with config.krebs.lib;
let
repos = priv-repos // krebs-repos ;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
# TODO: remove tv lib :)
with lib;
with config.krebs.lib;
let
repos = priv-repos // krebs-repos // connector-repos ;

View File

@ -2,7 +2,7 @@
# graphite-web on port 8080
# carbon cache on port 2003 (tcp/udp)
with lib;
with config.krebs.lib;
{
imports = [ ];

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
imports = [ ./tp-x2x0.nix ];

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
imports = [ ./tp-x2x0.nix ];

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
# TODO: put this somewhere else
networking.wireless.enable = true;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
environment.systemPackages = with pkgs; [
msmtp

View File

@ -5,7 +5,7 @@
# not fit into base-gui
# TODO split generic desktop stuff and laptop-specifics like lidswitching
with lib;
with config.krebs.lib;
{
imports = [
./base-gui.nix

View File

@ -1,6 +1,6 @@
{config, lib, ...}:
with lib;
with config.krebs.lib;
let
sec = toString <secrets>;
ssl_cert = "${sec}/wildcard.krebsco.de.crt";

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
sec = toString <secrets>;
ssl_cert = "${sec}/wildcard.krebsco.de.crt";

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
hostname = config.krebs.build.host.name;
user = config.services.nginx.user;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
sec = toString <secrets>;
ssl_cert = "${sec}/wildcard.krebsco.de.crt";

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
hostname = config.krebs.build.host.name;
external-ip = head config.krebs.build.host.nets.internet.addrs4;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
hostname = config.krebs.build.host.name;
# TODO local-ip from the nets config

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
krebs.retiolum = {
enable = true;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
##
with lib;
with config.krebs.lib;
let
mainUser = config.krebs.build.user.name;
in

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
# returns dirname without / , used as disk name

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
# TODO: currently it is only netzclub

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
#networking.wicd.enable = true;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
krebs.retiolum = {
enable = true;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
hardware.enableAllFirmware = true;
nixpkgs.config.allowUnfree = true;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
services.xserver = {

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
krebs.build.host = config.krebs.hosts.stro;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
HOME = getEnv "HOME";
in

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let

View File

@ -1,6 +1,6 @@
{ lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
out = {
environment.systemPackages = [

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
pkgs.writeText "Xresources" ''
!URxvt*background: #050505

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }@args:
with lib;
with config.krebs.lib;
let
# TODO krebs.build.user

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
cfg = config.services.xserver;

View File

@ -1,13 +1,12 @@
{ config, lib, pkgs, ... }:
with builtins;
with lib;
with config.krebs.lib;
let
cfg = config.tv.iptables;
out = {
options.tv.iptables = api;
config = mkIf cfg.enable imp;
config = lib.mkIf cfg.enable imp;
};
api = {

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
krebs.enable = true;
krebs.retiolum = {

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
rules = with git; singleton {
user = [ git-sync ];

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
# TODO: krebs.collectd.plugins
with lib;
with config.krebs.lib;
let
connect-time-cfg = with pkgs; writeText "collectd-connect-time.conf" ''
LoadPlugin python

View File

@ -5,7 +5,7 @@
# TODO: krebs.graphite.minimal.enable
# TODO: configure firewall
with lib;
with config.krebs.lib;
{
imports = [ ];

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
krebs.build.host = config.krebs.hosts.cd;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
# TODO merge with lass

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
{
krebs.build.host = config.krebs.hosts.nomic;

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
with config.krebs.lib;
let
# TODO merge with lass

Some files were not shown because too many files have changed in this diff Show More