summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/default.nix1
-rw-r--r--krebs/3modules/lass/default.nix10
-rw-r--r--krebs/3modules/realwallpaper.nix100
-rw-r--r--krebs/5pkgs/Reaktor/default.nix4
-rw-r--r--krebs/5pkgs/default.nix2
-rw-r--r--krebs/5pkgs/passwdqc-utils/default.nix27
-rw-r--r--krebs/5pkgs/realwallpaper.nix28
7 files changed, 169 insertions, 3 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index 69613d4c3..ea1894709 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -14,6 +14,7 @@ let
./iptables.nix
./nginx.nix
./Reaktor.nix
+ ./realwallpaper.nix
./retiolum.nix
./urlwatch.nix
];
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix
index aa071270c..9dbc597ed 100644
--- a/krebs/3modules/lass/default.nix
+++ b/krebs/3modules/lass/default.nix
@@ -34,9 +34,11 @@ with import ../../4lib { inherit lib; };
'';
};
};
+ ssh.privkey.path = <secrets/ssh.id_ed25519>;
+ ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL21QDOEFdODFh6WAfNp6odrXo15pEsDQuGJfMu/cKzK";
};
fastpoke = {
- dc = "lass"; #dc = "cac";
+ dc = "lass";
nets = rec {
internet = {
addrs4 = ["193.22.164.36"];
@@ -95,6 +97,8 @@ with import ../../4lib { inherit lib; };
'';
};
};
+ ssh.privkey.path = <secrets/ssh.id_ed25519>;
+ ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN7oYx7Lbkc0wPYNp92LQF93DCtxsGzOkVD91FJQzVZl";
};
uriel = {
cores = 1;
@@ -119,6 +123,8 @@ with import ../../4lib { inherit lib; };
'';
};
};
+ ssh.privkey.path = <secrets/ssh.id_ed25519>;
+ ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBryIo/Waw8SWvlQ0+5I+Bd/dJgcMd6iPXtELS6gQXoc";
secure = true;
};
mors = {
@@ -145,6 +151,8 @@ with import ../../4lib { inherit lib; };
};
};
secure = true;
+ ssh.privkey.path = <secrets/ssh.id_ed25519>;
+ ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINAMPlIG+6u75GJ3kvsPF6OoIZsU+u8ZQ+rdviv5fNMD";
};
};
diff --git a/krebs/3modules/realwallpaper.nix b/krebs/3modules/realwallpaper.nix
new file mode 100644
index 000000000..7e02538f5
--- /dev/null
+++ b/krebs/3modules/realwallpaper.nix
@@ -0,0 +1,100 @@
+arg@{ config, lib, pkgs, ... }:
+
+let
+ inherit (lib)
+ mkEnableOption
+ mkOption
+ types
+ mkIf
+ ;
+
+ cfg = config.krebs.realwallpaper;
+
+ out = {
+ options.krebs.realwallpaper = api;
+ config = mkIf cfg.enable imp;
+ };
+
+ api = {
+ enable = mkEnableOption "realwallpaper";
+
+ workingDir = mkOption {
+ type = types.str;
+ default = "/var/realwallpaper/";
+ };
+
+ nightmap = mkOption {
+ type = types.str;
+ default = "http://eoimages.gsfc.nasa.gov/images/imagerecords/55000/55167/earth_lights_lrg.jpg";
+ };
+
+ daymap = mkOption {
+ type = types.str;
+ default = "http://www.nnvl.noaa.gov/images/globaldata/SnowIceCover_Daily.png";
+ };
+
+ cloudmap = mkOption {
+ type = types.str;
+ default = "http://xplanetclouds.com/free/local/clouds_2048.jpg";
+ };
+
+ outFile = mkOption {
+ type = types.str;
+ default = "/tmp/wallpaper.png";
+ };
+
+ timerConfig = mkOption {
+ type = types.unspecified;
+ default = {
+ OnCalendar = "*:0/15";
+ };
+ };
+
+ };
+
+ imp = {
+ systemd.timers.realwallpaper = {
+ description = "real wallpaper generator timer";
+ wantedBy = [ "timers.target" ];
+
+ timerConfig = cfg.timerConfig;
+ };
+
+ systemd.services.realwallpaper = {
+ description = "real wallpaper generator";
+ after = [ "network.target" ];
+
+ path = with pkgs; [
+ xplanet
+ imagemagick
+ curl
+ file
+ ];
+
+ environment = {
+ working_dir = cfg.workingDir;
+ nightmap_url = cfg.nightmap;
+ daymap_url = cfg.daymap;
+ cloudmap_url = cfg.cloudmap;
+ out_file = cfg.outFile;
+ };
+
+ restartIfChanged = true;
+
+ serviceConfig = {
+ Type = "simple";
+ ExecStart = "${pkgs.realwallpaper}/realwallpaper.sh";
+ User = "realwallpaper";
+ };
+ };
+
+ users.extraUsers.realwallpaper = {
+ uid = 2009435407; #genid realwallpaper
+ home = cfg.workingDir;
+ createHome = true;
+ };
+ };
+
+in
+out
+
diff --git a/krebs/5pkgs/Reaktor/default.nix b/krebs/5pkgs/Reaktor/default.nix
index 524782081..c38aa6423 100644
--- a/krebs/5pkgs/Reaktor/default.nix
+++ b/krebs/5pkgs/Reaktor/default.nix
@@ -2,14 +2,14 @@
python3Packages.buildPythonPackage rec {
name = "Reaktor-${version}";
- version = "0.4.3";
+ version = "0.5.0";
propagatedBuildInputs = with pkgs;[
python3Packages.docopt
python3Packages.requests2
];
src = fetchurl {
url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-${version}.tar.gz";
- sha256 = "1rvfw9vg7i7z2ah7m5k3zik2b92d3xdaqa8am62qw6vgvmxcmfp4";
+ sha256 = "1npag52xmnyqv56z0anyf6xf00q0smfzsippal0xdbxrfj7s8qim";
};
meta = {
homepage = http://krebsco.de/;
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index 47e9341cc..c48c3dee8 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -21,7 +21,9 @@ rec {
nq = callPackage ./nq {};
posix-array = callPackage ./posix-array {};
pssh = callPackage ./pssh {};
+ passwdqc-utils = callPackage ./passwdqc-utils {};
Reaktor = callPackage ./Reaktor {};
+ realwallpaper = callPackage ./realwallpaper.nix {};
youtube-tools = callPackage ./youtube-tools {};
execve = name: { filename, argv, envp ? {}, destination ? "" }:
diff --git a/krebs/5pkgs/passwdqc-utils/default.nix b/krebs/5pkgs/passwdqc-utils/default.nix
new file mode 100644
index 000000000..0299715ba
--- /dev/null
+++ b/krebs/5pkgs/passwdqc-utils/default.nix
@@ -0,0 +1,27 @@
+{stdenv,pam,fetchurl,...}:
+
+stdenv.mkDerivation rec {
+ name = "passwdqc-utils-${version}";
+ version = "1.3.0";
+ buildInputs = [ pam ];
+ src = fetchurl {
+ url = "http://www.openwall.com/passwdqc/passwdqc-${version}.tar.gz";
+ sha256 = "0l3zbrp4pvah0dz33m48aqlz9nx663cc1fqhnlwr0p853b10la93";
+ };
+ buildTargets = "utils";
+ installFlags= [ "BINDIR=$(out)/bin"
+ "CONFDIR=$(out)/etc"
+ "SHARED_LIBDIR=$(out)/lib"
+ "DEVEL_LIBDIR=$(out)/lib"
+ "SECUREDIR=$(out)/lib/security"
+ "INCLUDEDIR=$(out)/include"
+ "MANDIR=$(out)/man"];
+ installTargets = "install_lib install_utils";
+
+ meta = {
+ description = "passwdqc utils (pwqgen,pwqcheck) and library";
+ license = stdenv.lib.licenses.bsd3;
+ maintainers = [ stdenv.lib.maintainers.makefu ];
+ patforms = stdenv.lib.platforms.linux; # more installFlags must be set for Darwin,Solaris
+ };
+}
diff --git a/krebs/5pkgs/realwallpaper.nix b/krebs/5pkgs/realwallpaper.nix
new file mode 100644
index 000000000..4fea977ec
--- /dev/null
+++ b/krebs/5pkgs/realwallpaper.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchgit, xplanet, imagemagick, curl, file }:
+
+stdenv.mkDerivation {
+ name = "realwallpaper";
+
+ src = fetchgit {
+ url = https://github.com/Lassulus/realwallpaper;
+ rev = "c2778c3c235fc32edc8115d533a0d0853ab101c5";
+ sha256 = "0yhbjz19zk8sj5dsvccm6skkqq2vardn1yi70qmd5li7qvp17mvs";
+ };
+
+ phases = [
+ "unpackPhase"
+ "installPhase"
+ ];
+
+ buildInputs = [
+ xplanet
+ imagemagick
+ curl
+ file
+ ];
+
+ installPhase = ''
+ mkdir -p $out
+ cp realwallpaper.sh $out/realwallpaper.sh
+ '';
+}