mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge branch 'master' into staging-next
This commit is contained in:
commit
62791c3743
167 changed files with 11105 additions and 6483 deletions
|
@ -193,7 +193,7 @@ in {
|
|||
then ""
|
||||
else
|
||||
let pluginCmds = lib.attrsets.mapAttrsToList
|
||||
(n: v: "cp ${v} ${cfg.home}/plugins/${n}.hpi")
|
||||
(n: v: "cp ${v} ${cfg.home}/plugins/${n}.jpi")
|
||||
cfg.plugins;
|
||||
in ''
|
||||
rm -r ${cfg.home}/plugins || true
|
||||
|
|
|
@ -95,13 +95,7 @@ in {
|
|||
|
||||
environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
|
||||
|
||||
environment.variables = {
|
||||
# This is required so that GTK applications launched from Emacs
|
||||
# get properly themed:
|
||||
GTK_DATA_PREFIX = "${config.system.path}";
|
||||
} // (if cfg.defaultEditor then {
|
||||
EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor";
|
||||
} else {});
|
||||
environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "${editorScript}/bin/emacseditor");
|
||||
};
|
||||
|
||||
meta.doc = ./emacs.xml;
|
||||
|
|
|
@ -36,6 +36,37 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
services.minidlna.friendlyName = mkOption {
|
||||
type = types.str;
|
||||
default = "${config.networking.hostName} MiniDLNA";
|
||||
defaultText = "$HOSTNAME MiniDLNA";
|
||||
example = "rpi3";
|
||||
description =
|
||||
''
|
||||
Name that the DLNA server presents to clients.
|
||||
'';
|
||||
};
|
||||
|
||||
services.minidlna.rootContainer = mkOption {
|
||||
type = types.str;
|
||||
default = ".";
|
||||
example = "B";
|
||||
description =
|
||||
''
|
||||
Use a different container as the root of the directory tree presented
|
||||
to clients. The possible values are:
|
||||
- "." - standard container
|
||||
- "B" - "Browse Directory"
|
||||
- "M" - "Music"
|
||||
- "P" - "Pictures"
|
||||
- "V" - "Video"
|
||||
- Or, you can specify the ObjectID of your desired root container
|
||||
(eg. 1$F for Music/Playlists)
|
||||
If you specify "B" and the client device is audio-only then
|
||||
"Music/Folders" will be used as root.
|
||||
'';
|
||||
};
|
||||
|
||||
services.minidlna.loglevel = mkOption {
|
||||
type = types.str;
|
||||
default = "warn";
|
||||
|
@ -66,7 +97,37 @@ in
|
|||
|
||||
services.minidlna.config = mkOption {
|
||||
type = types.lines;
|
||||
description = "The contents of MiniDLNA's configuration file.";
|
||||
description =
|
||||
''
|
||||
The contents of MiniDLNA's configuration file.
|
||||
When the service is activated, a basic template is generated
|
||||
from the current options opened here.
|
||||
'';
|
||||
};
|
||||
|
||||
services.minidlna.extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
# Not exhaustive example
|
||||
# Support for streaming .jpg and .mp3 files to a TiVo supporting HMO.
|
||||
enable_tivo=no
|
||||
# SSDP notify interval, in seconds.
|
||||
notify_interval=10
|
||||
# maximum number of simultaneous connections
|
||||
# note: many clients open several simultaneous connections while
|
||||
# streaming
|
||||
max_connections=50
|
||||
# set this to yes to allow symlinks that point outside user-defined
|
||||
# media_dirs.
|
||||
wide_links=yes
|
||||
'';
|
||||
description =
|
||||
''
|
||||
Extra minidlna options not yet opened for configuration here
|
||||
(strict_dlna, model_number, model_name, etc...). This is appended
|
||||
to the current service already provided.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -75,13 +136,15 @@ in
|
|||
services.minidlna.config =
|
||||
''
|
||||
port=${toString port}
|
||||
friendly_name=${config.networking.hostName} MiniDLNA
|
||||
friendly_name=${cfg.friendlyName}
|
||||
db_dir=/var/cache/minidlna
|
||||
log_level=${cfg.loglevel}
|
||||
inotify=yes
|
||||
root_container=${cfg.rootContainer}
|
||||
${concatMapStrings (dir: ''
|
||||
media_dir=${dir}
|
||||
'') cfg.mediaDirs}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
users.users.minidlna = {
|
||||
|
|
|
@ -45,6 +45,8 @@ let
|
|||
$CFG->aspellpath = '${pkgs.aspell}/bin/aspell';
|
||||
$CFG->pathtodot = '${pkgs.graphviz}/bin/dot';
|
||||
|
||||
${cfg.extraConfig}
|
||||
|
||||
require_once('${cfg.package}/share/moodle/lib/setup.php');
|
||||
|
||||
// There is no php closing tag in this file,
|
||||
|
@ -172,6 +174,19 @@ in
|
|||
for details on configuration directives.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Any additional text to be appended to the config.php
|
||||
configuration file. This is a PHP script. For configuration
|
||||
details, see <link xlink:href="https://docs.moodle.org/37/en/Configuration_file"/>.
|
||||
'';
|
||||
example = ''
|
||||
$CFG->disableupdatenotifications = true;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# implementation
|
||||
|
|
|
@ -48,10 +48,6 @@ in
|
|||
services.xserver.desktopManager.session = [
|
||||
{ name = "Enlightenment";
|
||||
start = ''
|
||||
# Set GTK_DATA_PREFIX so that GTK can find the themes
|
||||
export GTK_DATA_PREFIX=${config.system.path}
|
||||
# find theme engines
|
||||
export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
|
||||
export XDG_MENU_PREFIX=e-
|
||||
|
||||
export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}"
|
||||
|
|
|
@ -48,12 +48,6 @@ in
|
|||
name = "mate";
|
||||
bgSupport = true;
|
||||
start = ''
|
||||
# Set GTK_DATA_PREFIX so that GTK can find the themes
|
||||
export GTK_DATA_PREFIX=${config.system.path}
|
||||
|
||||
# Find theme engines
|
||||
export GTK_PATH=${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0
|
||||
|
||||
export XDG_MENU_PREFIX=mate-
|
||||
|
||||
# Let caja find extensions
|
||||
|
|
|
@ -79,8 +79,7 @@ in
|
|||
Using Pantheon without LightDM as a displayManager will break screenlocking from the UI.
|
||||
'';
|
||||
|
||||
services.xserver.displayManager.lightdm.enable = mkDefault true;
|
||||
services.xserver.displayManager.lightdm.greeters.gtk.enable = mkDefault true;
|
||||
services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true;
|
||||
|
||||
# If not set manually Pantheon session cannot be started
|
||||
# Known issue of https://github.com/NixOS/nixpkgs/pull/43992
|
||||
|
@ -98,10 +97,6 @@ in
|
|||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
|
||||
fi
|
||||
'') cfg.sessionPath}
|
||||
|
||||
# Settings from elementary-default-settings
|
||||
export GTK_CSD=1
|
||||
export GTK_MODULES=$GTK_MODULES:pantheon-filechooser-module
|
||||
fi
|
||||
'';
|
||||
|
||||
|
@ -166,9 +161,14 @@ in
|
|||
networkmanager-iodine networkmanager-l2tp; };
|
||||
|
||||
# Override GSettings schemas
|
||||
environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
|
||||
environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
|
||||
|
||||
environment.variables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
|
||||
environment.sessionVariables.GNOME_SESSION_DEBUG = optionalString cfg.debug "1";
|
||||
|
||||
# Settings from elementary-default-settings
|
||||
environment.sessionVariables.GTK_CSD = "1";
|
||||
environment.sessionVariables.GTK_MODULES = "pantheon-filechooser-module";
|
||||
environment.etc."gtk-3.0/settings.ini".source = "${pkgs.pantheon.elementary-default-settings}/etc/gtk-3.0/settings.ini";
|
||||
|
||||
environment.pathsToLink = [
|
||||
# FIXME: modules should link subdirs of `/share` rather than relying on this
|
||||
|
|
|
@ -107,12 +107,6 @@ in
|
|||
start = ''
|
||||
${cfg.extraSessionCommands}
|
||||
|
||||
# Set GTK_PATH so that GTK can find the theme engines.
|
||||
export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0"
|
||||
|
||||
# Set GTK_DATA_PREFIX so that GTK can find the Xfce themes.
|
||||
export GTK_DATA_PREFIX=${config.system.path}
|
||||
|
||||
${pkgs.runtimeShell} ${pkgs.xfce.xinitrc} &
|
||||
waitPID=$!
|
||||
'';
|
||||
|
|
|
@ -114,12 +114,6 @@ in
|
|||
name = "xfce4-14";
|
||||
bgSupport = true;
|
||||
start = ''
|
||||
# Set GTK_PATH so that GTK can find the theme engines.
|
||||
export GTK_PATH="${config.system.path}/lib/gtk-2.0:${config.system.path}/lib/gtk-3.0"
|
||||
|
||||
# Set GTK_DATA_PREFIX so that GTK can find the Xfce themes.
|
||||
export GTK_DATA_PREFIX=${config.system.path}
|
||||
|
||||
${pkgs.runtimeShell} ${pkgs.xfce4-14.xinitrc} &
|
||||
waitPID=$!
|
||||
'';
|
||||
|
|
|
@ -142,8 +142,6 @@ in
|
|||
GDM_X_SERVER_EXTRA_ARGS = toString
|
||||
(filter (arg: arg != "-terminate") cfg.xserverArgs);
|
||||
XDG_DATA_DIRS = "${cfg.session.desktops}/share/";
|
||||
# Find the mouse
|
||||
XCURSOR_PATH = "~/.icons:${pkgs.gnome3.adwaita-icon-theme}/share/icons";
|
||||
} // optionalAttrs (xSessionWrapper != null) {
|
||||
# Make GDM use this wrapper before running the session, which runs the
|
||||
# configured setupCommands. This relies on a patched GDM which supports
|
||||
|
@ -262,7 +260,7 @@ in
|
|||
password required pam_deny.so
|
||||
|
||||
session required pam_succeed_if.so audit quiet_success user = gdm
|
||||
session required pam_env.so envfile=${config.system.build.pamEnvironment}
|
||||
session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
|
||||
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_permit.so
|
||||
|
|
|
@ -10,32 +10,6 @@ let
|
|||
icons = cfg.iconTheme.package;
|
||||
cursors = cfg.cursorTheme.package;
|
||||
|
||||
# We need a few things in the environment for the greeter to run with
|
||||
# fonts/icons.
|
||||
wrappedEnsoGreeter = pkgs.runCommand "lightdm-enso-os-greeter" {
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
preferLocalBuild = true;
|
||||
} ''
|
||||
# This wrapper ensures that we actually get themes
|
||||
makeWrapper ${pkgs.lightdm-enso-os-greeter}/bin/pantheon-greeter \
|
||||
$out/greeter \
|
||||
--prefix PATH : "${pkgs.glibc.bin}/bin" \
|
||||
--set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
|
||||
--set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
|
||||
--set GTK_EXE_PREFIX "${theme}" \
|
||||
--set GTK_DATA_PREFIX "${theme}" \
|
||||
--set XDG_DATA_DIRS "${theme}/share:${icons}/share:${cursors}/share" \
|
||||
--set XDG_CONFIG_HOME "${theme}/share"
|
||||
|
||||
cat - > $out/lightdm-enso-os-greeter.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=LightDM Greeter
|
||||
Comment=This runs the LightDM Greeter
|
||||
Exec=$out/greeter
|
||||
Type=Application
|
||||
EOF
|
||||
'';
|
||||
|
||||
ensoGreeterConf = pkgs.writeText "lightdm-enso-os-greeter.conf" ''
|
||||
[greeter]
|
||||
default-wallpaper=${ldmcfg.background}
|
||||
|
@ -144,10 +118,16 @@ in {
|
|||
config = mkIf (ldmcfg.enable && cfg.enable) {
|
||||
environment.etc."lightdm/greeter.conf".source = ensoGreeterConf;
|
||||
|
||||
environment.systemPackages = [
|
||||
cursors
|
||||
icons
|
||||
theme
|
||||
];
|
||||
|
||||
services.xserver.displayManager.lightdm = {
|
||||
greeter = mkDefault {
|
||||
package = wrappedEnsoGreeter;
|
||||
name = "lightdm-enso-os-greeter";
|
||||
package = pkgs.lightdm-enso-os-greeter.xgreeters;
|
||||
name = "pantheon-greeter";
|
||||
};
|
||||
|
||||
greeters = {
|
||||
|
|
|
@ -15,34 +15,6 @@ let
|
|||
icons = cfg.iconTheme.package;
|
||||
cursors = cfg.cursorTheme.package;
|
||||
|
||||
# The default greeter provided with this expression is the GTK greeter.
|
||||
# Again, we need a few things in the environment for the greeter to run with
|
||||
# fonts/icons.
|
||||
wrappedGtkGreeter = pkgs.runCommand "lightdm-gtk-greeter" {
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
preferLocalBuild = true;
|
||||
} ''
|
||||
# This wrapper ensures that we actually get themes
|
||||
makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
|
||||
$out/greeter \
|
||||
--prefix PATH : "${lib.getBin pkgs.stdenv.cc.libc}/bin" \
|
||||
--set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
|
||||
--set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
|
||||
--set GTK_EXE_PREFIX "${theme}" \
|
||||
--set GTK_DATA_PREFIX "${theme}" \
|
||||
--set XDG_DATA_DIRS "${theme}/share:${icons}/share" \
|
||||
--set XDG_CONFIG_HOME "${theme}/share" \
|
||||
--set XCURSOR_PATH "${cursors}/share/icons"
|
||||
|
||||
cat - > $out/lightdm-gtk-greeter.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=LightDM Greeter
|
||||
Comment=This runs the LightDM Greeter
|
||||
Exec=$out/greeter
|
||||
Type=Application
|
||||
EOF
|
||||
'';
|
||||
|
||||
gtkGreeterConf = writeText "lightdm-gtk-greeter.conf"
|
||||
''
|
||||
[greeter]
|
||||
|
@ -185,10 +157,16 @@ in
|
|||
config = mkIf (ldmcfg.enable && cfg.enable) {
|
||||
|
||||
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
||||
package = wrappedGtkGreeter;
|
||||
package = pkgs.lightdm_gtk_greeter.xgreeters;
|
||||
name = "lightdm-gtk-greeter";
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
cursors
|
||||
icons
|
||||
theme
|
||||
];
|
||||
|
||||
environment.etc."lightdm/lightdm-gtk-greeter.conf".source = gtkGreeterConf;
|
||||
|
||||
};
|
||||
|
|
|
@ -8,11 +8,6 @@ let
|
|||
ldmcfg = dmcfg.lightdm;
|
||||
cfg = ldmcfg.greeters.mini;
|
||||
|
||||
xgreeters = pkgs.linkFarm "lightdm-mini-greeter-xgreeters" [{
|
||||
path = "${pkgs.lightdm-mini-greeter}/share/xgreeters/lightdm-mini-greeter.desktop";
|
||||
name = "lightdm-mini-greeter.desktop";
|
||||
}];
|
||||
|
||||
miniGreeterConf = pkgs.writeText "lightdm-mini-greeter.conf"
|
||||
''
|
||||
[greeter]
|
||||
|
@ -90,7 +85,7 @@ in
|
|||
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
|
||||
|
||||
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
||||
package = xgreeters;
|
||||
package = pkgs.lightdm-mini-greeter.xgreeters;
|
||||
name = "lightdm-mini-greeter";
|
||||
};
|
||||
|
||||
|
|
|
@ -8,11 +8,6 @@ let
|
|||
ldmcfg = dmcfg.lightdm;
|
||||
cfg = ldmcfg.greeters.pantheon;
|
||||
|
||||
xgreeters = pkgs.linkFarm "pantheon-greeter-xgreeters" [{
|
||||
path = "${pkgs.pantheon.elementary-greeter}/share/xgreeters/io.elementary.greeter.desktop";
|
||||
name = "io.elementary.greeter.desktop";
|
||||
}];
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -33,17 +28,10 @@ in
|
|||
|
||||
config = mkIf (ldmcfg.enable && cfg.enable) {
|
||||
|
||||
warnings = [
|
||||
''
|
||||
The Pantheon greeter is suboptimal in NixOS and can possibly put you in
|
||||
a situation where you cannot start a session when switching desktopManagers.
|
||||
''
|
||||
];
|
||||
|
||||
services.xserver.displayManager.lightdm.greeters.gtk.enable = false;
|
||||
|
||||
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
||||
package = xgreeters;
|
||||
package = pkgs.pantheon.elementary-greeter.xgreeters;
|
||||
name = "io.elementary.greeter";
|
||||
};
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ in
|
|||
password required pam_deny.so
|
||||
|
||||
session required pam_succeed_if.so audit quiet_success user = lightdm
|
||||
session required pam_env.so envfile=${config.system.build.pamEnvironment}
|
||||
session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
|
||||
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_permit.so
|
||||
|
|
|
@ -219,8 +219,6 @@ in
|
|||
# Load themes from system environment
|
||||
QT_PLUGIN_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtPluginPrefix;
|
||||
QML2_IMPORT_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtQmlPrefix;
|
||||
|
||||
XDG_DATA_DIRS = "/run/current-system/sw/share";
|
||||
};
|
||||
|
||||
execCmd = "exec /run/current-system/sw/bin/sddm";
|
||||
|
@ -242,7 +240,7 @@ in
|
|||
password required pam_deny.so
|
||||
|
||||
session required pam_succeed_if.so audit quiet_success user = sddm
|
||||
session required pam_env.so envfile=${config.system.build.pamEnvironment}
|
||||
session required pam_env.so conffile=${config.system.build.pamEnvironment} readenv=0
|
||||
session optional ${pkgs.systemd}/lib/security/pam_systemd.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_permit.so
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue