2020-04-24 23:36:52 +00:00
|
|
|
# GVfs
|
|
|
|
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.gvfs;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Added 2019-08-19
|
|
|
|
imports = [
|
|
|
|
(mkRenamedOptionModule
|
|
|
|
[ "services" "gnome3" "gvfs" "enable" ]
|
|
|
|
[ "services" "gvfs" "enable" ])
|
|
|
|
];
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.gvfs = {
|
|
|
|
|
|
|
|
enable = mkEnableOption "GVfs, a userspace virtual filesystem";
|
|
|
|
|
|
|
|
# gvfs can be built with multiple configurations
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
2021-05-20 23:08:51 +00:00
|
|
|
default = pkgs.gnome.gvfs;
|
2021-10-06 13:57:05 +00:00
|
|
|
defaultText = literalExpression "pkgs.gnome.gvfs";
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc "Which GVfs package to use.";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
|
|
|
|
services.dbus.packages = [ cfg.package ];
|
|
|
|
|
|
|
|
systemd.packages = [ cfg.package ];
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
services.udev.packages = [ pkgs.libmtp.out ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
services.udisks2.enable = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Needed for unwrapped applications
|
2022-02-10 20:34:41 +00:00
|
|
|
environment.sessionVariables.GIO_EXTRA_MODULES = [ "${cfg.package}/lib/gio/modules" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|