.deck/system.nix

42 lines
1,011 B
Nix
Raw Permalink Normal View History

2024-11-14 17:15:38 +01:00
{ 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";
2024-11-14 17:15:38 +01:00
KillMode = "process";
Restart = "always";
};
wants = [ "sshdgenkeys.service" ];
after = [ "sshdgenkeys.service" "network.target" ];
wantedBy = [ "ensure-symlinked-units-resolve.service" "system-manager.target" ];
2024-11-14 17:15:38 +01:00
};
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!"
'';
};
};
};
}