Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dezgeg committed Apr 9, 2017
2 parents c595d5e + b64163a commit a05959e
Show file tree
Hide file tree
Showing 139 changed files with 2,405 additions and 1,807 deletions.
4 changes: 4 additions & 0 deletions lib/maintainers.nix
Expand Up @@ -60,6 +60,7 @@
bachp = "Pascal Bach <pascal.bach@nextrem.ch>";
badi = "Badi' Abdul-Wahid <abdulwahidc@gmail.com>";
balajisivaraman = "Balaji Sivaraman<sivaraman.balaji@gmail.com>";
basvandijk = "Bas van Dijk <v.dijk.bas@gmail.com>";
Baughn = "Svein Ove Aas <sveina@gmail.com>";
bcarrell = "Brandon Carrell <brandoncarrell@gmail.com>";
bcdarwin = "Ben Darwin <bcdarwin@gmail.com>";
Expand Down Expand Up @@ -105,6 +106,7 @@
codsl = "codsl <codsl@riseup.net>";
codyopel = "Cody Opel <codyopel@gmail.com>";
colemickens = "Cole Mickens <cole.mickens@gmail.com>";
colescott = "Cole Scott <colescottsf@gmail.com>";
copumpkin = "Dan Peebles <pumpkingod@gmail.com>";
corngood = "David McFarland <corngood@gmail.com>";
coroa = "Jonas Hörsch <jonas@chaoflow.net>";
Expand Down Expand Up @@ -160,6 +162,7 @@
eleanor = "Dejan Lukan <dejan@proteansec.com>";
elitak = "Eric Litak <elitak@gmail.com>";
ellis = "Ellis Whitehead <nixos@ellisw.net>";
eperuffo = "Emanuele Peruffo <info@emanueleperuffo.com>";
epitrochoid = "Mabry Cervin <mpcervin@uncg.edu>";
ericbmerritt = "Eric Merritt <eric@afiniate.com>";
ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>";
Expand Down Expand Up @@ -217,6 +220,7 @@
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
igsha = "Igor Sharonov <igor.sharonov@gmail.com>";
ikervagyok = "Balázs Lengyel <ikervagyok@gmail.com>";
infinisil = "Silvan Mosberger <infinisil@icloud.com";
ivan-tkatchev = "Ivan Tkatchev <tkatchev@gmail.com>";
j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>";
jagajaga = "Arseniy Seroka <ars.seroka@gmail.com>";
Expand Down
10 changes: 10 additions & 0 deletions nixos/modules/config/fonts/fontconfig-ultimate.nix
Expand Up @@ -63,6 +63,15 @@ in
<literal>none</literal> disables the substitutions.
'';
};

preset = mkOption {
type = types.enum ["ultimate1" "ultimate2" "ultimate3" "ultimate4" "ultimate5" "osx" "windowsxp"];
default = "ultimate3";
description = ''
FreeType rendering settings preset. Any of the presets may be
customized by setting environment variables.
'';
};
};
};
};
Expand All @@ -72,6 +81,7 @@ in
config = mkIf (config.fonts.fontconfig.enable && cfg.enable) {

fonts.fontconfig.confPackages = [ confPkg ];
environment.variables."INFINALITY_FT" = cfg.preset;

};

Expand Down
1 change: 1 addition & 0 deletions nixos/modules/config/fonts/fonts.nix
Expand Up @@ -37,6 +37,7 @@ with lib;
pkgs.xorg.fontbhlucidatypewriter75dpi
pkgs.dejavu_fonts
pkgs.freefont_ttf
pkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts
pkgs.liberation_ttf
pkgs.xorg.fontbh100dpi
pkgs.xorg.fontmiscmisc
Expand Down
3 changes: 0 additions & 3 deletions nixos/modules/config/shells-environment.nix
Expand Up @@ -168,9 +168,6 @@ in
${cfg.extraInit}
# The setuid/setcap wrappers override other bin directories.
export PATH="${config.security.wrapperDir}:$PATH"
# ~/bin if it exists overrides other bin directories.
export PATH="$HOME/bin:$PATH"
'';
Expand Down
2 changes: 2 additions & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -130,6 +130,7 @@
./services/audio/liquidsoap.nix
./services/audio/mpd.nix
./services/audio/mopidy.nix
./services/audio/slimserver.nix
./services/audio/squeezelite.nix
./services/audio/ympd.nix
./services/backup/almir.nix
Expand Down Expand Up @@ -247,6 +248,7 @@
./services/mail/rmilter.nix
./services/misc/apache-kafka.nix
./services/misc/autofs.nix
./services/misc/autorandr.nix
./services/misc/bepasty.nix
./services/misc/canto-daemon.nix
./services/misc/calibre-server.nix
Expand Down
45 changes: 36 additions & 9 deletions nixos/modules/programs/ssmtp.nix
Expand Up @@ -39,7 +39,8 @@ in
example = "mail.example.org";
description = ''
The host name of the default mail server to use to deliver
e-mail.
e-mail. Can also contain a port number (ex: mail.example.org:587),
defaults to port 25 if no port is given.
'';
};

