174135 Commits

Author SHA1 Message Date
Silvan Mosberger
fc48a70f7b
Merge pull request #57497 from r-ryantm/auto-update/urh
urh: 2.5.5 -> 2.5.6
2019-03-14 20:23:58 +01:00
Will Dietz
3e7e61f334
Merge pull request #57543 from dtzWill/update/llvm8-rc5
llvmPackages_8: rc2 -> rc5
2019-03-14 14:19:51 -05:00
Will Dietz
bf20713a63
Merge pull request #57606 from dtzWill/feature/vttest
vttest: init at 20190105
2019-03-14 14:19:30 -05:00
Will Dietz
4c024d6368
Merge pull request #57349 from dtzWill/update/libcmis-0.5.2
libcmis: 0.5.0 -> 0.5.2, new home, fix and enable tests + man
2019-03-14 14:17:59 -05:00
xeji
65bba7cbdf
Merge pull request #57454 from alyssais/linux-libre
linux_latest-libre: fix build
2019-03-14 20:08:23 +01:00
aszlig
9e9af4f9c0
nixos/confinement: Allow to include the full unit
From @edolstra at [1]:

  BTW we probably should take the closure of the whole unit rather than
  just the exec commands, to handle things like Environment variables.

With this commit, there is now a "fullUnit" option, which can be enabled
to include the full closure of the service unit into the chroot.

However, I did not enable this by default, because I do disagree here
and *especially* things like environment variables or environment files
shouldn't be in the closure of the chroot.

