summaryrefslogtreecommitdiff
path: root/hosts/radish/services.nix
blob: 73840dc7d072bd230129defe29f51aa4b085bb61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ lib, config, pkgs, ... }:

{
  environment.systemPackages = [ pkgs.superd ];
  boot.systemdExecutable = "/run/current-system/sw/bin/superd";

  environment.etc = {
    "superd/services/nix-daemon.service".text = ''
    [Unit]
    Description=Nix Daemon
    [Service]
    ExecStart=${config.nix.package}/bin/nix-daemon --daemon
    KillMode=process
    '';

    "superd/services/sshd.service".text = ''
      [Unit]
      Description=SSH Daemon
      [Service]
      Environment="LD_LIBRARY_PATH=${config.system.nssModules.path}"
      ExecStart=${config.services.openssh.package} -D -f /etc/ssh/sshd_config
      KillMode=process
      Restart=always
      '';
  };
}