stockholm/lass/1systems/blue/config.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

2018-05-16 15:26:19 +00:00
with import <stockholm/lib>;
{ config, lib, pkgs, ... }:
{
imports = [
<stockholm/lass>
<stockholm/lass/2configs>
<stockholm/lass/2configs/retiolum.nix>
2018-05-20 08:20:10 +00:00
<stockholm/lass/2configs/exim-retiolum.nix>
<stockholm/lass/2configs/blue.nix>
2018-05-16 15:26:19 +00:00
];
krebs.build.host = config.krebs.hosts.blue;
2018-05-20 08:20:10 +00:00
2018-06-07 06:24:56 +00:00
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)
2018-06-07 06:24:56 +00:00
'';
};
2018-05-20 08:20:10 +00:00
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 ];
2018-05-16 15:26:19 +00:00
}