summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--jeschli/1systems/brauerei/config.nix2
-rw-r--r--krebs/2configs/buildbot-stockholm.nix6
-rw-r--r--krebs/2configs/ircd.nix2
-rw-r--r--krebs/3modules/airdcpp.nix (renamed from makefu/3modules/airdcpp.nix)88
-rw-r--r--krebs/3modules/charybdis.nix110
-rw-r--r--krebs/3modules/default.nix2
-rw-r--r--krebs/3modules/git.nix16
-rw-r--r--krebs/3modules/makefu/default.nix27
-rw-r--r--krebs/3modules/makefu/ssh/exco.pub1
-rw-r--r--krebs/3modules/makefu/ssh/makefu.android.pub1
-rw-r--r--krebs/3modules/makefu/ssh/makefu.bob.pub1
-rw-r--r--krebs/3modules/makefu/ssh/makefu.omo.pub1
-rw-r--r--krebs/3modules/makefu/ssh/makefu.remote-builder.pub1
-rw-r--r--krebs/3modules/makefu/ssh/makefu.tempx.pub1
-rw-r--r--krebs/3modules/makefu/ssh/makefu.tsp.pub1
-rw-r--r--krebs/3modules/makefu/ssh/makefu.vbob.pub1
-rw-r--r--krebs/3modules/makefu/ssh/makefu.x.pub1
-rw-r--r--krebs/3modules/makefu/ssh/ulrich.pub1
-rw-r--r--krebs/5pkgs/haskell/blessings.nix23
-rw-r--r--krebs/5pkgs/haskell/email-header.nix25
-rw-r--r--krebs/5pkgs/haskell/hyphenation.nix17
-rw-r--r--krebs/5pkgs/simple/Reaktor/default.nix4
-rw-r--r--krebs/5pkgs/simple/airdcpp-webclient/default.nix (renamed from makefu/5pkgs/airdcpp-webclient/default.nix)5
-rw-r--r--krebs/5pkgs/simple/buildbot-classic/default.nix2
-rw-r--r--krebs/5pkgs/simple/repo-sync/default.nix1
-rw-r--r--krebs/krops.nix5
-rw-r--r--krebs/nixpkgs.json6
-rw-r--r--lass/1systems/mors/config.nix2
-rw-r--r--lass/1systems/prism/config.nix10
-rw-r--r--lass/2configs/baseX.nix1
-rw-r--r--lass/2configs/exim-smarthost.nix1
-rw-r--r--lass/2configs/games.nix1
-rw-r--r--lass/2configs/git.nix4
-rw-r--r--lass/2configs/radio.nix5
-rw-r--r--lass/2configs/reaktor-coders.nix18
-rw-r--r--lass/2configs/vim.nix11
-rw-r--r--lass/5pkgs/custom/xmonad-lass/default.nix5
-rw-r--r--makefu/0tests/data/secrets/airdcpp-makefu.pw0
-rw-r--r--makefu/0tests/data/secrets/krebshub.pw0
-rw-r--r--makefu/1systems/nextgum/config.nix5
-rw-r--r--makefu/1systems/nextgum/hardware-config.nix13
-rw-r--r--makefu/2configs/dcpp/airdcpp.nix48
-rw-r--r--makefu/2configs/default.nix107
-rw-r--r--makefu/2configs/minimal.nix88
-rw-r--r--makefu/3modules/default.nix4
-rw-r--r--makefu/3modules/state.nix7
-rw-r--r--makefu/krops.nix5
m---------submodules/krops0
-rw-r--r--tv/1systems/mu/config.nix15
-rw-r--r--tv/1systems/querel/config.nix10
-rw-r--r--tv/1systems/xu/config.nix4
-rw-r--r--tv/2configs/backup.nix2
-rw-r--r--tv/2configs/bash/default.nix12
-rw-r--r--tv/2configs/gitrepos.nix53
-rw-r--r--tv/2configs/urlwatch.nix25
-rw-r--r--tv/2configs/xp-332.nix45
-rw-r--r--tv/2configs/xserver/default.nix27
-rw-r--r--tv/3modules/charybdis/default.nix2
-rw-r--r--tv/5pkgs/compat/18.03/pass-otp/default.nix (renamed from krebs/5pkgs/simple/pass-otp/default.nix)0
-rw-r--r--tv/5pkgs/compat/18.03/pass/default.nix (renamed from krebs/5pkgs/simple/pass/default.nix)0
-rw-r--r--tv/5pkgs/compat/18.03/pass/no-darwin-getopt.patch (renamed from krebs/5pkgs/simple/pass/no-darwin-getopt.patch)0
-rw-r--r--tv/5pkgs/compat/18.03/pass/rofi-pass.nix (renamed from krebs/5pkgs/simple/pass/rofi-pass.nix)0
-rw-r--r--tv/5pkgs/compat/18.03/pass/set-correct-program-name-for-sleep.patch (renamed from krebs/5pkgs/simple/pass/set-correct-program-name-for-sleep.patch)0
-rw-r--r--tv/5pkgs/compat/default.nix1
-rw-r--r--tv/5pkgs/default.nix12
-rw-r--r--tv/5pkgs/simple/utsushi.nix207
67 files changed, 819 insertions, 285 deletions
diff --git a/.gitmodules b/.gitmodules
index c96fec739..f35a9250d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "submodules/nix-writers"]
path = submodules/nix-writers
url = http://cgit.krebsco.de/nix-writers
+[submodule "submodules/krops"]
+ path = submodules/krops
+ url = https://cgit.krebsco.de/krops
diff --git a/jeschli/1systems/brauerei/config.nix b/jeschli/1systems/brauerei/config.nix
index e419e35be..98db60e4f 100644
--- a/jeschli/1systems/brauerei/config.nix
+++ b/jeschli/1systems/brauerei/config.nix
@@ -119,6 +119,8 @@
# Don't install feh into systemPackages
# refs <nixpkgs/nixos/modules/services/x11/desktop-managers>
desktopManager.session = lib.mkForce [];
+ displayManager.lightdm.enable = lib.mkForce false;
+ displayManager.job.execCmd = lib.mkForce "derp";
enable = true;
display = 11;
diff --git a/krebs/2configs/buildbot-stockholm.nix b/krebs/2configs/buildbot-stockholm.nix
index d10fb7203..5784f2cdc 100644
--- a/krebs/2configs/buildbot-stockholm.nix
+++ b/krebs/2configs/buildbot-stockholm.nix
@@ -22,6 +22,12 @@
"http://cgit.ni.r/disko"
"http://cgit.prism.r/disko"
];
+ krops.urls = [
+ "http://cgit.hotdog.r/krops"
+ "http://cgit.ni.r/krops"
+ "http://cgit.prism.r/krops"
+ "https://git.ingolf-wagner.de/krebs/krops.git"
+ ];
nix_writers.urls = [
"http://cgit.hotdog.r/nix-writers"
"http://cgit.ni.r/nix-writers"
diff --git a/krebs/2configs/ircd.nix b/krebs/2configs/ircd.nix
index 962dbf49c..65972aacc 100644
--- a/krebs/2configs/ircd.nix
+++ b/krebs/2configs/ircd.nix
@@ -5,7 +5,7 @@
6667 6669
];
- services.charybdis = {
+ krebs.charybdis = {
enable = true;
motd = ''
hello
diff --git a/makefu/3modules/airdcpp.nix b/krebs/3modules/airdcpp.nix
index 5250ee67a..1633840f7 100644
--- a/makefu/3modules/airdcpp.nix
+++ b/krebs/3modules/airdcpp.nix
@@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }:
with import <stockholm/lib>; #genid
let
- cfg = config.makefu.airdcpp;
+ cfg = config.krebs.airdcpp;
out = {
- options.makefu.airdcpp = api;
+ options.krebs.airdcpp = api;
config = lib.mkIf cfg.enable imp;
};
@@ -18,7 +18,7 @@ let
user = mkOption {
description = ''
- user which will run udpt. if kept default a new user will be created
+ user which will run airdcpp. if kept default a new user will be created
'';
type = str;
default = "airdcpp";
@@ -37,7 +37,54 @@ let
type = str;
default = "/var/lib/airdcpp";
};
+ hubs = mkOption {
+ type = attrsOf (submodule ( { config, ... }: {
+ options = {
+ Nick = mkOption {
+ description = ''
+ Nick Name for hub
+ '';
+ type = str;
+ default = cfg.Nick;
+ };
+ Password = mkOption {
+ description = ''
+ Password to be used
+
+ WARNING: will be stored in plain text in /nix/store
+ '';
+ type = str;
+ default = "";
+ apply = lib.removeSuffix "\n";
+ };
+ Server = mkOption {
+ description = ''
+ URL to the hub (must be provided)
+ '';
+ type = str;
+ };
+ AutoConnect = mkOption {
+ description = ''
+ automatically connect to the hub
+ '';
+ type = bool;
+ default = false;
+ };
+ };
+ }));
+ description = "hubs which should be configured via Favorites.xml,
+ Options are only used if no initial Favorites.xml file is provided and none exists";
+ default = {};
+ };
+ initialFavoritesConfigFile = mkOption {
+ description = ''
+ path inital Favorites.xml configuration if none exists
+ '';
+ type = nullOr path;
+ default = null;
+ };
dcpp = {
+ # entries in DCPlusPlus.xml
Nick = mkOption {
description = ''
Nick Name for connection
@@ -70,6 +117,11 @@ let
type = str;
default = "100";
};
+ DownloadDirectory = mkOption {
+ description = "Directory, where new files will be saved into";
+ type = str;
+ default = "${cfg.stateDir}/Download";
+ };
shares = mkOption {
default = {};
type = attrsOf (submodule ( { config, ... }: {
@@ -117,6 +169,7 @@ let
password = mkOption {
description = "password of user";
type = str;
+ apply = lib.removeSuffix "\n";
};
permissions = mkOption {
description = "user permissions";
@@ -133,11 +186,6 @@ let
genUsers = users: concatMapStringsSep "\n" (user:
''<WebUser Username="${user.name}" Password="${user.password}" LastLogin="0" Permissions="${user.permissions}"/>'' )
(mapAttrsToList (name: val: val // { inherit name; }) users);
- genShares = shares: concatMapStringsSep "\n" (share:
- ''<Directory Virtual="stockholm" Incoming="${
- if share.incoming then "1" else "0"
- }" LastRefreshTime="0">${share.path}</Directory>'' )
- (mapAttrsToList (name: val: val // { inherit name; }) shares);
webConfigFile = if (cfg.web.initialConfigFile == null) then builtins.trace "warning: airdcpp passwords are stored in plain text" pkgs.writeText "initial-config" ''
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<WebServer>
@@ -149,16 +197,34 @@ let
</WebUsers>
</WebServer>
'' else cfg.web.initialConfigFile;
+ genHubs = hubs: concatMapStringsSep "\n" (hub:
+ ''<Hub Name="${hub.name}" Connect="${
+ if hub.AutoConnect then "1" else "0"
+ }" Description="" Password="${hub.Password}" Server="${hub.Server}" ChatUserSplit="0" UserListState="1" HubFrameOrder="" HubFrameWidths="" HubFrameVisible="" Group="" Bottom="0" Top="0" Right="0" Left="0" Nick="${hub.Nick}"/>'' )
+ (mapAttrsToList (name: val: val // { inherit name; }) hubs);
+ favoritesConfigFile = if (cfg.initialFavoritesConfigFile == null) then
+ builtins.trace "warning: airdcpp hub passwords are stored in plain text" pkgs.writeText "initial-config" ''
+ <?xml version="1.0" encoding="utf-8" standalone="yes"?>
+ <Favorites>
+ <Hubs>
+ ${genHubs cfg.hubs}
+ </Hubs>
+ </Favorites>
+ '' else cfg.initialFavoritesConfigFile;
+ genShares = shares: concatMapStringsSep "\n" (share:
+ ''<Directory Virtual="${share.name}" Incoming="${
+ if share.incoming then "1" else "0"
+ }" LastRefreshTime="0">${share.path}</Directory>'' )
+ (mapAttrsToList (name: val: val // { inherit name; }) shares);
dcppConfigFile = if (cfg.dcpp.initialConfigFile == null) then pkgs.writeText "initial-config" ''
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<DCPlusPlus>
<Settings>
<Nick type="string">${cfg.dcpp.Nick}</Nick>
- <ConfigVersion type="string">${cfg.package.version}</ConfigVersion>
<InPort type="int">${toString cfg.dcpp.InPort}</InPort>
<UDPPort type="int">${toString cfg.dcpp.UDPPort}</UDPPort>
<TLSPort type="int">${toString cfg.dcpp.TLSPort}</TLSPort>
- <ConfigBuildNumber type="int">0</ConfigBuildNumber>
+ <DownloadDirectory type="string">${cfg.dcpp.DownloadDirectory}</DownloadDirectory>
<AutoDetectIncomingConnection type="int">0</AutoDetectIncomingConnection>
<NoIpOverride type="int">1</NoIpOverride>
<WizardRunNew type="int">0</WizardRunNew>
@@ -187,6 +253,8 @@ let
test -e $d || install -m700 -o${cfg.user} ${webConfigFile} $d
d=${cfg.stateDir}/DCPlusPlus.xml
test -e $d || install -m700 -o${cfg.user} ${dcppConfigFile} $d
+ d=${cfg.stateDir}/Favorites.xml
+ test -e $d || install -m700 -o${cfg.user} ${favoritesConfigFile} $d
'';
PermissionsStartOnly = true;
ExecStart = "${cfg.package}/bin/airdcppd -c=${cfg.stateDir} -p=${cfg.stateDir}/airdcpp.pid";
diff --git a/krebs/3modules/charybdis.nix b/krebs/3modules/charybdis.nix
new file mode 100644
index 000000000..f4a7c1313
--- /dev/null
+++ b/krebs/3modules/charybdis.nix
@@ -0,0 +1,110 @@
+{ config, lib, pkgs, ... }:
+
+let
+ inherit (lib) mkEnableOption mkIf mkOption singleton types;
+ inherit (pkgs) coreutils charybdis;
+ cfg = config.krebs.charybdis;
+
+ configFile = pkgs.writeText "charybdis.conf" ''
+ ${cfg.config}
+ '';
+in
+
+{
+
+ ###### interface
+
+ options = {
+
+ krebs.charybdis = {
+
+ enable = mkEnableOption "Charybdis IRC daemon";
+
+ config = mkOption {
+ type = types.string;
+ description = ''
+ Charybdis IRC daemon configuration file.
+ '';
+ };
+
+ statedir = mkOption {
+ type = types.string;
+ default = "/var/lib/charybdis";
+ description = ''
+ Location of the state directory of charybdis.
+ '';
+ };
+
+ user = mkOption {
+ type = types.string;
+ default = "ircd";
+ description = ''
+ Charybdis IRC daemon user.
+ '';
+ };
+
+ group = mkOption {
+ type = types.string;
+ default = "ircd";
+ description = ''
+ Charybdis IRC daemon group.
+ '';
+ };
+
+ motd = mkOption {
+ type = types.nullOr types.lines;
+ default = null;
+ description = ''
+ Charybdis MOTD text.
+
+ Charybdis will read its MOTD from /etc/charybdis/ircd.motd .
+ If set, the value of this option will be written to this path.
+ '';
+ };
+
+ };
+
+ };
+
+
+ ###### implementation
+
+ config = mkIf cfg.enable (lib.mkMerge [
+ {
+ users.users = singleton {
+ name = cfg.user;
+ description = "Charybdis IRC daemon user";
+ uid = config.ids.uids.ircd;
+ group = cfg.group;
+ };
+
+ users.groups = singleton {
+ name = cfg.group;
+ gid = config.ids.gids.ircd;
+ };
+
+ systemd.services.charybdis = {
+ description = "Charybdis IRC daemon";
+ wantedBy = [ "multi-user.target" ];
+ environment = {
+ BANDB_DBPATH = "${cfg.statedir}/ban.db";
+ };
+ serviceConfig = {
+ ExecStart = "${charybdis}/bin/charybdis -foreground -logfile /dev/stdout -configfile ${configFile}";
+ Group = cfg.group;
+ User = cfg.user;
+ PermissionsStartOnly = true; # preStart needs to run with root permissions
+ };
+ preStart = ''
+ ${coreutils}/bin/mkdir -p ${cfg.statedir}
+ ${coreutils}/bin/chown ${cfg.user}:${cfg.group} ${cfg.statedir}
+ '';
+ };
+
+ }
+
+ (mkIf (cfg.motd != null) {
+ environment.etc."charybdis/ircd.motd".text = cfg.motd;
+ })
+ ]);
+}
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index 41b701cd0..dd682bf4d 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -6,6 +6,7 @@ let
out = {
imports = [
+ ./airdcpp.nix
./announce-activation.nix
./apt-cacher-ng.nix
./backup.nix
@@ -13,6 +14,7 @@ let
./buildbot/master.nix
./buildbot/slave.nix
./build.nix
+ ./charybdis.nix
./ci.nix
./current.nix
./exim.nix
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix
index 8a923efd2..f6b4e3c69 100644
--- a/krebs/3modules/git.nix
+++ b/krebs/3modules/git.nix
@@ -121,6 +121,10 @@ let
cgit-settings = types.submodule {
# A setting's value of `null` means cgit's default should be used.
options = {
+ about-filter = mkOption {
+ type = types.nullOr types.package;
+ default = null;
+ };
cache-root = mkOption {
type = types.absolute-pathname;
default = "/tmp/cgit";
@@ -166,6 +170,10 @@ let
types.nullOr (types.enum ["week" "month" "quarter" "year"]);
default = "year";
};
+ readme = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ };
robots = mkOption {
type = types.nullOr (types.listOf types.str);
default = ["nofollow" "noindex"];
@@ -394,8 +402,14 @@ let
kv-to-cgitrc = k: v: getAttr (typeOf v) {
bool = kv-to-cgitrc k (if v then 1 else 0);
null = []; # This will be removed by `flatten`.
- list = "${k}=${concatStringsSep ", " v}";
+ list = {
+ readme = map (x: "readme=${x}") v;
+ }.${k} or "${k}=${concatStringsSep ", " v}";
int = "${k}=${toString v}";
+ set =
+ if subtypes.cgit-settings.check v
+ then "${k}=${v}"
+ else error "kv-to-cgitrc: unhandled type: set";
string = "${k}=${v}";
};
in
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index 454f9bc65..e2152ea1a 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -4,7 +4,9 @@ with import <stockholm/lib>;
## generate keys with:
# tinc generate-keys
# ssh-keygen -f ssh.id_ed25519 -t ed25519 -C host
-{
+let
+ pub-for = name: builtins.readFile (./ssh + "/${name}.pub");
+in {
hosts = mapAttrs (_: setAttr "owner" config.krebs.users.makefu) {
cake = rec {
cores = 4;
@@ -590,6 +592,8 @@ with import <stockholm/lib>;
"cache.gum.r"
"logs.makefu.r"
"stats.makefu.r"
+ "backup.makefu.r"
+ "dcpp.nextgum.r"
];
tinc.