summaryrefslogtreecommitdiff
path: root/nixos/services.nix
blob: f8baf8577eae803be9e9c9ae884c78e881a80c5c (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
{ lib, config, pkgs, ... }:

{
  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  # services.openssh.enable = true;

  systemd.services = {
    nix-gc-remove-dead-roots = {
      enable = true;
      description = "Remove dead symlinks in /nix/var/nix/gcroots";

      serviceConfig.Type = "oneshot";

      script = "find /nix/var/nix/gcroots -xtype l -delete";

      before = lib.mkIf config.nix.gc.automatic [ "nix-gc.service" ];
      wantedBy = lib.mkIf config.nix.gc.automatic [ "nix-gc.service" ];
    };
  };

  # virtualisation.docker.enable = true;
}