For example if you have something like:

  { pkgs, ... }:

  {
    systemd.services.foobar = {
      serviceConfig.EnvironmentFile = ${pkgs.writeText "secrets" ''
        user=admin
        password=abcdefg
      '';
    };
  }

We really do not want the *file* to end up in the chroot, but rather
just the environment variables to be exported.

Another thing is that this makes it less predictable what actually will
end up in the chroot, because we have a "globalEnvironment" option that
will get merged in as well, so users adding stuff to that option will
also make it available in confined units.

I also added a big fat warning about that in the description of the
fullUnit option.

[1]: https://github.com/NixOS/nixpkgs/pull/57519#issuecomment-472855704

Signed-off-by: aszlig <aszlig@nix.build>
2019-03-14 20:04:33 +01:00
Silvan Mosberger
5cc7ce99b8
Merge pull request #57553 from Kiwi/vim-plugins-fix
vim-plugins: typo propogatedBuildInputs -> propagatedBuildInputs
2019-03-14 20:00:02 +01:00
xeji
f2e55341af
Merge pull request #57648 from vdemeester/update-kail
kail: 0.7.0 -> 0.8.0
2019-03-14 19:59:42 +01:00
xeji
ef1cdfb9a7
Merge pull request #57646 from vdemeester/update-containerd
containerd: 1.2.4 -> 1.2.5
2019-03-14 19:55:12 +01:00
Silvan Mosberger
28a2bc88f4
Merge pull request #56465 from smaximov/overmind-2.0.1
overmind: 1.2.1 -> 2.0.1
2019-03-14 19:54:51 +01:00
Alex Branham
8dcba2b842 R: update CRAN and Bioconductor package sets
Closes https://github.com/NixOS/nixpkgs/pull/57423.
2019-03-14 19:50:37 +01:00
Alex Branham
1e354a7e40 R: 3.5.2 -> 3.5.3
Closes https://github.com/NixOS/nixpkgs/pull/57400.
2019-03-14 19:50:37 +01:00
Silvan Mosberger
2dd638e877
Merge pull request #56426 from catern/xmonad
xmonad-with-packages: add xmonad-contrib to packages by default
2019-03-14 19:50:00 +01:00
Meghea Iulian
e6069617cb gitkraken: 4.2.2 -> 5.0.1 (#57655)
gitkraken: 4.2.2 -> 5.0.1
2019-03-14 19:45:37 +01:00
Dmitry Kalinkin
9034847242
Merge pull request #57493 from marius851000/openmw
openmw: 0.43 -> 0.44
2019-03-14 14:34:54 -04:00
Ingo Blechschmidt
1703627f88 kfind: init at 18.12.1 2019-03-14 19:23:46 +01:00
Stephen
08e4d7cf69 apmplanner2: fix build
see ArduPilot/apm_planner#1166
2019-03-14 11:23:20 -07:00
aszlig
46f7dd436f
nixos/confinement: Allow to configure /bin/sh
Another thing requested by @edolstra in [1]:

  We should not provide a different /bin/sh in the chroot, that's just
  asking for confusion and random shell script breakage. It should be
  the same shell (i.e. bash) as in a regular environment.

While I personally would even go as far to even have a very restricted
shell that is not even a shell and basically *only* allows "/bin/sh -c"
with only *very* minimal parsing of shell syntax, I do agree that people
expect /bin/sh to be bash (or the one configured by environment.binsh)
on NixOS.

So this should make both others and me happy in that I could just use
confinement.binSh = "${pkgs.dash}/bin/dash" for the services I confine.

[1]: https://github.com/NixOS/nixpkgs/pull/57519#issuecomment-472855704

Signed-off-by: aszlig <aszlig@nix.build>
2019-03-14 19:14:05 +01:00
aszlig
0ba48f46da
nixos/systemd-chroot: Rename chroot to confinement
Quoting @edolstra from [1]:

  I don't really like the name "chroot", something like "confine[ment]"
  or "restrict" seems better. Conceptually we're not providing a
  completely different filesystem tree but a restricted view of the same
  tree.

I already used "confinement" as a sub-option and I do agree that
"chroot" sounds a bit too specific (especially because not *only* chroot
is involved).

So this changes the module name and its option to use "confinement"
instead of "chroot" and also renames the "chroot.confinement" to
"confinement.mode".

[1]: https://github.com/NixOS/nixpkgs/pull/57519#issuecomment-472855704

Signed-off-by: aszlig <aszlig@nix.build>
2019-03-14 19:14:03 +01:00
aszlig
ac64ce9945
nixos: Add 'chroot' options to systemd.services
Currently, if you want to properly chroot a systemd service, you could
do it using BindReadOnlyPaths=/nix/store (which is not what I'd call
"properly", because the whole store is still accessible) or use a
separate derivation that gathers the runtime closure of the service you
want to chroot. The former is the easier method and there is also a
method directly offered by systemd, called ProtectSystem, which still
leaves the whole store accessible. The latter however is a bit more
involved, because you need to bind-mount each store path of the runtime
closure of the service you want to chroot.

This can be achieved using pkgs.closureInfo and a small derivation that
packs everything into a systemd unit, which later can be added to
systemd.packages. That's also what I did several times[1][2] in the
past.

However, this process got a bit tedious, so I decided that it would be
generally useful for NixOS, so this very implementation was born.

Now if you want to chroot a systemd service, all you need to do is:

  {
    systemd.services.yourservice = {
      description = "My Shiny Service";
      wantedBy = [ "multi-user.target" ];

      chroot.enable = true;
      serviceConfig.ExecStart = "${pkgs.myservice}/bin/myservice";
    };
  }

If more than the dependencies for the ExecStart* and ExecStop* (which
btw. also includes "script" and {pre,post}Start) need to be in the
chroot, it can be specified using the chroot.packages option. By
default (which uses the "full-apivfs"[3] confinement mode), a user
namespace is set up as well and /proc, /sys and /dev are mounted
appropriately.

In addition - and by default - a /bin/sh executable is provided as well,
which is useful for most programs that use the system() C library call
to execute commands via shell. The shell providing /bin/sh is dash
instead of the default in NixOS (which is bash), because it's way more
lightweight and after all we're chrooting because we want to lower the
attack surface and it should be only used for "/bin/sh -c something".

Prior to submitting this here, I did a first implementation of this
outside[4] of nixpkgs, which duplicated the "pathSafeName" functionality
from systemd-lib.nix, just because it's only a single line.

However, I decided to just re-use the one from systemd here and
subsequently made it available when importing systemd-lib.nix, so that
the systemd-chroot implementation also benefits from fixes to that
functionality (which is now a proper function).

Unfortunately, we do have a few limitations as well. The first being
that DynamicUser doesn't work in conjunction with tmpfs, because it
already sets up a tmpfs in a different path and simply ignores the one
we define. We could probably solve this by detecting it and try to
bind-mount our paths to that different path whenever DynamicUser is
enabled.

The second limitation/issue is that RootDirectoryStartOnly doesn't work
right now, because it only affects the RootDirectory option and not the
individual bind mounts or our tmpfs. It would be helpful if systemd
would have a way to disable specific bind mounts as well or at least
have some way to ignore failures for the bind mounts/tmpfs setup.

Another quirk we do have right now is that systemd tries to create a
/usr directory within the chroot, which subsequently fails. Fortunately,
this is just an ugly error and not a hard failure.

[1]: https://github.com/headcounter/shabitica/blob/3bb01728a0237ad5e7/default.nix#L43-L62
[2]: https://github.com/aszlig/avonc/blob/dedf29e092481a33dc/nextcloud.nix#L103-L124
[3]: The reason this is called "full-apivfs" instead of just "full" is
     to make room for a *real* "full" confinement mode, which is more
     restrictive even.
[4]: https://github.com/aszlig/avonc/blob/92a20bece4df54625e/systemd-chroot.nix

Signed-off-by: aszlig <aszlig@nix.build>
2019-03-14 19:14:01 +01:00
Matthew Bauer
b703c4d998 plasma5: fix typo from pr #57037
Thanks @Yarny0
2019-03-14 14:09:13 -04:00
Wael M. Nasreddine
d45408bd48
mod: init at 0.2.0 2019-03-14 11:03:47 -07:00
Janne Heß
531171e1c9 tt-rss-theme-feedly: Package additional themes 2019-03-14 19:01:32 +01:00
Aria Edmonds
2a2fe2bea4 obs-studio: 22.0.3 -> 23.0.2 2019-03-15 04:38:20 +11:00
Wael M. Nasreddine
8f8e71c0a1
hetzner-kube: set the version via ldflags 2019-03-14 10:31:20 -07:00
Wael M. Nasreddine
8f5b40591d
hetzner-kube: 0.3.2rc1 -> 0.4.1 using buildGoModule 2019-03-14 10:31:19 -07:00
Wael M. Nasreddine
554406b510
todoist: use buildGoModule instead of buildGoPackage 2019-03-14 10:31:18 -07:00
Wael M. Nasreddine
a7586b3055
terminal-parrot: 1.1.0 -> 1.1.1 using buildGoModule 2019-03-14 10:31:17 -07:00
Wael M. Nasreddine
cfbe152ae8
terminal-parrot: indent and use version when fetching dependencies 2019-03-14 10:31:16 -07:00
Wael M. Nasreddine
6ee0d3604e
gotools: use buildGoModule instead of buildGoPackage 2019-03-14 10:31:15 -07:00
Wael M. Nasreddine
1a4cccd561
gotools: 2019-02-11 -> 2019-03-05 2019-03-14 10:31:14 -07:00
Wael M. Nasreddine
3c7f228e49
hugo: use buildGoModule instead of buildGoPackage 2019-03-14 10:31:13 -07:00
Wael M. Nasreddine
ff110364a4
pet: use buildGoModule instead of buildGoPackage 2019-03-14 10:31:12 -07:00
Wael M. Nasreddine
a51627585f
jx: use buildGoModule instead of buildGoPackage 2019-03-14 10:31:11 -07:00
Wael M. Nasreddine
28435e47b1
buildGoModule: function for packaging Go modules
The function buildGoModule builds Go programs managed with Go modules. It builds
a Go module through a two phase build:

- An intermediate fetcher derivation. This derivation will be used to
  fetch all of the dependencies of the Go module.
- A final derivation will use the output of the intermediate derivation
  to build the binaries and produce the final output.
2019-03-14 10:31:02 -07:00
Robert Schütz
badca37c51
Merge pull request #57621 from dtzWill/update/pyxlib-0.25
pythonPackages.xlib: 0.17 -> 0.25, enable tests
2019-03-14 18:20:46 +01:00
Robert Schütz
ec95b91b30 plover.stable: add setuptools_scm to nativeBuildInputs 2019-03-14 18:17:34 +01:00
Will Dietz
5a302b2005 pythonPackages.xlib: 0.17 -> 0.25, enable tests
https://github.com/python-xlib/python-xlib/releases/tag/0.25

(and the releases along the way)
2019-03-14 18:17:28 +01:00
worldofpeace
72679615a1 pythonPackages.weboob: add pyqt5 as native input
Didn't notice it wasn't there. This should make it so we
don't have to set the environment variable anymore.
2019-03-14 13:13:00 -04:00
Dmitry Kalinkin
ec4bdc860e
nsis: use zlib outputs directly 2019-03-14 12:59:38 -04:00
Dmitry Kalinkin
f929120b1b
nsis: don't disable stripping 2019-03-14 12:56:03 -04:00
Dmitry Kalinkin
dc04edc6ae
nsis: refactor to use scons setup-hook 2019-03-14 12:53:36 -04:00
Vincent Demeester
f73f0e5e2e
kail: 0.7.0 -> 0.8.0
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2019-03-14 17:24:26 +01:00
Vincent Demeester
115dde6d33
containerd: 1.2.4 -> 1.2.5
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2019-03-14 17:05:29 +01:00
Jörg Thalheim
8f9e283f92
Merge pull request #56959 from ck3d/ghidra
initial ghidra-9.0
2019-03-14 15:54:30 +00:00
marius851000
2d03ed2f8d openmw: force the need of qt5 2019-03-14 15:53:34 +01:00
Ryan Mulligan
8c0abe74f0
Merge pull request #57366 from r-ryantm/auto-update/pius
pius: 2.2.6 -> 2.2.7
2019-03-14 07:41:32 -07:00
Jan Malakhovski
2bc525350a treewide: stdenv.config -> config
That attribute does not exist.
2019-03-14 14:01:21 +00:00
Jan Malakhovski
67a7b42167 pkgs/stdenv/booter.nix: fix a typo 2019-03-14 14:01:20 +00:00
Tim Steinbach
c22922e251
linux: 5.0.1 -> 5.0.2 2019-03-14 09:13:17 -04:00