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