uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
85
nixos/modules/services/hardware/udisks2.nix
Normal file
85
nixos/modules/services/hardware/udisks2.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# Udisks daemon.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
settingsFormat = pkgs.formats.ini {
|
||||
listToValue = concatMapStringsSep "," (generators.mkValueStringDefault {});
|
||||
};
|
||||
configFiles = mapAttrs (name: value: (settingsFormat.generate name value)) (mapAttrs' (name: value: nameValuePair name value ) config.services.udisks2.settings);
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.udisks2 = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable Udisks, a DBus service that allows
|
||||
applications to query and manipulate storage devices.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption rec {
|
||||
type = types.attrsOf settingsFormat.type;
|
||||
apply = recursiveUpdate default;
|
||||
default = {
|
||||
"udisks2.conf" = {
|
||||
udisks2 = {
|
||||
modules = [ "*" ];
|
||||
modules_load_preference = "ondemand";
|
||||
};
|
||||
defaults = {
|
||||
encryption = "luks2";
|
||||
};
|
||||
};
|
||||
};
|
||||
example = literalExpression ''
|
||||
{
|
||||
"WDC-WD10EZEX-60M2NA0-WD-WCC3F3SJ0698.conf" = {
|
||||
ATA = {
|
||||
StandbyTimeout = 50;
|
||||
};
|
||||
};
|
||||
};
|
||||
'';
|
||||
description = ''
|
||||
Options passed to udisksd.
|
||||
See <link xlink:href="http://manpages.ubuntu.com/manpages/latest/en/man5/udisks2.conf.5.html">here</link> and
|
||||
drive configuration in <link xlink:href="http://manpages.ubuntu.com/manpages/latest/en/man8/udisks.8.html">here</link> for supported options.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.udisks2.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.udisks2 ];
|
||||
|
||||
environment.etc = mapAttrs' (name: value: nameValuePair "udisks2/${name}" { source = value; } ) configFiles;
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
services.dbus.packages = [ pkgs.udisks2 ];
|
||||
|
||||
systemd.tmpfiles.rules = [ "d /var/lib/udisks2 0755 root root -" ];
|
||||
|
||||
services.udev.packages = [ pkgs.udisks2 ];
|
||||
|
||||
systemd.packages = [ pkgs.udisks2 ];
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue