Commit graph

54 commits

Author SHA1 Message Date
Vladimír Čunát a1ae627362
nixos GDM: fix #19896
- As noted on github, GDM needs different parameters for X.
- Making xserverArgs a true list instead of concat-string helps to
  filter it and it feels more correct anyway.
- Tested: gdm+gnome, lightdm+gnome.  There seems to be no logout option
  in gnome, and gdm doesn't offer other sessions, but maybe these are normal.
2016-12-04 14:54:31 +01:00
Vladimír Čunát 8ebfce0eda
display-managers module: improve variable quoting
Fixes #20713, though I'm certain nixpkgs contains loads of places
without proper quoting, as (ba)sh unfortunately encourages that.

The only plus side is that most of such problems in nixpkgs aren't
actually security problems but mere annoyance to those who are foolish
enough to use "weird" characters in critical names.
2016-11-26 11:23:31 +01:00
Peter Hoeg 639e5401ff dbus: add socket activation but do not enable it
The following changes are included:

1) install user unit files from upstream dbus
2) use absolute paths to config for --system and --session instances
3) make socket activation of user units configurable

There has been a number of PRs to address this, so this one does the
bare minimum, which is to make the functionality available and
configurable but defaults to off.

Related PRs:
 - #18382
 - #18222

(cherry picked from commit f7215c9b5b47dfb0a6dbe87ff33d7730729a32e5)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-09-30 13:14:53 +02:00
Domen Kožar 4af09e0031 Merge pull request #14311 from Profpatsch/mkRemovedOptionModule-replacement
mkRemovedOptionModule: add replacement argument
2016-08-28 13:55:28 +02:00
Tuomas Tynkkynen 01c197df68 glib: Add some FIXMEs about inappropriate outputs 2016-08-23 05:05:42 +03:00
Benno Fünfstück be625ad36b xsession: fix multiple arguments with logToJournal
KDM and LightDM (at least with autologin) call the xsession-script with
two arguments: the first is the path of the xsession script itself,
while the second one are the actual arguments. The line to re-exec the
script under systemd-cat only forwarded a single argument, therefore
breaking LightDM and KDM login. This commit fixes the issue by always
forwarding all the arguments.
2016-07-17 18:54:23 +02:00
Profpatsch 16c923cef2 modules/mkRemovedOptionModule: add replacement doc
When displaying a warning about a removed Option we should always
include reasoning why it was removed and how to get the same
functionality without it.

Introduces such a description argument and patches occurences (mostly
with an empty string).

startGnuPGAgent: further notes on replacement
2016-05-29 00:42:08 +02:00
obadz 331fa2feff xsession: fix variable read before set introduced in c99608c 2016-05-25 17:47:36 +01:00
Eelco Dolstra c99608c638 Add an option to write the X session log to the journal
... rather than ~/.xsession-errors. It might make sense to make this
the default, in order to eliminate ad hoc, uncentralised, poorly
discoverable log files.
2016-05-24 21:46:38 +02:00
Christoph Ruegge 769a33bedd xsession: make updating DBus environment optional 2016-04-25 23:37:18 +02:00
Christoph Ruegge f270af1acd xsession: Update DBus activation environment
`dbus-launch` is executed early in the script, before desktop managers
had a chance to setup the environment. If DBus activation is used,
applications launched by this may therefore lack necessary environment
variables. This patch sends the complete environment to DBus after
launching the desktop manager.
2016-04-15 21:43:42 +02:00
Vladimír Čunát ab15a62c68 Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
2016-04-01 10:06:01 +02:00
Peter Simons 5391882ebd services.xserver.startGnuPGAgent: remove obsolete NixOS option
GnuPG 2.1.x changed the way the gpg-agent works, and that new approach no
longer requires (or even supports) the "start everything as a child of the
agent" scheme we've implemented in NixOS for older versions.

To configure the gpg-agent for your X session, add the following code to
~/.xsession or some other appropriate place that's sourced at start-up:

    gpg-connect-agent /bye
    GPG_TTY=$(tty)
    export GPG_TTY

If you want to use gpg-agent for SSH, too, also add the settings

    unset SSH_AGENT_PID
    export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh"

and make sure that

    enable-ssh-support

