Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
FRidh committed Jan 7, 2018
2 parents 175d890 + cde9585 commit 4e6a9f0
Show file tree
Hide file tree
Showing 49 changed files with 673 additions and 322 deletions.
29 changes: 29 additions & 0 deletions nixos/doc/manual/development/writing-nixos-tests.xml
Expand Up @@ -272,8 +272,37 @@ startAll;
</listitem>
</varlistentry>

<varlistentry>
<term><methodname>systemctl</methodname></term>
<listitem>
<para>Runs <literal>systemctl</literal> commands with optional support for
<literal>systemctl --user</literal></para>
<para>
<programlisting>
$machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager`
$machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager`
</programlisting>
</para>
</listitem>
</varlistentry>

</variablelist>

</para>

<para>
To test user units declared by <literal>systemd.user.services</literal> the optional <literal>$user</literal>
argument can be used:

<programlisting>
$machine->start;
$machine->waitForX;
$machine->waitForUnit("xautolock.service", "x-session-user");
</programlisting>

This applies to <literal>systemctl</literal>, <literal>getUnitInfo</literal>,
<literal>waitForUnit</literal>, <literal>startJob</literal>
and <literal>stopJob</literal>.
</para>

</section>
20 changes: 17 additions & 3 deletions nixos/doc/manual/installation/installing-usb.xml
Expand Up @@ -11,10 +11,24 @@ a USB stick. You can use the <command>dd</command> utility to write the image:
<command>dd if=<replaceable>path-to-image</replaceable>
of=<replaceable>/dev/sdb</replaceable></command>. Be careful about specifying the
correct drive; you can use the <command>lsblk</command> command to get a list of
block devices. If you're on macOS you can run <command>diskutil list</command>
to see the list of devices; the device you'll use for the USB must be ejected
before writing the image.</para>
block devices.</para>

<para>On macOS:
<programlisting>
$ diskutil list
[..]
/dev/diskN (external, physical):
#: TYPE NAME SIZE IDENTIFIER
[..]
$ diskutil unmountDisk diskN
Unmount of all volumes on diskN was successful
$ sudo dd bs=1m if=nix.iso of=/dev/rdiskN
</programlisting>
Using the 'raw' <command>rdiskN</command> device instead of <command>diskN</command>
completes in minutes instead of hours. After <command>dd</command> completes, a GUI
dialog "The disk you inserted was not readable by this computer" will pop up, which
can be ignored.</para>

<para>The <command>dd</command> utility will write the image verbatim to the drive,
making it the recommended option for both UEFI and non-UEFI installations. For
non-UEFI installations, you can alternatively use
Expand Down
7 changes: 7 additions & 0 deletions nixos/doc/manual/release-notes/rl-1803.xml
Expand Up @@ -234,6 +234,13 @@ following incompatible changes:</para>
to your <literal>configuration.nix</literal>.
</para>
</listitem>
<listitem>
<para>
The NixOS test driver supports user services declared by <literal>systemd.user.services</literal>.
The methods <literal>waitForUnit</literal>, <literal>getUnitInfo</literal>, <literal>startJob</literal>
and <literal>stopJob</literal> provide an optional <literal>$user</literal> argument for that purpose.
</para>
</listitem>
</itemizedlist>

</section>
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -245,6 +245,7 @@
./services/hardware/udev.nix
./services/hardware/udisks2.nix
./services/hardware/upower.nix
./services/hardware/usbmuxd.nix
./services/hardware/thermald.nix
./services/logging/SystemdJournal2Gelf.nix
./services/logging/awstats.nix
Expand Down
74 changes: 74 additions & 0 deletions nixos/modules/services/hardware/usbmuxd.nix
@@ -0,0 +1,74 @@
{ config, lib, pkgs, ... }:

with lib;

let

defaultUserGroup = "usbmux";
apple = "05ac";

cfg = config.services.usbmuxd;

in

