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 Feb 17, 2018
2 parents b24ce2a + 9f05e67 commit 0586da4
Show file tree
Hide file tree
Showing 179 changed files with 4,549 additions and 2,104 deletions.
5 changes: 5 additions & 0 deletions lib/maintainers.nix
Expand Up @@ -327,6 +327,7 @@
jirkamarsik = "Jirka Marsik <jiri.marsik89@gmail.com>";
jlesquembre = "José Luis Lafuente <jl@lafuente.me>";
jluttine = "Jaakko Luttinen <jaakko.luttinen@iki.fi>";
Jo = "Joachim Ernst <0x4A6F@shackspace.de>";
joachifm = "Joachim Fasting <joachifm@fastmail.fm>";
joamaki = "Jussi Maki <joamaki@gmail.com>";
joelmo = "Joel Moberg <joel.moberg@gmail.com>";
Expand Down Expand Up @@ -369,6 +370,7 @@
kristoff3r = "Kristoffer Søholm <k.soeholm@gmail.com>";
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
kuznero = "Roman Kuznetsov <roman@kuznero.com>";
lasandell = "Luke Sandell <lasandell@gmail.com>";
lassulus = "Lassulus <lassulus@gmail.com>";
layus = "Guillaume Maudoux <layus.on@gmail.com>";
ldesgoui = "Lucas Desgouilles <ldesgoui@gmail.com>";
Expand Down Expand Up @@ -478,6 +480,7 @@
mudri = "James Wood <lamudri@gmail.com>";
muflax = "Stefan Dorn <mail@muflax.com>";
myrl = "Myrl Hex <myrl.0xf@gmail.com>";
nadrieril = "Nadrieril Feneanar <nadrieril@gmail.com>";
namore = "Roman Naumann <namor@hemio.de>";
nand0p = "Fernando Jose Pando <nando@hex7.com>";
Nate-Devv = "Nathan Moore <natedevv@gmail.com>";
Expand Down Expand Up @@ -661,6 +664,7 @@
sternenseemann = "Lukas Epple <post@lukasepple.de>";
stesie = "Stefan Siegl <stesie@brokenpipe.de>";
steveej = "Stefan Junker <mail@stefanjunker.de>";
StijnDW = "Stijn DW <stekke@airmail.cc>";
StillerHarpo = "Florian Engel <florianengel39@gmail.com>";
stumoss = "Stuart Moss <samoss@gmail.com>";
SuprDewd = "Bjarki Ágúst Guðmundsson <suprdewd@gmail.com>";
Expand All @@ -670,6 +674,7 @@
symphorien = "Guillaume Girol <symphorien_nixpkgs@xlumurb.eu>";
szczyp = "Szczyp <qb@szczyp.com>";
sztupi = "Attila Sztupak <attila.sztupak@gmail.com>";
tadfisher = "Tad Fisher <tadfisher@gmail.com>";
taeer = "Taeer Bar-Yam <taeer@necsi.edu>";
tailhook = "Paul Colomiets <paul@colomiets.name>";
taketwo = "Sergey Alexandrov <alexandrov88@gmail.com>";
Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -75,6 +75,7 @@
./programs/cdemu.nix
./programs/chromium.nix
./programs/command-not-found/command-not-found.nix
./programs/criu.nix
./programs/dconf.nix
./programs/environment.nix
./programs/fish.nix
Expand All @@ -92,6 +93,7 @@
./programs/nano.nix
./programs/npm.nix
./programs/oblogout.nix
./programs/plotinus.nix
./programs/qt5ct.nix
./programs/rootston.nix
./programs/screen.nix
Expand All @@ -102,6 +104,7 @@
./programs/ssh.nix
./programs/ssmtp.nix
./programs/sysdig.nix
./programs/systemtap.nix
./programs/sway.nix
./programs/thefuck.nix
./programs/tmux.nix
Expand Down
26 changes: 26 additions & 0 deletions nixos/modules/programs/criu.nix
@@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:

with lib;

let cfg = config.programs.criu;
in {

options = {
programs.criu = {
enable = mkOption {
default = false;
description = ''
Install <command>criu</command> along with necessary kernel options.
'';
};
};
};
config = mkIf cfg.enable {
system.requiredKernelConfig = with config.lib.kernelConfig; [
(isYes "CHECKPOINT_RESTORE")
];
boot.kernel.features.criu = true;
environment.systemPackages = [ pkgs.criu ];
};

}
36 changes: 36 additions & 0 deletions nixos/modules/programs/plotinus.nix
@@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:

with lib;

