2014-04-11 22:13:31 +01:00
|
|
|
# GNOME User Share daemon.
|
|
|
|
|
2014-05-05 19:58:51 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2014-04-11 22:13:31 +01:00
|
|
|
|
2014-05-05 19:58:51 +01:00
|
|
|
with lib;
|
2014-04-11 22:13:31 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.gnome3.gnome-user-share = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Whether to enable GNOME User Share, a service that exports the
|
|
|
|
contents of the Public folder in your home directory on the local network.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf config.services.gnome3.gnome-user-share.enable {
|
|
|
|
|
2017-09-24 12:15:50 +01:00
|
|
|
environment.systemPackages = [ pkgs.gnome3.gnome-user-share ];
|
2014-04-11 22:13:31 +01:00
|
|
|
|
2017-09-24 12:15:50 +01:00
|
|
|
services.xserver.displayManager.sessionCommands = with pkgs.gnome3; ''
|
2014-04-11 22:13:31 +01:00
|
|
|
# Don't let gnome-control-center depend upon gnome-user-share
|
|
|
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${gnome-user-share}/share/gsettings-schemas/${gnome-user-share.name}
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|