summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-05-24 01:31:22 +0200
committertv <tv@krebsco.de>2017-05-24 01:31:22 +0200
commit46d6506916f699e3b707dc41cd68c92b98e50e5a (patch)
tree1d43d0072fc479c7022e3cd3b9810aa7b90e1db3
parent061e702a6fc0e6046d39c3975c9034a69499c45f (diff)
parent90f6d9f228029233d38a86a520a0e532cc5e499f (diff)
Merge remote-tracking branch 'prism/master'
-rw-r--r--krebs/3modules/lass/default.nix8
-rw-r--r--lass/1systems/mors.nix13
-rw-r--r--lass/2configs/baseX.nix2
-rw-r--r--lass/2configs/bepasty.nix2
-rw-r--r--lass/2configs/default.nix9
-rw-r--r--lass/2configs/dns-stuff.nix31
-rw-r--r--lass/2configs/nixpkgs.nix2
-rw-r--r--lass/2configs/retiolum.nix6
-rw-r--r--lass/2configs/websites/domsen.nix5
-rw-r--r--lass/2configs/websites/fritz.nix2
-rw-r--r--lass/3modules/default.nix1
-rw-r--r--lass/3modules/hosts.nix2
-rw-r--r--lass/3modules/pyload.nix55
-rw-r--r--lib/types.nix7
-rw-r--r--nin/2configs/default.nix2
-rw-r--r--nin/2configs/nixpkgs.nix2
16 files changed, 121 insertions, 28 deletions
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix
index b86e0531..0e1cbd87 100644
--- a/krebs/3modules/lass/default.nix
+++ b/krebs/3modules/lass/default.nix
@@ -3,7 +3,10 @@
with import <stockholm/lib>;
{
- hosts = mapAttrs (_: setAttr "owner" config.krebs.users.lass) {
+ hosts = mapAttrs (_: recursiveUpdate {
+ owner = config.krebs.users.lass;
+ managed = true;
+ }) {
dishfire = {
cores = 4;
nets = rec {
@@ -124,6 +127,7 @@ with import <stockholm/lib>;
ssh.port = 2223;
};
};
+ managed = false;
};
cloudkrebs = {
cores = 1;
@@ -300,6 +304,7 @@ with import <stockholm/lib>;
};
iso = {
cores = 1;
+ managed = false;
};
sokrateslaptop = {
nets = {
@@ -321,6 +326,7 @@ with import <stockholm/lib>;
'';
};
};
+ managed = false;
};
};
users = {
diff --git a/lass/1systems/mors.nix b/lass/1systems/mors.nix
index c8d9465d..dd3777c6 100644
--- a/lass/1systems/mors.nix
+++ b/lass/1systems/mors.nix
@@ -32,14 +32,11 @@ with import <stockholm/lib>;
{ predicate = "-p tcp --dport 11100"; target = "ACCEPT"; }
];
}
- #{
- # services.elasticsearch = {
- # enable = true;
- # plugins = [
- # # pkgs.elasticsearchPlugins.elasticsearch_kopf
- # ];
- # };
- #}
+ {
+ services.elasticsearch = {
+ enable = true;
+ };
+ }
{
#zalando project
services.postgresql = {
diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix
index 9c51effd..3e2e325d 100644
--- a/lass/2configs/baseX.nix
+++ b/lass/2configs/baseX.nix
@@ -10,6 +10,7 @@ in {
./copyq.nix
./xresources.nix
./livestream.nix
+ ./dns-stuff.nix
{
hardware.pulseaudio = {
enable = true;
@@ -33,6 +34,7 @@ in {
time.timeZone = "Europe/Berlin";
programs.ssh.startAgent = false;
+ services.openssh.forwardX11 = true;
services.printing = {
enable = true;
diff --git a/lass/2configs/bepasty.nix b/lass/2configs/bepasty.nix
index c2bc3f3c..b2d40d4f 100644
--- a/lass/2configs/bepasty.nix
+++ b/lass/2configs/bepasty.nix
@@ -35,7 +35,7 @@ in {
forceSSL = true;
enableACME = true;
};
- defaultPermissions = "read";
+ defaultPermissions = "read,create";
secretKey = secKey;
});
};
diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix
index ffed5bb7..d7deb316 100644
--- a/lass/2configs/default.nix
+++ b/lass/2configs/default.nix
@@ -63,15 +63,6 @@ with import <stockholm/lib>;
pkgs.pythonPackages.python
];
}
- {
- services.dnscrypt-proxy = {
- enable = true;
- resolverName = "cs-de";
- };
- networking.extraResolvconfConf = ''
- name_servers='127.0.0.1'
- '';
- }
];
networking.hostName = config.krebs.build.host.name;
diff --git a/lass/2configs/dns-stuff.nix b/lass/2configs/dns-stuff.nix
new file mode 100644
index 00000000..b52d3050
--- /dev/null
+++ b/lass/2configs/dns-stuff.nix
@@ -0,0 +1,31 @@
+{ config, pkgs, ... }:
+with import <stockholm/lib>;
+{
+ services.dnscrypt-proxy = {
+ enable = true;
+ localAddress = "127.1.0.1";
+ resolverName = "cs-de";
+ };
+ services.dnsmasq = {
+ enable = true;
+ extraConfig = ''
+ server=127.1.0.1
+ server=/dn42/172.23.75.6
+ #no-resolv
+ cache-size=1000
+ min-cache-ttl=3600
+ bind-dynamic
+ all-servers
+ dnssec
+ trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5
+ address=/blog/127.0.0.1
+ address=/blog/::1
+ rebind-domain-ok=/onion/
+ server=/.onion/127.0.0.1#9053
+ port=53
+ '';
+ };
+ networking.extraResolvconfConf = ''
+ name_servers='127.0.0.1'
+ '';
+}
diff --git a/lass/2configs/nixpkgs.nix b/lass/2configs/nixpkgs.nix
index 49c44aa8..c6620afa 100644
--- a/lass/2configs/nixpkgs.nix
+++ b/lass/2configs/nixpkgs.nix
@@ -3,6 +3,6 @@
{
krebs.build.source.nixpkgs.git = {
url = https://cgit.lassul.us/nixpkgs;
- ref = "2bb9c1c";
+ ref = "f469354";
};
}
diff --git a/lass/2configs/retiolum.nix b/lass/2configs/retiolum.nix
index 7f1b36c9..e7779f53 100644
--- a/lass/2configs/retiolum.nix
+++ b/lass/2configs/retiolum.nix
@@ -1,4 +1,4 @@
-{ ... }:
+{ pkgs, ... }:
{
@@ -25,4 +25,8 @@
nixpkgs.config.packageOverrides = pkgs: {
tinc = pkgs.tinc_pre;
};
+
+ environment.systemPackages = [
+ pkgs.tinc
+ ];
}
diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix
index 581b37d9..b0d28d4d 100644
--- a/lass/2configs/websites/domsen.nix
+++ b/lass/2configs/websites/domsen.nix
@@ -25,9 +25,10 @@ in {
imports = [
./sqlBackup.nix
(servePage [ "reich-gebaeudereinigung.de" "www.reich-gebaeudereinigung.de" ])
- (servePage [ "karlaskop.de" "www.karlaskop.de" ])
- (servePage [ "makeup.apanowicz.de" "www.makeup.apanowicz.de" ])
+ (servePage [ "karlaskop.de" ])
+ (servePage [ "makeup.apanowicz.de" ])
(servePage [ "pixelpocket.de" ])
+ (servePage [ "habsys.de" "habsys.eu" ])
(serveOwncloud [ "o.ubikmedia.de" ])
(serveWordpress [
"ubikmedia.de"
diff --git a/lass/2configs/websites/fritz.nix b/lass/2configs/websites/fritz.nix
index 9bf7e4a9..45927b10 100644
--- a/lass/2configs/websites/fritz.nix
+++ b/lass/2configs/websites/fritz.nix
@@ -40,8 +40,6 @@ in {
(serveWordpress [ "eastuttgart.de" "www.eastuttgart.de" ])
- (servePage [ "habsys.de" "www.habsys.de" "habsys.eu" "www.habsys.eu" ])
-
(serveWordpress [ "goldbarrendiebstahl.radical-dreamers.de" ])
];
diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix
index 73692446..fd353e00 100644
--- a/lass/3modules/default.nix
+++ b/lass/3modules/default.nix
@@ -6,6 +6,7 @@ _:
./hosts.nix
./mysql-backup.nix
./news.nix
+ ./pyload.nix
./umts.nix
./usershadow.nix
./xresources.nix
diff --git a/lass/3modules/hosts.nix b/lass/3modules/hosts.nix
index 125819bb..7e3af10b 100644
--- a/lass/3modules/hosts.nix
+++ b/lass/3modules/hosts.nix
@@ -6,7 +6,7 @@ with import <stockholm/lib>;
options.lass.hosts = mkOption {
type = types.attrsOf types.host;
default =
- filterAttrs (_: host: host.owner.name == "lass")
+ filterAttrs (_: host: host.owner.name == "lass" && host.managed)
config.krebs.hosts;
};
}
diff --git a/lass/3modules/pyload.nix b/lass/3modules/pyload.nix
new file mode 100644
index 00000000..6f29ffb1
--- /dev/null
+++ b/lass/3modules/pyload.nix
@@ -0,0 +1,55 @@
+{ config, lib, pkgs, ... }:
+
+with import <stockholm/lib>;
+
+let
+ cfg = config.lass.pyload;
+
+ out = {
+ options.lass.pyload = api;
+ config = lib.mkIf cfg.enable imp;
+ };
+
+ api = {
+ enable = mkEnableOption "pyload";
+ user = mkOption {
+ type = types.str;
+ default = "download";
+ };
+ };
+
+ imp = {
+
+ krebs.per-user.${cfg.user}.packages = [
+ pkgs.pyload
+ pkgs.spidermonkey
+ pkgs.tesseract
+ ];
+
+ krebs.iptables.tables.filter.INPUT.rules = [
+ { predicate = "-p tcp --dport 9099"; target = "ACCEPT"; }
+ ];
+ systemd.services.pyload = {
+ description = "pyload";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ path = with pkgs; [
+ pyload
+ spidermonkey
+ tesseract
+ dnsmasq
+ ];
+
+ restartIfChanged = true;
+
+ serviceConfig = {
+ Restart = "always";
+ ExecStart = "${pkgs.pyload}/bin/pyLoadCore";
+ User = cfg.user;
+ };
+ };
+
+ };
+
+in out
diff --git a/lib/types.nix b/lib/types.nix
index 30de5e17..530cd1e6 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -31,6 +31,13 @@ rec {
default = null;
};
+ managed = mkOption {
+ description = ''
+ If true, then the host's configuration is defined in stockholm.
+ '';
+ type = bool;
+ };
+
owner = mkOption {
type = user;
};
diff --git a/nin/2configs/default.nix b/nin/2configs/default.nix
index a1ed76d9..cb02521c 100644
--- a/nin/2configs/default.nix
+++ b/nin/2configs/default.nix
@@ -59,7 +59,7 @@ with import <stockholm/lib>;
krebs = {
enable = true;
- search-domain = "retiolum";
+ search-domain = "r";
build = {
user = config.krebs.users.nin;
source = let inherit (config.krebs.build) host; in {
diff --git a/nin/2configs/nixpkgs.nix b/nin/2configs/nixpkgs.nix
index 9c3eafff..14ddb792 100644
--- a/nin/2configs/nixpkgs.nix
+++ b/nin/2configs/nixpkgs.nix
@@ -3,6 +3,6 @@
{
krebs.build.source.nixpkgs.git = {
url = https://github.com/nixos/nixpkgs;
- ref = "5b0c9d4";
+ ref = "0afb6d7";
};
}