let
cfg = config.programs.plotinus;
in
{
meta = {
maintainers = pkgs.plotinus.meta.maintainers;
doc = ./plotinus.xml;
};

###### interface

options = {
programs.plotinus = {
enable = mkOption {
default = false;
description = ''
Whether to enable the Plotinus GTK+3 plugin. Plotinus provides a
popup (triggered by Ctrl-Shift-P) to search the menus of a
compatible application.
'';
type = types.bool;
};
};
};

###### implementation

config = mkIf cfg.enable {
environment.variables.XDG_DATA_DIRS = [ "${pkgs.plotinus}/share/gsettings-schemas/${pkgs.plotinus.name}" ];
environment.variables.GTK3_MODULES = [ "${pkgs.plotinus}/lib/libplotinus.so" ];
};
}
25 changes: 25 additions & 0 deletions nixos/modules/programs/plotinus.xml
@@ -0,0 +1,25 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="module-program-plotinus">

<title>Plotinus</title>

<para><emphasis>Source:</emphasis> <filename>modules/programs/plotinus.nix</filename></para>

<para><emphasis>Upstream documentation:</emphasis> <link xlink:href="https://github.com/p-e-w/plotinus"/></para>

<para>Plotinus is a searchable command palette in every modern GTK+ application.</para>

<para>When in a GTK+3 application and Plotinus is enabled, you can press <literal>Ctrl+Shift+P</literal> to open the command palette. The command palette provides a searchable list of of all menu items in the application.</para>

<para>To enable Plotinus, add the following to your <filename>configuration.nix</filename>:

<programlisting>
programs.plotinus.enable = true;
</programlisting>

</para>

</chapter>
28 changes: 28 additions & 0 deletions nixos/modules/programs/systemtap.nix
@@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:

with lib;

let cfg = config.programs.systemtap;
in {

options = {
programs.systemtap = {
enable = mkOption {
default = false;
description = ''
Install <command>systemtap</command> along with necessary kernel options.
'';
};
};
};
config = mkIf cfg.enable {
system.requiredKernelConfig = with config.lib.kernelConfig; [
(isYes "DEBUG")
];
boot.kernel.features.debug = true;
environment.systemPackages = [
config.boot.kernelPackages.systemtap
];
};

}
2 changes: 2 additions & 0 deletions nixos/modules/rename.nix
Expand Up @@ -205,6 +205,8 @@ with lib;
"See the 16.09 release notes for more information.")
(mkRemovedOptionModule [ "services" "phpfpm" "phpIni" ] "")
(mkRemovedOptionModule [ "services" "dovecot2" "package" ] "")
(mkRemovedOptionModule [ "services" "firefox" "syncserver" "user" ] "")
(mkRemovedOptionModule [ "services" "firefox" "syncserver" "group" ] "")
(mkRemovedOptionModule [ "fonts" "fontconfig" "hinting" "style" ] "")
(mkRemovedOptionModule [ "services" "xserver" "displayManager" "sddm" "themes" ]
"Set the option `services.xserver.displayManager.sddm.package' instead.")
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/services/cluster/kubernetes/dashboard.nix
Expand Up @@ -6,12 +6,12 @@ let
cfg = config.services.kubernetes.addons.dashboard;

name = "gcr.io/google_containers/kubernetes-dashboard-amd64";
version = "v1.6.3";
version = "v1.8.2";

image = pkgs.dockerTools.pullImage {
imageName = name;
imageTag = version;
sha256 = "1sf54d96nkgic9hir9c6p14gw24ns1k5d5a0r1sg414kjrvic0b4";
sha256 = "11h0fz3wxp0f10fsyqaxjm7l2qg7xws50dv5iwlck5gb1fjmajad";
};
in {
options.services.kubernetes.addons.dashboard = {
Expand Down
6 changes: 3 additions & 3 deletions nixos/modules/services/cluster/kubernetes/default.nix
Expand Up @@ -301,8 +301,8 @@ in {
Kubernetes apiserver authorization mode (AlwaysAllow/AlwaysDeny/ABAC/RBAC). See
<link xlink:href="http://kubernetes.io/docs/admin/authorization.html"/>
'';
default = ["RBAC"];
type = types.listOf (types.enum ["AlwaysAllow" "AlwaysDeny" "ABAC" "RBAC"]);
default = ["RBAC" "Node"];
type = types.listOf (types.enum ["AlwaysAllow" "AlwaysDeny" "ABAC" "RBAC" "Node"]);
};

authorizationPolicy = mkOption {
Expand Down Expand Up @@ -344,7 +344,7 @@ in {
Kubernetes admission control plugins to use. See
<link xlink:href="http://kubernetes.io/docs/admin/admission-controllers/"/>
'';
default = ["NamespaceLifecycle" "LimitRanger" "ServiceAccount" "ResourceQuota" "DefaultStorageClass" "DefaultTolerationSeconds"];
default = ["NamespaceLifecycle" "LimitRanger" "ServiceAccount" "ResourceQuota" "DefaultStorageClass" "DefaultTolerationSeconds" "NodeRestriction"];
example = [
"NamespaceLifecycle" "NamespaceExists" "LimitRanger"
"SecurityContextDeny" "ServiceAccount" "ResourceQuota"
Expand Down
4 changes: 4 additions & 0 deletions nixos/modules/services/hardware/fwupd.nix
Expand Up @@ -87,4 +87,8 @@ in {
"d /var/lib/fwupd 0755 root root -"
];
};

meta = {
maintainers = pkgs.fwupd.maintainers;
};
}
11 changes: 10 additions & 1 deletion nixos/modules/services/networking/connman.nix
Expand Up @@ -52,6 +52,15 @@ in {
'';
};

extraFlags = mkOption {
type = with types; listOf string;
default = [ ];
example = [ "--nodnsproxy" ];
description = ''
Extra flags to pass to connmand
'';
};

};

};
Expand Down Expand Up @@ -81,7 +90,7 @@ in {
Type = "dbus";
BusName = "net.connman";
Restart = "on-failure";
ExecStart = "${pkgs.connman}/sbin/connmand --config=${configFile} --nodaemon";
ExecStart = "${pkgs.connman}/sbin/connmand --config=${configFile} --nodaemon ${toString cfg.extraFlags}";
StandardOutput = "null";
};
};
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/networking/dante.nix
Expand Up @@ -47,7 +47,7 @@ in

