summaryrefslogtreecommitdiffstats
path: root/lass/1systems/blue
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-06-19 09:22:42 +0200
committerjeschli <jeschli@gmail.com>2018-06-19 09:22:42 +0200
commit8eca9165ce6ffaba1076a916bfa475eb935f0a6f (patch)
treeb2339ecdb48bd1135a1352b9993732ad0e35c02c /lass/1systems/blue
parent05c8cf3df5f6166c21dfd2dc316bf5de957dce94 (diff)
parentc19baeee138f9455ef570e609c045d312d6cc0f4 (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'lass/1systems/blue')
-rw-r--r--lass/1systems/blue/config.nix49
-rw-r--r--lass/1systems/blue/physical.nix8
-rw-r--r--lass/1systems/blue/source.nix4
3 files changed, 61 insertions, 0 deletions
diff --git a/lass/1systems/blue/config.nix b/lass/1systems/blue/config.nix
new file mode 100644
index 000000000..a84bb37f6
--- /dev/null
+++ b/lass/1systems/blue/config.nix
@@ -0,0 +1,49 @@
+with import <stockholm/lib>;
+{ config, lib, pkgs, ... }:
+{
+ imports = [
+ <stockholm/lass>
+ <stockholm/lass/2configs>
+ <stockholm/lass/2configs/retiolum.nix>
+ <stockholm/lass/2configs/exim-retiolum.nix>
+
+ <stockholm/lass/2configs/blue.nix>
+ ];
+
+ krebs.build.host = config.krebs.hosts.blue;
+
+ environment.shellAliases = {
+ deploy = pkgs.writeDash "deploy" ''
+ set -eu
+ export SYSTEM="$1"
+ $(nix-build $HOME/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" -A deploy)
+ '';
+ };
+
+ networking.nameservers = [ "1.1.1.1" ];
+
+ lass.restic = genAttrs [
+ "daedalus"
+ "icarus"
+ "littleT"
+ "prism"
+ "shodan"
+ "skynet"
+ ] (dest: {
+ dirs = [
+ "/home/"
+ "/var/lib"
+ ];
+ passwordFile = (toString <secrets>) + "/restic/${dest}";
+ repo = "sftp:backup@${dest}.r:/backups/blue";
+ extraArguments = [
+ "sftp.command='ssh backup@${dest}.r -i ${config.krebs.build.host.ssh.privkey.path} -s sftp'"
+ ];
+ timerConfig = {
+ OnCalendar = "00:05";
+ RandomizedDelaySec = "5h";
+ };
+ });
+ time.timeZone = "Europe/Berlin";
+ users.users.mainUser.openssh.authorizedKeys.keys = [ config.krebs.users.lass-android.pubkey ];
+}
diff --git a/lass/1systems/blue/physical.nix b/lass/1systems/blue/physical.nix
new file mode 100644
index 000000000..7499ff723
--- /dev/null
+++ b/lass/1systems/blue/physical.nix
@@ -0,0 +1,8 @@
+{
+ imports = [
+ ./config.nix
+ ];
+ boot.isContainer = true;
+ networking.useDHCP = false;
+ environment.variables.NIX_REMOTE = "daemon";
+}
diff --git a/lass/1systems/blue/source.nix b/lass/1systems/blue/source.nix
new file mode 100644
index 000000000..d8b979812
--- /dev/null
+++ b/lass/1systems/blue/source.nix
@@ -0,0 +1,4 @@
+import <stockholm/lass/source.nix> {
+ name = "blue";
+ secure = true;
+}