{
options.services.usbmuxd = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Enable the usbmuxd ("USB multiplexing daemon") service. This daemon is
in charge of multiplexing connections over USB to an iOS device. This is
needed for transferring data from and to iOS devices (see ifuse). Also
this may enable plug-n-play tethering for iPhones.
'';
};

user = mkOption {
type = types.str;
default = defaultUserGroup;
description = ''
The user usbmuxd should use to run after startup.
'';
};

group = mkOption {
type = types.str;
default = defaultUserGroup;
description = ''
The group usbmuxd should use to run after startup.
'';
};
};

config = mkIf cfg.enable {

users.extraUsers = optional (cfg.user == defaultUserGroup) {
name = cfg.user;
description = "usbmuxd user";
group = cfg.group;
};

users.extraGroups = optional (cfg.group == defaultUserGroup) {
name = cfg.group;
};

# Give usbmuxd permission for Apple devices
services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTR{idVendor}=="${apple}", GROUP="${cfg.group}"
'';

systemd.services.usbmuxd = {
description = "usbmuxd";
wantedBy = [ "multi-user.target" ];
unitConfig.Documentation = "man:usbmuxd(8)";
serviceConfig = {
# Trigger the udev rule manually. This doesn't require replugging the
# device when first enabling the option to get it to work
ExecStartPre = "${pkgs.libudev}/bin/udevadm trigger -s usb -a idVendor=${apple}";
ExecStart = "${pkgs.usbmuxd}/bin/usbmuxd -U ${cfg.user} -f";
};
};

};
}
11 changes: 8 additions & 3 deletions nixos/modules/services/misc/gitlab.nix
Expand Up @@ -29,8 +29,12 @@ let