is included in your ~/.gnupg/gpg-agent.conf.

The gpg-agent(1) man page has more details about this subject, i.e. in the
"EXAMPLES" section.
2016-03-18 11:06:31 +01:00
Vladimír Čunát 09af15654f Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
2016-03-08 09:58:19 +01:00
Domen Kožar 02c7d65bf9 fix NixOS eval 2016-02-28 09:36:23 +00:00
Domen Kožar 8b2be11b13 note the desktopManagerHandlesLidAndPower removal 2016-02-28 08:33:14 +00:00
Domen Kožar 4c17d3892b Merge pull request #9727 from Profpatsch/dm-lid-management
remove desktopManagerHandlesLidAndPower
2016-02-28 08:28:17 +00:00
Vladimír Čunát d039c87984 Merge branch 'master' into closure-size 2016-02-14 08:33:51 +01:00
Vladimír Čunát a115bff08c Merge branch 'master' into staging 2016-02-07 13:52:42 +01:00
Nikolay Amiantov ae662cdb11 display-manager module: load pulseaudio's module-device-manager only for KDE 2016-02-04 13:59:17 +03:00
Vladimír Čunát ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Nikolay Amiantov b52acfdf01 nixos xserver: remove vaapiDrivers
Use hardware.opengl.extraPackages instead.
2016-01-26 13:42:40 +03:00
Vladimír Čunát f9f6f41bff Merge branch 'master' into closure-size
TODO: there was more significant refactoring of qtbase and plasma 5.5
on master, and I'm deferring pointing to correct outputs to later.
2015-12-31 09:53:02 +01:00
obadz 9be012f0d4 lightdm & xserver service: add ability to spawn more than one X server
- if xserver.tty and/or display are set to null, then don't specify
  them, or the -logfile argument in the xserverArgs
- For lightdm, we set default tty and display to null and we determine
  those at runtime based on arguments passed. This is necessary because
  we run multiple X servers so they can't all be on the same display
