.deck/system.nix

41 lines
1,011 B
Nix

{ config, lib, pkgs, ... }:
{
config = {
nixpkgs.hostPlatform = "x86_64-linux";
system-manager.allowAnyDistro = true;
environment = {
systemPackages = [
pkgs.zerotierone
];
};
systemd.services = {
sshd = {
enable = true;
serviceConfig = {
Type = "notify-reload";
ExecStart = "/usr/bin/sshd -D";
KillMode = "process";
Restart = "always";
};
wants = [ "sshdgenkeys.service" ];
after = [ "sshdgenkeys.service" "network.target" ];
wantedBy = [ "ensure-symlinked-units-resolve.service" "system-manager.target" ];
};
zerotierone = {
enable = true;
serviceConfig = {
Type = "simple";
};
wantedBy = [ "ensure-symlinked-units-resolve.service" "system-manager.target" ];
script = ''
${lib.getBin pkgs.zerotierone}/bin/zerotier-one
echo "We launched the rockets!"
'';
};
};
};
}