gitalyToml = pkgs.writeText "gitaly.toml" ''
socket_path = "${lib.escape ["\""] gitalySocket}"
bin_dir = "${cfg.packages.gitaly}/bin"
prometheus_listen_addr = "localhost:9236"
[git]
bin_path = "${pkgs.git}/bin/git"
[gitaly-ruby]
dir = "${cfg.packages.gitaly.ruby}"
Expand Down Expand Up @@ -104,6 +108,7 @@ let
ldap.enabled = false;
omniauth.enabled = false;
shared.path = "${cfg.statePath}/shared";
gitaly.client_path = "${cfg.packages.gitaly}/bin";
backup.path = "${cfg.backupPath}";
gitlab_shell = {
path = "${cfg.packages.gitlab-shell}";
Expand All @@ -117,8 +122,6 @@ let
};
git = {
bin_path = "git";
max_size = 20971520; # 20MB
timeout = 10;
};
monitoring = {
ip_whitelist = [ "127.0.0.0/8" "::1/128" ];
Expand Down Expand Up @@ -489,7 +492,9 @@ in {
after = [ "network.target" "gitlab.service" ];
wantedBy = [ "multi-user.target" ];
environment.HOME = gitlabEnv.HOME;
path = with pkgs; [ gitAndTools.git cfg.packages.gitaly.rubyEnv ];
environment.GEM_HOME = "${cfg.packages.gitaly.rubyEnv}/${ruby.gemPath}";
environment.GITLAB_SHELL_CONFIG_PATH = gitlabEnv.GITLAB_SHELL_CONFIG_PATH;
path = with pkgs; [ gitAndTools.git cfg.packages.gitaly.rubyEnv ruby ];
serviceConfig = {
#PermissionsStartOnly = true; # preStart must be run as root
Type = "simple";
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/services/security/clamav.nix
Expand Up @@ -97,8 +97,8 @@ in

systemd.services.clamav-daemon = optionalAttrs cfg.daemon.enable {
description = "ClamAV daemon (clamd)";
after = mkIf cfg.updater.enable [ "clamav-freshclam.service" ];
requires = mkIf cfg.updater.enable [ "clamav-freshclam.service" ];
after = optional cfg.updater.enable "clamav-freshclam.service";
requires = optional cfg.updater.enable "clamav-freshclam.service";
wantedBy = [ "multi-user.target" ];
restartTriggers = [ clamdConfigFile ];

Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/system/boot/kernel.nix
Expand Up @@ -197,7 +197,7 @@ in
"mmc_block"

# Support USB keyboards, in case the boot fails and we only have
# a USB keyboard.
# a USB keyboard, or for LUKS passphrase prompt.
"uhci_hcd"
"ehci_hcd"
"ehci_pci"
Expand All @@ -206,7 +206,7 @@ in
"xhci_hcd"
"xhci_pci"
"usbhid"
"hid_generic" "hid_lenovo" "hid_apple" "hid_roccat"
"hid_generic" "hid_lenovo" "hid_apple" "hid_roccat" "hid_logitech_hidpp"

# Misc. keyboard stuff.
"pcips2" "atkbd" "i8042"
Expand Down
22 changes: 11 additions & 11 deletions pkgs/applications/audio/radiotray-ng/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchpatch
{ stdenv, fetchFromGitHub
, cmake, pkgconfig
# Transport
, curl
Expand All @@ -15,6 +15,7 @@
, libappindicator-gtk3
, libnotify
, libxdg_basedir
, wxGTK
# GStreamer
, gst_all_1
# User-agent info
Expand All @@ -39,13 +40,13 @@ let
in
stdenv.mkDerivation rec {
name = "radiotray-ng-${version}";
version = "0.1.7";
version = "0.2.0";

src = fetchFromGitHub {
owner = "ebruck";
repo = "radiotray-ng";
rev = "v${version}";
sha256 = "1m853gzh9r249crn0xyrq22x154r005j58b0kq3nsrgi5cps2zdv";
sha256 = "12mhi0q137cjdpmpczvrcr7szq1ja1r8bm0gh03b925y8xyrqp5z";
};

nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook makeWrapper ];
Expand All @@ -56,6 +57,7 @@ stdenv.mkDerivation rec {
glibmm hicolor_icon_theme gnome3.gsettings_desktop_schemas libappindicator-gtk3 libnotify
libxdg_basedir
lsb-release
wxGTK
] ++ stdenv.lib.optional doCheck gmock
++ gstInputs
++ pythonInputs;
Expand All @@ -65,15 +67,13 @@ stdenv.mkDerivation rec {
--replace /usr $out
substituteInPlace include/radiotray-ng/common.hpp \
--replace /usr $out
'';
patches = [
(fetchpatch {
# Fix menu separators and minor touchup to 'version'
url = "https://github.com/ebruck/radiotray-ng/commit/827e9f1baaa03ab4d8a5fb3aab043e72950eb965.patch";
sha256 = "1aykl6lq4pga34xg5r9mc616gxnd63q6gr8qzg57w6874cj3csrr";
})
];
# We don't find the radiotray-ng-notification icon otherwise
substituteInPlace data/radiotray-ng.desktop \
--replace radiotray-ng-notification radiotray-ng-on
substituteInPlace data/rtng-bookmark-editor.desktop \
--replace radiotray-ng-notification radiotray-ng-on
'';

enableParallelBuilding = true;

Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/editors/android-studio/default.nix
Expand Up @@ -27,9 +27,9 @@ in rec {

preview = mkStudio {
pname = "android-studio-preview";
version = "3.1.0.5"; # "Android Studio 3.1 Canary 6"
build = "173.4506631";
sha256Hash = "10yw27rxv6pfvyl9w18ch63lm85ykj7ssrv87pchvwkmsscaw2zn";
version = "3.1.0.6"; # "Android Studio 3.1 Canary 7"
build = "173.4524538";
sha256Hash = "0rj7swychriznylrr09g0rnj12rymms925xbry85ba72hj1jjf6w";

meta = stable.meta // {
description = "The Official IDE for Android (preview version)";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/editors/eclipse/plugins.nix
Expand Up @@ -424,16 +424,16 @@ rec {

spotbugs = buildEclipsePlugin rec {
name = "spotbugs-${version}";
version = "3.1.0.r201710241414-11c9895";
version = "3.1.1.r201712011030-903b7a0";

srcFeature = fetchurl {
url = "https://spotbugs.github.io/eclipse/features/com.github.spotbugs.plugin.eclipse_${version}.jar";
sha256 = "084dj2bid5issh28j32hi5w9vx5xs829h7d5lbz5hqj1fyn9h6bs";
sha256 = "12z5dbs10h5k567wbmwz1w4pnidmqsls52qcfdb3zlgr0rqvz072";
};

srcPlugin = fetchurl {
url = "https://spotbugs.github.io/eclipse/plugins/com.github.spotbugs.plugin.eclipse_${version}.jar";
sha256 = "1mqpl3gx06f54w13jm01qd8fbniab3x989mi3lysx078vrp23jas";
sha256 = "0dnkp2alymvyyql7g8w79i27b3c64inhdvpxx1v014ng9liv54xb";
};

meta = with stdenv.lib; {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/josm/default.nix
Expand Up @@ -2,11 +2,11 @@

stdenv.mkDerivation rec {
name = "josm-${version}";
version = "13053";
version = "13265";

src = fetchurl {
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
sha256 = "0czsmx0gsml3vqzx6940jw2xpmh16idypydw0d4147k4fi9gzyz6";
sha256 = "0mmpxmf17lw1j1m1gfz2jrm3qj2416zgbwgcy7xbvn6qcd8k7dr5";
};

buildInputs = [ jre8 makeWrapper ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/browsers/opera/default.nix
Expand Up @@ -37,7 +37,7 @@
let

mirror = https://get.geo.opera.com/pub/opera/desktop;
version = "48.0.2685.52";
version = "50.0.2762.45";

rpath = stdenv.lib.makeLibraryPath [

Expand Down Expand Up @@ -89,7 +89,7 @@ in stdenv.mkDerivation {

src = fetchurl {
url = "${mirror}/${version}/linux/opera-stable_${version}_amd64.deb";
sha256 = "027njqh2as4d0xsnvzamqiplghb8cxqnc19y0vqkvjnsw57v828p";
sha256 = "1ajdr6yzqc9xkvdcgkps6j5996n60ibjhj518gmminx90da6x5dy";
};

unpackCmd = "${dpkg}/bin/dpkg-deb -x $curSrc .";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/irc/irssi/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, pkgconfig, ncurses, glib, openssl, perl, libintlOrEmpty }:

stdenv.mkDerivation rec {
version = "1.0.5";
version = "1.0.6";
name = "irssi-${version}";

src = fetchurl {
url = "https://github.com/irssi/irssi/releases/download/${version}/${name}.tar.gz";
sha256 = "1lasb8flic4qc1sd3pvfg9aig5skcxlyx6iy9bk73147r8vzaq75";
sha256 = "0iiz0x698bdlpssbj357ln5f7ccjwc1m1550xzy1g7kwcvdpp4mb";
};

nativeBuildInputs = [ pkgconfig ];
Expand Down
4 changes: 3 additions & 1 deletion pkgs/applications/version-management/gitaly/Gemfile
@@ -1,8 +1,10 @@
source 'https://rubygems.org'

gem 'github-linguist', '~> 4.7.0', require: 'linguist'
gem 'gitaly-proto', '~> 0.37.0', require: 'gitaly'
gem 'gitaly-proto', '~> 0.59.0', require: 'gitaly'
gem 'activesupport'
gem 'gollum-lib', '~> 4.2', require: false
gem 'gollum-rugged_adapter', '~> 0.4.4', require: false

group :development, :test do
gem 'gitlab-styles', '~> 2.0.0', require: false
Expand Down

0 comments on commit 4e6a9f0

Please sign in to comment.