summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/misc/devmon.nix
blob: 64b356daae00dbe5eb888d278de53fe6adc71e6a (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
27
28
29
30
31
32
33
{
  pkgs,
  config,
  lib,
  ...
}:
let
  cfg = config.services.devmon;

in
{
  options = {
    services.devmon = {
      enable = lib.mkEnableOption "devmon, an automatic device mounting daemon";
    };
  };

  config = lib.mkIf cfg.enable {
    systemd.user.services.devmon = {
      description = "devmon automatic device mounting daemon";
      wantedBy = [ "default.target" ];
      path = [
        pkgs.udevil
        pkgs.procps
        pkgs.udisks
        pkgs.which
      ];
      serviceConfig.ExecStart = "${pkgs.udevil}/bin/devmon";
    };

    services.udisks2.enable = true;
  };
}