systemd.services.dante = {
description = "Dante SOCKS v4 and v5 compatible proxy server";
after = [ "network.target" ];
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];

serviceConfig = {
Expand Down
52 changes: 22 additions & 30 deletions nixos/modules/services/networking/firefox/sync-server.nix
Expand Up @@ -33,6 +33,8 @@ let
in

{
meta.maintainers = with lib.maintainers; [ nadrieril ];

options = {
services.firefox.syncserver = {
enable = mkOption {
Expand Down Expand Up @@ -70,18 +72,6 @@ in
'';
};

user = mkOption {
type = types.str;
default = "syncserver";
description = "User account under which syncserver runs.";
};

group = mkOption {
type = types.str;
default = "syncserver";
description = "Group account under which syncserver runs.";
};

publicUrl = mkOption {
type = types.str;
default = "http://localhost:5000/";
Expand Down Expand Up @@ -137,51 +127,53 @@ in
config = mkIf cfg.enable {

systemd.services.syncserver = let
syncServerEnv = pkgs.python.withPackages(ps: with ps; [ syncserver pasteScript ]);
syncServerEnv = pkgs.python.withPackages(ps: with ps; [ syncserver pasteScript requests ]);
user = "syncserver";
group = "syncserver";
in {
after = [ "network.target" ];
description = "Firefox Sync Server";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.coreutils syncServerEnv ];

serviceConfig = {
User = cfg.user;
Group = cfg.group;
User = user;
Group = group;
PermissionsStartOnly = true;
};

preStart = ''
if ! test -e ${cfg.privateConfig}; then
mkdir -m 700 -p $(dirname ${cfg.privateConfig})
mkdir -p $(dirname ${cfg.privateConfig})
echo > ${cfg.privateConfig} '[syncserver]'
chmod 600 ${cfg.privateConfig}
echo >> ${cfg.privateConfig} "secret = $(head -c 20 /dev/urandom | sha1sum | tr -d ' -')"
fi
chown ${cfg.user}:${cfg.group} ${cfg.privateConfig}
chmod 600 ${cfg.privateConfig}
chmod 755 $(dirname ${cfg.privateConfig})
chown ${user}:${group} ${cfg.privateConfig}
'' + optionalString (cfg.sqlUri == defaultSqlUri) ''
if ! test -e $(dirname ${defaultDbLocation}); then
mkdir -m 700 -p $(dirname ${defaultDbLocation})
chown ${cfg.user}:${cfg.group} $(dirname ${defaultDbLocation})
chown ${user}:${group} $(dirname ${defaultDbLocation})
fi
# Move previous database file if it exists
oldDb="/var/db/firefox-sync-server.db"
if test -f $oldDb; then
mv $oldDb ${defaultDbLocation}
chown ${cfg.user}:${cfg.group} ${defaultDbLocation}
chown ${user}:${group} ${defaultDbLocation}
fi
'';
serviceConfig.ExecStart = "${syncServerEnv}/bin/paster serve ${syncServerIni}";
};

users.extraUsers = optionalAttrs (cfg.user == "syncserver")
(singleton {
name = "syncserver";
group = cfg.group;
isSystemUser = true;
});

users.extraGroups = optionalAttrs (cfg.group == "syncserver")
(singleton {
name = "syncserver";
});
users.users.syncserver = {
group = "syncserver";
isSystemUser = true;
};

users.groups.syncserver = {};
};
}

0 comments on commit 0586da4

Please sign in to comment.