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
|
|
|
{
|
|
|
|
|
2020-04-02 02:16:24 +02:00
|
|
|
meta = {
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
};
|
|
|
|
|
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 = {
|
|
|
|
|
2022-08-28 21:18:44 +02:00
|
|
|
enable = mkEnableOption (lib.mdDoc "GVfs, a userspace virtual filesystem");
|
2019-08-20 00:53:43 +02:00
|
|
|
|
2019-08-20 00:56:41 +02:00
|
|
|
# gvfs can be built with multiple configurations
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
2021-05-07 23:18:14 +02:00
|
|
|
default = pkgs.gnome.gvfs;
|
2021-10-03 18:06:03 +02:00
|
|
|
defaultText = literalExpression "pkgs.gnome.gvfs";
|
2022-07-28 23:19:15 +02:00
|
|
|
description = lib.mdDoc "Which GVfs package to use.";
|
2019-08-20 00:56:41 +02:00
|
|
|
};
|
|
|
|
|
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
|
|
|
|
2022-01-04 19:22:05 +01:00
|
|
|
services.udev.packages = [ pkgs.libmtp.out ];
|
2019-08-20 00:53:43 +02:00
|
|
|
|
2022-08-11 13:28:31 +02:00
|
|
|
services.udisks2.enable = true;
|
|
|
|
|
2019-08-20 00:58:13 +02:00
|
|
|
# Needed for unwrapped applications
|
2022-01-15 21:53:58 +01:00
|
|
|
environment.sessionVariables.GIO_EXTRA_MODULES = [ "${cfg.package}/lib/gio/modules" ];
|
2019-08-20 00:58:13 +02:00
|
|
|
|
2019-08-20 00:53:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|