a5b4c74a16
Service that exports the contents of the Public folder in your home directory on the local network https://help.gnome.org/users/gnome-user-share/3.8
43 lines
896 B
Nix
43 lines
896 B
Nix
# GNOME User Share daemon.
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
with pkgs.lib;
|
|
|
|
{
|
|
|
|
###### 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 {
|
|
|
|
environment.systemPackages = [ pkgs.gnome3.gnome-user-share ];
|
|
|
|
services.xserver.displayManager.sessionCommands = with pkgs.gnome3; ''
|
|
# 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}
|
|
'';
|
|
|
|
};
|
|
|
|
}
|