Commit graph

568 commits

Author SHA1 Message Date
worldofpeace 4ba10fbbfd
Merge pull request #66990 from worldofpeace/gnome-vte-config
nixos/gnome-terminal: init
2019-08-21 16:17:05 -04:00
worldofpeace 79dd78b911 nixos/vte: init
This module correctly includes the vte.sh script
required for vte terminals like gnome-terminal to show the
CWD in the window title and preserved across instances.

This is achieved with the options:
* programs.bash.vteIntegration
* programs.zsh.vteIntegration

as it's best to keep this configuration unguarded by gnome3.enable
to support other vte terminals (such as elementary-terminal).
Note the distinction between Zsh and Bash doesn't include
a different script, as this script only supports those two shells.
2019-08-21 16:16:04 -04:00
Jan Tojnar d736138b00
Merge pull request #67071 from jtojnar/fontconfig-harmonization
nixos/fontconfig: harmonize with penultimate
2019-08-21 17:44:30 +02:00
worldofpeace 1d0d69a214 nixos/qt5: init
This moduule has the following options:
* platformTheme
* style

This allows us to configure the Qt5 theme engine and style.
2019-08-20 12:24:55 -04:00
Jan Tojnar 67367587eb
nixos/fontconfig: harmonize comments 2019-08-20 13:59:28 +02:00
Jan Tojnar e7dc9d0b90
nixos/fontconfig: harmonize file names 2019-08-20 13:57:46 +02:00
Jan Tojnar 0d4fc97686
nixos/fontconfig: harmonize folder variables 2019-08-20 13:56:00 +02:00
Jan Tojnar be2cf1f093
nixos/fontconfig: harmonize indentation 2019-08-20 13:54:18 +02:00
Jan Tojnar 1a3f604de3
nixos/fontconfig-penultimate: reorder
to be more in line with fontconfig.nix
2019-08-20 13:50:52 +02:00
Florian Klink 9be0327a49 nixos/systemd: install sysctl snippets
systemd provides two sysctl snippets, 50-coredump.conf and
50-default.conf.

These enable:
 - Loose reverse path filtering
 - Source route filtering
 - `fq_codel` as a packet scheduler (this helps to fight bufferbloat)

This also configures the kernel to pass coredumps to `systemd-coredump`.
These sysctl snippets can be found in `/etc/sysctl.d/50-*.conf`,
and overridden via `boot.kernel.sysctl`
(which will place the parameters in `/etc/sysctl.d/60-nixos.conf`.

Let's start using these, like other distros already do for quite some
time, and remove those duplicate `boot.kernel.sysctl` options we
previously did set.

In the case of rp_filter (which systemd would set to 2 (loose)), make
our overrides to "1" more explicit.
2019-08-18 17:54:26 +02:00
Florian Klink e5965bd489 nixos/sysctl: rename /etc/sysctl.d/nixos.conf -> 60-nixos.conf
sysctl.d(5) recommends prefixing all filenames in /etc/sysctl.d with a
two-digit number and a dash, to simplify the ordering of the files.

Some packages provide custom files, often with "50-" prefix.
To ensure user-supplied configuration takes precedence over the one
specified via `boot.kernel.sysctl`, prefix the file generated there with
"60-".
2019-08-18 17:54:26 +02:00
Matthew Bauer 329e097828
Merge pull request #66425 from Gerschtli/fix/path-order
environment.profiles: fix order of profiles and PATH
2019-08-13 15:06:09 -04:00
Silvan Mosberger a7c7bb156f
clight: init (#64309)
clight: init
2019-08-12 18:18:05 +02:00
Edmund Wu c4de0bf492
timezone.nix -> locale.nix
Also includes geolocation information abstracted from redshift.nix
2019-08-12 11:56:40 -04:00
Tobias Happ 33c834f2fb environment.profiles: fix order of profiles
This change is needed because the order of profiles correlate to the
order in PATH, therefore "/etc/profiles/per-user/$USER" always appeared
after the system packages directories.
2019-08-10 10:28:12 +02:00
worldofpeace 64b4a24047 nixos/xdg/portal: set GTK_USE_PORTAL with lib.mkIf
If lib.optional is given a false value it will return an empty list.
Thusly the set-environment script can have

```
export GTK_USE_PORTAL=
```

This can rub certain bugs the wrong way #65679
so lets make sure this isn't set in the environment
at all.
2019-08-01 17:51:51 -04:00
worldofpeace 1b21c9db91 nixos/xdg: add gtkUsePortal option to portals
Prior to this change GTK_USE_PORTAL was unconditionally
set to "1". For this to not break things you have to have some
sort of portal implementation in extraPortals.

Setting GTK_USE_PORTAL in this manner is actually only useful
when using portals for applications outside flatpak. For example
people using non-flatpak Firefox who want native filechoosers.
It's also WIP for electron applications to support this.
2019-07-29 21:47:09 -04:00
worldofpeace c4d06eff3f nixos/xdg: disable portal (again) 2019-07-26 22:33:49 -04:00
Thomas Tuegel 9235a8eaef
nixos/config/no-x-libs: Fix pinentry arguments 2019-07-24 15:22:07 -05:00
worldofpeace d734750608 nixos/xdg: default portal from xserver.enable
same affect as f84a4ef892
but we won't need to enable the module independently for DE
modules.
2019-07-19 19:47:02 -04:00
Samuel Dionne-Riel f84a4ef892 nixos/xdg: Disables portal by default...
Left to do: re-enable as needed in the usual situations.

This added ~286MiB to the base system closure, which is enough to bring
the sd images over the limit allowed on Hydra.
2019-07-19 19:28:51 -04:00
worldofpeace 69f2836c1b
Merge pull request #64575 from pasqui23/portal
nixos/xdg: add portal option
2019-07-18 20:00:09 -04:00
Pasquale 90b1197301 nixos/xdg: add portal option
This factors the configuration out of the flatpak module.
2019-07-18 19:59:07 -04:00
Nikolay Amiantov 01b90dce78 resolvconf service: init
This is a refactor of how resolvconf is managed on NixOS. We split it
into a separate service which is enabled internally depending on whether
we want /etc/resolv.conf to be managed by it. Various services now take
advantage of those configuration options.

We also now use systemd instead of activation scripts to update
resolv.conf.

NetworkManager now uses the right option for rc-manager DNS
automatically, so the configuration option shouldn't be exposed.
2019-07-15 20:25:39 +03:00
edef 4a405d8995 nixos/networking: filter out empty entries 2019-07-07 00:49:40 +00:00
Joachim Fasting 44b6999614
nixos/malloc: use ld preload
This is more robust than setting via environment variable, though it does come
later in the load sequence.  An added benefit is affecting the current
session.
2019-07-04 19:24:40 +02:00
talyz 80acb28bee networkmanager: Add rc-manager option
Add an option to set the rc-manager parameter in NetworkManager.conf,
which controls how NetworkManager handles resolv.conf. This sets the
default rc-manager to "resolvconf", which solves #61490. It
additionally allows the user to change rc-manager without interference
from configuration activations.
2019-07-03 09:40:05 +00:00
adisbladis b19e8388c9
nixos/pulseaudio: Set speex-float-5 as default resample-method
The upstream default (speex-float-1) results in audible artifacts
2019-05-31 16:05:39 +01:00
Pierre Bourdon 9e60eab8f5
nixos/malloc: apply allocator settings to systemd units
This uses systemd's system.conf/user.conf "DefaultEnvironment" feature
to set the allocator's LD_PRELOAD near-globally.
2019-05-30 12:07:34 +09:00
Pierre Bourdon 1cc8ea7cb4
nixos/malloc: add scudo from LLVM compiler-rt 2019-05-30 02:35:50 +09:00
Bryan Gardiner 2400191caf
nixos/xdg/mime: disable fdatasync when building the XDG MIME database
Back in 2013, update-mime-database started using fdatasync() to write out
its changes after processing each file in /share/mime, with the reasoning
that a corrupted database from an interruption midway would be
problematic for applications[1].  Unfortunately, this caused a
significant regression in the time required to run update-mime-database:
commonly from under a second to half a minute or more.

This delay affects the time required to build system-path on NixOS, when
xdg.mime.enable is true (the default).  For example, on one of my systems
system-path builds in ~48 seconds, 45 of which are update-mime-database.
This makes rapidly building new system configurations not fun.

This commit disables the calls to fdatasync().  update-mime-database
checks an environment variable, PKGSYSTEM_ENABLE_FSYNC, to determine
whether it should sync, and we can set this to false.  system-path
already only has whatever filesystem commit guarantees that the Nix
builder provides.  Furthermore, there is no risk of a failed MIME
database update messing up existing packages, because this is Nix.

(This issue was also reported at and discussed by Debian, Red Hat, and
Gentoo at least.)

[1] https://bugs.freedesktop.org/show_bug.cgi?id=70366
2019-05-25 21:00:25 -07:00
Robin Gloster 6cf583cf2f
Merge pull request #60406 from JohnAZoidberg/remove-isnull
treewide: Remove usage of isNull
2019-05-18 09:36:24 +00:00
Eelco Dolstra de9e238469
FIx some malformed XML in option descriptions
E.g. these were using "<para>" at the *end* of a description. The real
WTF is that this is possible at all...
2019-05-13 09:15:17 +02:00
Joachim Fasting a84be28270
nixos/malloc: configure system-wide malloc provider
Currently, this uses the somewhat crude method of setting LD_PRELOAD in the
system environment.  This works, but should be considered a stepping stone to
a more robust solution.
2019-05-07 13:45:38 +02:00
Daniel Schaefer 786f02f7a4 treewide: Remove usage of isNull
isNull "is deprecated; just write e == null instead" says the Nix manual
2019-04-29 14:05:50 +02:00
Frederik Rietdijk 4a125f6b20 Merge master into staging-next 2019-04-07 08:33:41 +02:00
Pierre Bourdon f8eec8dc34 environment.noXlibs: disable gnome3 support for pinentry (#59051) 2019-04-06 10:06:55 +00:00
Jan Tojnar cb1a20499a
Merge branch 'master' into staging 2019-04-05 11:37:15 +02:00
Florian Klink 8817bbefdb nixos/ldap: set proper User= and Group= for nslcd service
eb90d97009 broke nslcd, as /run/nslcd was
created/chowned as root user, while nslcd wants to do parts as nslcd
user.

This commit changes the nslcd to run with the proper uid/gid from the
start (through User= and Group=), so the RuntimeDirectory has proper
permissions, too.

In some cases, secrets are baked into nslcd's config file during startup
(so we don't want to provide it from the store).

This config file is normally hard-wired to /etc/nslcd.conf, but we don't
want to use PermissionsStartOnly anymore (#56265), and activation
scripts are ugly, so redirect /etc/nslcd.conf to /run/nslcd/nslcd.conf,
which now gets provisioned inside ExecStartPre=.

This change requires the files referenced to in
users.ldap.bind.passwordFile and users.ldap.daemon.rootpwmodpwFile to be
readable by the nslcd user (in the non-nslcd case, this was already the
case for users.ldap.bind.passwordFile)

fixes #57783
2019-03-28 13:08:47 +01:00
Florian Klink 0a1451afe3 nixos/ldap: rename password file options properly
users.ldap.daemon.rootpwmodpw -> users.ldap.daemon.rootpwmodpwFile
users.ldap.bind.password -> users.ldap.bind.passwordFile

as users.ldap.daemon.rootpwmodpw never was part of a release, no
mkRenamedOptionModule is introduced.
2019-03-27 02:53:56 +01:00
Vladimír Čunát 8d502fd425
Merge branch 'staging-next' into staging 2019-03-10 08:05:27 +01:00
Matthew Bauer 8a08d7e7cc
Merge pull request #56031 from matthewbauer/priorities
Add some more priorities
2019-03-09 18:02:55 -05:00
Danylo Hlynskyi ef1911d045 zram: revert "change default algorithm to zstd" (#56856)
19.03 default kernel is still 4.14, which doesn't support zstd. So,
zramSwap in current fasion fails on default kernel.
2019-03-07 02:11:20 +02:00
Matthew Bauer 5dee926eb9
nixos/no-x-libs.nix: override pinentry directly
This is more specific and we avoid having gtk or qt libraries come in at all.
2019-02-27 23:53:50 -05:00
Silvan Mosberger cc98350d55
Merge pull request #55843 from LnL7/nixos-nss-hosts
nixos-nsswitch: add option to configure nssHosts
2019-02-22 23:04:01 +01:00
Daiderd Jordan 11cd761dbf
nixos/nsswitch: add option to configure nssHosts
Enables adding or overriding the default nsswitch hosts in a generic
way for packages without a nixos module.
2019-02-22 23:00:24 +01:00
Symphorien Gibol a915b33315 nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
Matthew Bauer 6fc5ce2c4f nixos/system-path.nix: add 3 to every priority
We can’t use lowPrio here because it erases the differences in
priority of the packages by setting it to a constant value. see this
comment for info:

https://github.com/NixOS/nixpkgs/issues/55886#issuecomment-464766877
2019-02-18 21:16:30 -05:00
Florian Klink d3c2ed21d0
Merge pull request #53762 from ju1m/nslcd
Improving integration of `nslcd`, PAM and `openldap`.
2019-01-30 19:34:40 +01:00
worldofpeace dc923b6ad1 nixos/pulseaudio: disable flat-volumes by default
The motivation for this is that some applications are unaware
of this feature and can set their volume to 100% on startup
harming people ears and possiblly blowing someone's audio
setup.

I noticed this in #54594 and by extension epiphany[0].

Please also note that many other distros have this default for
the reason outlined above.

Closes #5632 #54594

[0]: https://bugzilla.gnome.org/show_bug.cgi?id=675217
2019-01-27 19:51:26 +00:00