2015-07-19 12:22:04 +00:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.devmon;
|
|
|
|
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
services.devmon = {
|
2020-04-20 18:05:26 +00:00
|
|
|
enable = mkEnableOption "devmon, an automatic device mounting daemon";
|
2015-07-19 12:22:04 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2015-11-18 11:28:58 +00:00
|
|
|
systemd.user.services.devmon = {
|
2015-07-19 12:22:04 +00:00
|
|
|
description = "devmon automatic device mounting daemon";
|
2015-11-18 11:28:58 +00:00
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
path = [ pkgs.udevil pkgs.procps pkgs.udisks2 pkgs.which ];
|
2015-07-19 12:22:04 +00:00
|
|
|
serviceConfig.ExecStart = "${pkgs.udevil}/bin/devmon";
|
|
|
|
};
|
2015-11-18 11:28:58 +00:00
|
|
|
|
|
|
|
services.udisks2.enable = true;
|
2015-07-19 12:22:04 +00:00
|
|
|
};
|
|
|
|
}
|