blob: cebfb0820229566292aeefdaf0042d46eb2b7dea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# GVfs
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.gvfs;
in
{
meta = {
teams = [ lib.teams.gnome ];
};
###### interface
options = {
services.gvfs = {
enable = lib.mkEnableOption "GVfs, a userspace virtual filesystem";
# gvfs can be built with multiple configurations
package = lib.mkPackageOption pkgs [ "gnome" "gvfs" ] { };
};
};
###### implementation
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
programs.fuse.enable = true;
services.dbus.packages = [ cfg.package ];
systemd.packages = [ cfg.package ];
services.udev.packages = [ pkgs.libmtp.out ];
services.udisks2.enable = true;
# Needed for unwrapped applications
environment.sessionVariables.GIO_EXTRA_MODULES = [ "${cfg.package}/lib/gio/modules" ];
};
}
|