Skip to content

Commit

Permalink
Merge remote-tracking branch 'channels/nixos-unstable'
Browse files Browse the repository at this point in the history
  • Loading branch information
jerith666 committed Sep 23, 2018
2 parents 8cb6c0f + 7df10f3 commit e318687
Show file tree
Hide file tree
Showing 177 changed files with 3,095 additions and 1,951 deletions.
42 changes: 42 additions & 0 deletions doc/functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,48 @@ buildImage {
<literal>pkgs.cacert</literal> to <varname>contents</varname>.
</para>
</note>

<example xml:id="example-pkgs-dockerTools-buildImage-creation-date">
<title>Impurely Defining a Docker Layer's Creation Date</title>
<para>
By default <function>buildImage</function> will use a static
date of one second past the UNIX Epoch. This allows
<function>buildImage</function> to produce binary reproducible
images. When listing images with <command>docker list
images</command>, the newly created images will be listed like
this:
</para>
<screen><![CDATA[
$ docker image list
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest 08c791c7846e 48 years ago 25.2MB
]]></screen>
<para>
You can break binary reproducibility but have a sorted,
meaningful <literal>CREATED</literal> column by setting
<literal>created</literal> to <literal>now</literal>.
</para>
<programlisting><![CDATA[
pkgs.dockerTools.buildImage {
name = "hello";
tag = "latest";
created = "now";
contents = pkgs.hello;
config.Cmd = [ "/bin/hello" ];
}
]]></programlisting>
<para>
and now the Docker CLI will display a reasonable date and
sort the images as expected:
<screen><![CDATA[
$ docker image list
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest de2bf4786de6 About a minute ago 25.2MB
]]></screen>
however, the produced images will not be binary reproducible.
</para>
</example>
</section>

<section xml:id="ssec-pkgs-dockerTools-fetchFromRegistry">
Expand Down
32 changes: 31 additions & 1 deletion doc/languages-frameworks/vim.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ At the moment we support three different methods for managing plugins:
- Vim packages (*recommend*)
- VAM (=vim-addon-manager)
- Pathogen
- vim-plug

## Custom configuration

Expand Down Expand Up @@ -59,7 +60,7 @@ vim_configurable.customize {
}
```

For Neovim the syntax is
For Neovim the syntax is:

```
neovim.override {
Expand Down Expand Up @@ -96,6 +97,35 @@ The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.n

After that you can install your special grafted `myVim` or `myNeovim` packages.

## Managing plugins with vim-plug

To use [vim-plug](https://github.com/junegunn/vim-plug) to manage your Vim
plugins the following example can be used:

```
vim_configurable.customize {
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
plug.plugins = [ youcompleteme fugitive phpCompletion elm-vim ];
};
}
```

For Neovim the syntax is:

```
neovim.override {
configure = {
customRC = ''
# here your custom configuration goes!
'';
plug.plugins = with pkgs.vimPlugins; [
vim-go
];
};
}
```

## Managing plugins with VAM

### Handling dependencies of Vim plugins
Expand Down
60 changes: 60 additions & 0 deletions doc/package-notes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -814,4 +814,64 @@ citrix_receiver.override {
</para>
</section>
</section>
<section xml:id="sec-ibus-typing-booster">
<title>ibus-engines.typing-booster</title>

<para>This package is an ibus-based completion method to speed up typing.</para>

<section xml:id="sec-ibus-typing-booster-activate">
<title>Activating the engine</title>

<para>
IBus needs to be configured accordingly to activate <literal>typing-booster</literal>. The configuration
depends on the desktop manager in use. For detailed instructions, please refer to the
<link xlink:href="https://mike-fabian.github.io/ibus-typing-booster/documentation.html">upstream docs</link>.
</para>
<para>
On NixOS you need to explicitly enable <literal>ibus</literal> with given engines
before customizing your desktop to use <literal>typing-booster</literal>. This can be achieved
using the <literal>ibus</literal> module:
<programlisting>{ pkgs, ... }: {
i18n.inputMethod = {
enabled = "ibus";
ibus.engines = with pkgs.ibus-engines; [ typing-booster ];
};
}</programlisting>
</para>
</section>

<section xml:id="sec-ibus-typing-booster-customize-hunspell">
<title>Using custom hunspell dictionaries</title>

<para>
The IBus engine is based on <literal>hunspell</literal> to support completion in many languages.
By default the dictionaries <literal>de-de</literal>, <literal>en-us</literal>, <literal>es-es</literal>,
<literal>it-it</literal>, <literal>sv-se</literal> and <literal>sv-fi</literal>
are in use. To add another dictionary, the package can be overridden like this:
<programlisting>ibus-engines.typing-booster.override {
langs = [ "de-at" "en-gb" ];
}</programlisting>
</para>
<para>
<emphasis>Note: each language passed to <literal>langs</literal> must be an attribute name in
<literal>pkgs.hunspellDicts</literal>.</emphasis>
</para>
</section>

<section xml:id="sec-ibus-typing-booster-emoji-picker">
<title>Built-in emoji picker</title>

<para>
The <literal>ibus-engines.typing-booster</literal> package contains a program
named <literal>emoji-picker</literal>. To display all emojis correctly,
a special font such as <literal>noto-fonts-emoji</literal> is needed:
</para>
<para>
On NixOS it can be installed using the following expression:
<programlisting>{ pkgs, ... }: {
fonts.fonts = with pkgs; [ noto-fonts-emoji ];
}</programlisting>
</para>
</section>
</section>
</chapter>
2 changes: 1 addition & 1 deletion doc/stdenv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,7 @@ someVar=$(stripHash $name)
The most typical use of the setup hook is actually to add other hooks which
are then run (i.e. after all the setup hooks) on each dependency. For
example, the C compiler wrapper's setup hook feeds itself flags for each
dependency that contains relevant libaries and headers. This is done by
dependency that contains relevant libraries and headers. This is done by
defining a bash function, and appending its name to one of
<envar>envBuildBuildHooks</envar>`, <envar>envBuildHostHooks</envar>`,
<envar>envBuildTargetHooks</envar>`, <envar>envHostHostHooks</envar>`,
Expand Down
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2813,6 +2813,11 @@
github = "muflax";
name = "Stefan Dorn";
};
mvnetbiz = {
email = "mvnetbiz@gmail.com";
github = "mvnetbiz";
name = "Matt Votava";
};
myrl = {
email = "myrl.0xf@gmail.com";
github = "myrl";
Expand Down
49 changes: 49 additions & 0 deletions nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This module contains the basic configuration for building a graphical NixOS
# installation CD.

{ config, lib, pkgs, ... }:

with lib;

{
imports = [ ./installation-cd-base.nix ];

services.xserver = {
enable = true;

# Don't start the X server by default.
autorun = mkForce false;

# Automatically login as root.
displayManager.slim = {
enable = true;
defaultUser = "root";
autoLogin = true;
};

};

# Provide networkmanager for easy wireless configuration.
networking.networkmanager.enable = true;
networking.wireless.enable = mkForce false;

# KDE complains if power management is disabled (to be precise, if
# there is no power management backend such as upower).
powerManagement.enable = true;

environment.systemPackages = [
# Include gparted for partitioning disks.
pkgs.gparted

# Include some editors.
pkgs.vim
pkgs.bvi # binary editor
pkgs.joe

# Firefox for reading the manual.
pkgs.firefox

pkgs.glxinfo
];

}
63 changes: 3 additions & 60 deletions nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,73 +6,16 @@
with lib;

{
imports = [ ./installation-cd-base.nix ];
imports = [ ./installation-cd-graphical-base.nix ];

services.xserver = {
enable = true;
# GDM doesn't start in virtual machines with ISO
displayManager.slim = {
enable = true;
defaultUser = "root";
autoLogin = true;
};
desktopManager.gnome3 = {
enable = true;
extraGSettingsOverrides = ''
[org.gnome.desktop.background]
show-desktop-icons=true
[org.gnome.nautilus.desktop]
trash-icon-visible=false
volumes-visible=false
home-icon-visible=false
network-icon-visible=false
'';

extraGSettingsOverridePackages = [ pkgs.gnome3.nautilus ];
};
};

environment.systemPackages =
[ # Include gparted for partitioning disks.
pkgs.gparted
services.xserver.desktopManager.gnome3.enable = true;

# Include some editors.
pkgs.vim
pkgs.bvi # binary editor
pkgs.joe

pkgs.glxinfo
];

# Don't start the X server by default.
services.xserver.autorun = mkForce false;
services.xserver.displayManager.slim.enable = mkForce false;

# Auto-login as root.
services.xserver.displayManager.gdm.autoLogin = {
enable = true;
user = "root";
};

system.activationScripts.installerDesktop = let
# Must be executable
desktopFile = pkgs.writeScript "nixos-manual.desktop" ''
[Desktop Entry]
Version=1.0
Type=Link
Name=NixOS Manual
URL=${config.system.build.manual.manual}/share/doc/nixos/index.html
Icon=system-help
'';

# use cp and chmod +x, we must be sure the apps are in the nix store though
in ''
mkdir -p /root/Desktop
ln -sfT ${desktopFile} /root/Desktop/nixos-manual.desktop
cp ${pkgs.gnome3.gnome-terminal}/share/applications/gnome-terminal.desktop /root/Desktop/gnome-terminal.desktop
chmod a+rx /root/Desktop/gnome-terminal.desktop
cp ${pkgs.gparted}/share/applications/gparted.desktop /root/Desktop/gparted.desktop
chmod a+rx /root/Desktop/gparted.desktop
'';

}
47 changes: 9 additions & 38 deletions nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
# This module defines a NixOS installation CD that contains X11 and
# KDE 5.
# Plasma5.

{ config, lib, pkgs, ... }:

with lib;

{
imports = [ ./installation-cd-base.nix ];
imports = [ ./installation-cd-graphical-base.nix ];

services.xserver = {
enable = true;

# Automatically login as root.
displayManager.slim = {
enable = true;
defaultUser = "root";
autoLogin = true;
};

desktopManager.plasma5 = {
enable = true;
enableQt4Support = false;
Expand All @@ -27,34 +18,14 @@ with lib;
synaptics.enable = true;
};

environment.systemPackages =
[ pkgs.glxinfo

# Include gparted for partitioning disks.
pkgs.gparted

# Firefox for reading the manual.
pkgs.firefox

# Include some editors.
pkgs.vim
pkgs.bvi # binary editor
pkgs.joe
];

# Provide networkmanager for easy wireless configuration.
networking.networkmanager.enable = true;
networking.wireless.enable = mkForce false;

# KDE complains if power management is disabled (to be precise, if
# there is no power management backend such as upower).
powerManagement.enable = true;

# Don't start the X server by default.
services.xserver.autorun = mkForce false;
environment.systemPackages = with pkgs; [
# Graphical text editor
kate
];

system.activationScripts.installerDesktop = let
desktopFile = pkgs.writeText "nixos-manual.desktop" ''

manualDesktopFile = pkgs.writeScript "nixos-manual.desktop" ''
[Desktop Entry]
Version=1.0
Type=Application
Expand All @@ -65,7 +36,7 @@ with lib;

in ''
mkdir -p /root/Desktop
ln -sfT ${desktopFile} /root/Desktop/nixos-manual.desktop
ln -sfT ${manualDesktopFile} /root/Desktop/nixos-manual.desktop
ln -sfT ${pkgs.konsole}/share/applications/org.kde.konsole.desktop /root/Desktop/org.kde.konsole.desktop
ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop /root/Desktop/gparted.desktop
'';
Expand Down
Loading

0 comments on commit e318687

Please sign in to comment.