2015-12-15 08:49:28 -06:00
Tuomas Tynkkynen db81e22148 treewide: Mass-replace 'xorgserver}/bin' with correct output
vcunat added one fix in xdummy.
2015-10-28 10:17:12 +01:00
Vladimír Čunát 783c40eb68 dbus: split into multiple outputs and fix referrers 2015-10-13 20:19:01 +02:00
Vladimír Čunát 8db97583ae pulseaudio: split the "dev" output
This is meant mainly for the `libpulseaudio` attribute.
2015-10-13 20:18:56 +02:00
Eelco Dolstra 1b728846a8 Shut up a KDE warning when a user first logs in
It was complaining about not having write permission to
$HOME/.local/share/user-places.xbel (because .local/share didn't exist
yet).
2015-09-28 15:14:44 +02:00
Profpatsch 85898da27a Remove desktopManagerHandlesLidAndPower
As discussed on https://github.com/NixOS/nixpkgs/pull/9642, the option
is not necessary because all desktop managers already stopped handling
it (and delegated to systemd).
2015-09-08 18:12:17 +02:00
Eelco Dolstra f223448d5d Shorten inhibit message
This also makes it consistent with KDE's inhibit message.
2015-09-03 13:03:14 +02:00
Profpatsch 44c12dc0ff desktopManagerHandlesLidAndPower default false`
Changes the option and explicitely sets it for each desktopManager.

Reasoning: Currently,
services.xserver.displayManager.desktopManagerHandlesLidAndPower is set
to true by default. This creates a problem for users without desktop
environments activated, since lid management simply doesn't work
(and they have to be lucky to find this option).

See issue #9671
2015-09-01 12:14:44 +02:00
Vladimír Čunát b92c4a51e6 desktop and xmonad wrappers: preferLocalBuild
Also no substitution.
2015-09-01 09:43:37 +02:00
Luca Bruno f00440fac5 nixos/x11: start session with dbus-launch
This is needed by most window managers. Desktop environments
usually launch dbus-launch if a session hasn't been started yet
so this shouldn't hurt. The worst it can happen is that one
dbus session will be unused in case it's started twice.

The GDM change is backported from recent gdm.
2015-06-22 16:12:20 +00:00
Damien Cassou 90912f8aa5 Merge pull request #8401 from DamienCassou/document-desktopManagerHandlesLidAndPower-in-systemd
Explanation to desktopManagerHandlesLidAndPower
2015-06-19 14:02:04 +02:00
Damien Cassou 26e424a4aa Explanation to desktopManagerHandlesLidAndPower
With this patch, systemd-inhibit outputs a descriptive message when
desktopManagerHandlesLidAndPower=true (the default).

Before the patch:

    $ systemd-inhibit
         Who: /nix/store/[...]-xsession [...] (UID 1000/cassou, PID 18561/systemd-inhibit)
        What: handle-power-key:handle-lid-switch
         Why: Unknown reason
        Mode: block

After the patch:

    $ systemd-inhibit
         Who: /nix/store/[...]-xsession [...] (UID 1000/cassou, PID 18561/systemd-inhibit)
        What: handle-power-key:handle-lid-switch
         Why: See NixOS configuration option 'services.xserver.displayManager.desktopManagerHandlesLidAndPower' for more information.
        Mode: block
2015-06-19 11:16:32 +02:00
Luca Bruno d5628c982d Bypass /etc/gdm/Xsession. Closes #8351 2015-06-16 11:20:20 +00:00
William A. Kennington III 4940e643cc nixos/display-manager: Support configurable hidden users 2015-03-09 18:10:31 -07:00
Eelco Dolstra 36d0f367de ssh-agent: Fix asking for confirmation via $SSH_ASKPASS
This was lost back in
ffedee6ed5. Getting this to work is
slightly tricky because ssh-agent runs as a user unit, and so doesn't
know the user's $DISPLAY.
2015-02-25 14:31:17 +01:00
Thomas Tuegel 0fee7a2b21 fontconfig: stringify dpi correctly 2015-02-01 16:18:48 -06:00
Luca Bruno 79209e30b5 nixos: Add -verbose to xserverArgs example 2014-12-22 21:01:12 +01:00
Thomas Tuegel 8991ff7ceb Load default Fontconfig settings into Xresources for Xft 2014-12-08 10:55:24 -06:00
Pascal Wittmann d6e87f1749 Try to load Xresources, if that fails fall back to Xdefaults. Closes #4670 2014-11-08 15:25:40 +01:00
Kirill Elagin 0c6d49da7d xsession: Start the right pulseaudio binary
Fixes #4663.
2014-10-27 15:43:19 +03:00
Eelco Dolstra ec4f38c56f Manual: Remove some option defaults that refer to store paths
Option defaults should not refer to store paths, because they cause
the manual to be rebuilt gratuitously. It's especially bad to refer to
a highly variable path like a computed configuration file.
2014-09-18 16:21:26 +02:00
aszlig 8a56a55bb4
nixos/manual: Use literalExample when feasible.
Should bring most of the examples into a better consistency regarding
syntactic representation in the manual.

Thanks to @devhell for reporting.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-08-27 23:41:15 +02:00
Eelco Dolstra ffedee6ed5 Start ssh-agent as a user unit
This has some advantages:

* You get ssh-agent regardless of how you logged in. Previously it was
  only started for X11 sessions.

* All sessions of a user share the same agent. So if you added a key
  on tty1, it will also be available on tty2.

* Systemd will restart ssh-agent if it dies.

* $SSH_AUTH_SOCK now points to the /run/user/<uid> directory, which is
  more secure than /tmp.

For bonus points, we should patch ssh-agent to support socket-based
activation...
2014-04-18 00:45:26 +02:00
Eelco Dolstra 29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Pascal Wittmann badb4753e4 Allow the user to execute commands at the beginning of the X session.
The difference between xsession and xprofile is that xsession is exec'd and xprofile is sourced.
So with xprofile all commands after sourcing will still be exectued. This allows for instance
autostarting of applications while configuring the start of a window manager via configuration.nix.
2014-01-02 11:38:44 +01:00
Eelco Dolstra e62e15b2f9 Only run systemd-inhibit for local X11 sessions 2013-11-08 16:39:22 +01:00
Eelco Dolstra 408b8b5725 Add lots of missing option types 2013-10-30 18:47:43 +01:00