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