1{ pkgs, config, lib, ... }:
2
3with lib;
4
5let
6 cfg = config.services.devmon;
7
8in {
9 options = {
10 services.devmon = {
11 enable = mkOption {
12 default = false;
13 description = ''
14 Whether to enable devmon, an automatic device mounting daemon.
15 '';
16 };
17 };
18 };
19
20 config = mkIf cfg.enable {
21 systemd.user.services.devmon = {
22 description = "devmon automatic device mounting daemon";
23 wantedBy = [ "default.target" ];
24 path = [ pkgs.udevil pkgs.procps pkgs.udisks2 pkgs.which ];
25 serviceConfig.ExecStart = "${pkgs.udevil}/bin/devmon";
26 };
27
28 services.udisks2.enable = true;
29 };
30}