2019-08-19 22:53:43 +00:00
|
|
|
# GVfs
|
|
|
|
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2019-08-19 22:56:41 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.gvfs;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2019-08-19 22:53:43 +00:00
|
|
|
{
|
|
|
|
|
2020-04-02 00:16:24 +00:00
|
|
|
meta = {
|
2024-04-30 16:57:01 +00:00
|
|
|
maintainers = lib.teams.gnome.members;
|
2020-04-02 00:16:24 +00:00
|
|
|
};
|
|
|
|
|
2019-08-19 22:53:43 +00:00
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.gvfs = {
|
|
|
|
|
2024-04-30 16:57:01 +00:00
|
|
|
enable = lib.mkEnableOption "GVfs, a userspace virtual filesystem";
|
2019-08-19 22:53:43 +00:00
|
|
|
|
2019-08-19 22:56:41 +00:00
|
|
|
# gvfs can be built with multiple configurations
|
2024-04-30 16:57:01 +00:00
|
|
|
package = lib.mkPackageOption pkgs [ "gnome" "gvfs" ] { };
|
2019-08-19 22:56:41 +00:00
|
|
|
|
2019-08-19 22:53:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
2024-04-30 16:57:01 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2019-08-19 22:53:43 +00:00
|
|
|
|
2019-08-19 22:56:41 +00:00
|
|
|
environment.systemPackages = [ cfg.package ];
|
2019-08-19 22:53:43 +00:00
|
|
|
|
2019-08-19 22:56:41 +00:00
|
|
|
services.dbus.packages = [ cfg.package ];
|
2019-08-19 22:53:43 +00:00
|
|
|
|
2019-08-19 22:56:41 +00:00
|
|
|
systemd.packages = [ cfg.package ];
|
2019-08-19 22:53:43 +00:00
|
|
|
|
2022-01-04 18:22:05 +00:00
|
|
|
services.udev.packages = [ pkgs.libmtp.out ];
|
2019-08-19 22:53:43 +00:00
|
|
|
|
2022-08-11 11:28:31 +00:00
|
|
|
services.udisks2.enable = true;
|
|
|
|
|
2019-08-19 22:58:13 +00:00
|
|
|
# Needed for unwrapped applications
|
2022-01-15 20:53:58 +00:00
|
|
|
environment.sessionVariables.GIO_EXTRA_MODULES = [ "${cfg.package}/lib/gio/modules" ];
|
2019-08-19 22:58:13 +00:00
|
|
|
|
2019-08-19 22:53:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|