1# GNOME User Share daemon.
2
3{ config, pkgs, lib, ... }:
4
5with lib;
6
7let
8 gnome3 = config.environment.gnome3.packageSet;
9in
10{
11
12 ###### interface
13
14 options = {
15
16 services.gnome3.gnome-user-share = {
17
18 enable = mkOption {
19 type = types.bool;
20 default = false;
21 description = ''
22 Whether to enable GNOME User Share, a service that exports the
23 contents of the Public folder in your home directory on the local network.
24 '';
25 };
26
27 };
28
29 };
30
31
32 ###### implementation
33
34 config = mkIf config.services.gnome3.gnome-user-share.enable {
35
36 environment.systemPackages = [ gnome3.gnome-user-share ];
37
38 services.xserver.displayManager.sessionCommands = with gnome3; ''
39 # Don't let gnome-control-center depend upon gnome-user-share
40 export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome-user-share}/share/gsettings-schemas/${gnome-user-share.name}
41 '';
42
43 };
44
45}