2011-07-23 02:30:36 +01:00
|
|
|
# Udisks daemon.
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2011-07-23 02:30:36 +01:00
|
|
|
options = {
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2011-07-23 02:30:36 +01:00
|
|
|
services.udisks = {
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2011-07-23 02:30:36 +01:00
|
|
|
enable = mkOption {
|
2013-10-30 16:37:45 +00:00
|
|
|
type = types.bool;
|
2011-07-23 02:30:36 +01:00
|
|
|
default = false;
|
|
|
|
description = ''
|
2011-07-25 01:45:52 +01:00
|
|
|
Whether to enable Udisks, a DBus service that allows
|
|
|
|
applications to query and manipulate storage devices.
|
2011-07-23 02:30:36 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2011-07-23 02:30:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
2011-09-14 19:20:50 +01:00
|
|
|
|
2011-07-23 02:30:36 +01:00
|
|
|
config = mkIf config.services.udisks.enable {
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.udisks ];
|
|
|
|
|
|
|
|
services.dbus.packages = [ pkgs.udisks ];
|
|
|
|
|
2011-08-21 22:03:02 +01:00
|
|
|
system.activationScripts.udisks =
|
|
|
|
''
|
|
|
|
mkdir -m 0755 -p /var/lib/udisks
|
|
|
|
'';
|
|
|
|
|
2011-08-24 22:24:39 +01:00
|
|
|
services.udev.packages = [ pkgs.udisks ];
|
2014-03-25 15:48:19 +00:00
|
|
|
|
|
|
|
systemd.packages = [ pkgs.udisks ];
|
2011-07-23 02:30:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|