nixpkgs/nixos/modules/services/desktops/gvfs.nix

57 lines
850 B
Nix
Raw Normal View History

2019-08-20 00:53:43 +02:00
# GVfs
{ config, lib, pkgs, ... }:
with lib;
2019-08-20 00:56:41 +02:00
let
cfg = config.services.gvfs;
in
2019-08-20 00:53:43 +02:00
{
# Added 2019-08-19
imports = [
(mkRenamedOptionModule
[ "services" "gnome3" "gvfs" "enable" ]
[ "services" "gvfs" "enable" ])
];
###### interface
options = {
services.gvfs = {
enable = mkEnableOption "GVfs, a userspace virtual filesystem";
2019-08-20 00:56:41 +02:00
# gvfs can be built with multiple configurations
package = mkOption {
type = types.package;
default = pkgs.gnome3.gvfs;
description = "Which GVfs package to use.";
};
2019-08-20 00:53:43 +02:00
};
};
###### implementation
2019-08-20 00:56:41 +02:00
config = mkIf cfg.enable {
2019-08-20 00:53:43 +02:00
2019-08-20 00:56:41 +02:00
environment.systemPackages = [ cfg.package ];
2019-08-20 00:53:43 +02:00
2019-08-20 00:56:41 +02:00
services.dbus.packages = [ cfg.package ];
2019-08-20 00:53:43 +02:00
2019-08-20 00:56:41 +02:00
systemd.packages = [ cfg.package ];
2019-08-20 00:53:43 +02:00
services.udev.packages = [ pkgs.libmtp.bin ];
};
}