2020-04-24 23:36:52 +00:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.devmon;
|
|
|
|
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
services.devmon = {
|
2022-09-09 14:08:57 +00:00
|
|
|
enable = mkEnableOption (lib.mdDoc "devmon, an automatic device mounting daemon");
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd.user.services.devmon = {
|
|
|
|
description = "devmon automatic device mounting daemon";
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
path = [ pkgs.udevil pkgs.procps pkgs.udisks2 pkgs.which ];
|
|
|
|
serviceConfig.ExecStart = "${pkgs.udevil}/bin/devmon";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
};
|
|
|
|
}
|