Expand Down Expand Up @@ -95,9 +96,28 @@ in
example = "correctHorseBatteryStaple";
description = ''
Password used for SMTP auth. (STORED PLAIN TEXT, WORLD-READABLE IN NIX STORE)
It's recommended to use <option>authPassFile</option>
which takes precedence over <option>authPass</option>.
'';
};

authPassFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "/run/keys/ssmtp-authpass";
description = ''
Path to a file that contains the password used for SMTP auth. The file
should not contain a trailing newline, if the password does not contain one.
This file should be readable by the users that need to execute ssmtp.
<option>authPassFile</option> takes precedence over <option>authPass</option>.
Warning: when <option>authPass</option> is non-empty <option>authPassFile</option>
defaults to a file in the WORLD-READABLE Nix store containing that password.
'';
};

setSendmail = mkOption {
type = types.bool;
default = true;
Expand All @@ -111,21 +131,28 @@ in

config = mkIf cfg.directDelivery {

networking.defaultMailServer.authPassFile = mkIf (cfg.authPass != "")
(mkDefault (toString (pkgs.writeTextFile {
name = "ssmtp-authpass";
text = cfg.authPass;
})));

environment.etc."ssmtp/ssmtp.conf".text =
let yesNo = yes : if yes then "YES" else "NO"; in
''
MailHub=${cfg.hostName}
FromLineOverride=YES
${if cfg.root != "" then "root=${cfg.root}" else ""}
${if cfg.domain != "" then "rewriteDomain=${cfg.domain}" else ""}
UseTLS=${if cfg.useTLS then "YES" else "NO"}
UseSTARTTLS=${if cfg.useSTARTTLS then "YES" else "NO"}
${optionalString (cfg.root != "") "root=${cfg.root}"}
${optionalString (cfg.domain != "") "rewriteDomain=${cfg.domain}"}
UseTLS=${yesNo cfg.useTLS}
UseSTARTTLS=${yesNo cfg.useSTARTTLS}
#Debug=YES
${if cfg.authUser != "" then "AuthUser=${cfg.authUser}" else ""}
${if cfg.authPass != "" then "AuthPass=${cfg.authPass}" else ""}
${optionalString (cfg.authUser != "") "AuthUser=${cfg.authUser}"}
${optionalString (!isNull cfg.authPassFile) "AuthPassFile=${cfg.authPassFile}"}
'';

environment.systemPackages = [pkgs.ssmtp];

services.mail.sendmailSetuidWrapper = mkIf cfg.setSendmail {
program = "sendmail";
source = "${pkgs.ssmtp}/bin/sendmail";
Expand Down
69 changes: 69 additions & 0 deletions nixos/modules/services/audio/slimserver.nix
@@ -0,0 +1,69 @@
{ config, lib, pkgs, ... }:

with lib;

let

cfg = config.services.slimserver;

in {
options = {

services.slimserver = {

enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable slimserver.
'';
};

package = mkOption {
type = types.package;
default = pkgs.slimserver;
defaultText = "pkgs.slimserver";
description = "Slimserver package to use.";
};

dataDir = mkOption {
type = types.path;
default = "/var/lib/slimserver";
description = ''
The directory where slimserver stores its state, tag cache,
playlists etc.
'';
};
};
};


###### implementation

config = mkIf cfg.enable {

systemd.services.slimserver = {
after = [ "network.target" ];
description = "Slim Server for Logitech Squeezebox Players";
wantedBy = [ "multi-user.target" ];

preStart = "mkdir -p ${cfg.dataDir} && chown -R slimserver:slimserver ${cfg.dataDir}";
serviceConfig = {
User = "slimserver";
PermissionsStartOnly = true;
ExecStart = "${cfg.package}/slimserver.pl --logdir ${cfg.dataDir}/logs --prefsdir ${cfg.dataDir}/prefs --cachedir ${cfg.dataDir}/cache";
};
};

users = {
users.slimserver = {
description = "Slimserver daemon user";
home = cfg.dataDir;
group = "slimserver";
};
groups.slimserver = {};
};
};

}

43 changes: 43 additions & 0 deletions nixos/modules/services/misc/autorandr.nix
@@ -0,0 +1,43 @@
{ config, lib, pkgs, ... }:

with lib;

let

cfg = config.services.autorandr;

in {

options = {

services.autorandr = {
enable = mkEnableOption "handling of hotplug and sleep events by autorandr";
};

};

config = mkIf cfg.enable {

services.udev.packages = [ pkgs.autorandr ];

environment.systemPackages = [ pkgs.autorandr ];

# systemd.unitPackages = [ pkgs.autorandr ];
systemd.services.autorandr = {
unitConfig = {
Description = "autorandr execution hook";
After = [ "sleep.target" ];
StartLimitInterval = "5";
StartLimitBurst = "1";
};
serviceConfig = {
ExecStart = "${pkgs.autorandr}/bin/autorandr --batch --change --default default";
Type = "oneshot";
RemainAfterExit = false;
};
wantedBy = [ "sleep.target" ];
};

};

}
26 changes: 13 additions & 13 deletions nixos/modules/services/networking/avahi-daemon.nix
Expand Up @@ -7,32 +7,32 @@ let

cfg = config.services.avahi;

yesNo = yes : if yes then "yes" else "no";

avahiDaemonConf = with cfg; pkgs.writeText "avahi-daemon.conf" ''
[server]
${# Users can set `networking.hostName' to the empty string, when getting
# a host name from DHCP. In that case, let Avahi take whatever the
# current host name is; setting `host-name' to the empty string in
# `avahi-daemon.conf' would be invalid.
if hostName != ""
then "host-name=${hostName}"
else ""}
optionalString (hostName != "") "host-name=${hostName}"}
browse-domains=${concatStringsSep ", " browseDomains}
use-ipv4=${if ipv4 then "yes" else "no"}
use-ipv6=${if ipv6 then "yes" else "no"}
use-ipv4=${yesNo ipv4}
use-ipv6=${yesNo ipv6}
${optionalString (interfaces!=null) "allow-interfaces=${concatStringsSep "," interfaces}"}
${optionalString (domainName!=null) "domain-name=${domainName}"}
allow-point-to-point=${if allowPointToPoint then "yes" else "no"}
allow-point-to-point=${yesNo allowPointToPoint}
[wide-area]
enable-wide-area=${if wideArea then "yes" else "no"}
enable-wide-area=${yesNo wideArea}
[publish]
disable-publishing=${if publish.enable then "no" else "yes"}
disable-user-service-publishing=${if publish.userServices then "no" else "yes"}
publish-addresses=${if publish.userServices || publish.addresses then "yes" else "no"}
publish-hinfo=${if publish.hinfo then "yes" else "no"}
publish-workstation=${if publish.workstation then "yes" else "no"}
publish-domain=${if publish.domain then "yes" else "no"}
disable-publishing=${yesNo (!publish.enable)}
disable-user-service-publishing=${yesNo (!publish.userServices)}
publish-addresses=${yesNo (publish.userServices || publish.addresses)}
publish-hinfo=${yesNo publish.hinfo}
publish-workstation=${yesNo publish.workstation}
publish-domain=${yesNo publish.domain}
'';

in
Expand Down
6 changes: 3 additions & 3 deletions nixos/modules/services/networking/networkmanager.nix
Expand Up @@ -162,9 +162,9 @@ in {
type = types.listOf (types.submodule {
options = {
source = mkOption {
type = types.str;
type = types.path;
description = ''
A script source.
A script.
'';
};

Expand Down Expand Up @@ -224,7 +224,7 @@ in {
target = "NetworkManager/dispatcher.d/02overridedns";
}
++ lib.imap (i: s: {
text = s.source;
inherit (s) source;
target = "NetworkManager/dispatcher.d/${dispatcherTypesSubdirMap.${s.type}}03userscript${lib.fixedWidthNumber 4 i}";
}) cfg.dispatcherScripts;

Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/services/x11/compton.nix
Expand Up @@ -83,7 +83,7 @@ in {
"focused = 1"
];
description = ''
List of condition of windows that should have no shadow.
List of conditions of windows that should not be faded.
See <literal>compton(1)</literal> man page for more examples.
'';
};
Expand Down Expand Up @@ -123,7 +123,7 @@ in {
"focused = 1"
];
description = ''
List of condition of windows that should have no shadow.
List of conditions of windows that should have no shadow.
See <literal>compton(1)</literal> man page for more examples.
'';
};
Expand Down
20 changes: 0 additions & 20 deletions nixos/modules/system/boot/readonly-mountpoint.c

This file was deleted.

0 comments on commit a05959e

Please sign in to comment.