Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e126a8c8a5a4
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 35a284ad4aa1
Choose a head ref

Commits on Oct 24, 2017

  1. Copy the full SHA
    01bf32d View commit details

Commits on May 6, 2018

  1. Copy the full SHA
    4b69aab View commit details
  2. Copy the full SHA
    e2dfac6 View commit details
  3. nixos/modules/services/scheduling/fcron: add setuid to fcrontab

    Without fcrontab being setuid, every attempt by an user in the fcron
    group to edit their own crontab (via `fcrontab -e`) results in the
    following error:
    
    ```
    2018-05-06 11:29:07 ERROR could not change euid to 273: Operation not permitted
    2018-05-06 11:29:07 ERROR fcron child aborted: this does not affect the main fcron daemon, but this may prevent a job from being run or an email from being sent.
    ```
    
    Adding setuid by hand has resolved this issue and aligns with the way
    fcrontab is installed on other distributions.
    alunduil committed May 6, 2018
    Copy the full SHA
    fdebbce View commit details

Commits on May 8, 2018

  1. openntpd: make -s flag work

    after seeing
    `adjtime failed: Invalid argument` in my syslog, I tried using
    `ntpd -s` but it would trigger
    `/etc/ntpd.conf: No such file or directory`
    see NixOS/nixpkgs#31885
    
    Instead of running the daemon with a specific config file, use the
    standard file so that user are able to use the ntp executable without
    having to look for the current config file.
    teto committed May 8, 2018
    Copy the full SHA
    f5e169c View commit details

Commits on May 15, 2018

  1. Copy the full SHA
    08f0c43 View commit details
  2. Copy the full SHA
    b9361e8 View commit details

Commits on May 19, 2018

  1. sshd: add custom options

    Izorkin committed May 19, 2018
    Copy the full SHA
    ad11b96 View commit details

Commits on May 22, 2018

  1. Copy the full SHA
    320e504 View commit details

Commits on May 24, 2018

  1. Copy the full SHA
    00349e2 View commit details

Commits on May 25, 2018

  1. Copy the full SHA
    495c5a2 View commit details

Commits on May 26, 2018

  1. errbot: 5.1.3 -> 5.2.0

    Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
    
    This update was made based on information from https://repology.org/metapackage/errbot/versions.
    
    These checks were done:
    
    - built on NixOS
    - /nix/store/gfvsdshvr4135r231wzcl2n5if66r0ws-errbot-5.2.0/bin/.errbot-wrapped passed the binary check.
    - /nix/store/gfvsdshvr4135r231wzcl2n5if66r0ws-errbot-5.2.0/bin/errbot passed the binary check.
    - 2 of 2 passed binary check by having a zero exit code.
    - 2 of 2 passed binary check by having the new version present in output.
    - found 5.2.0 with grep in /nix/store/gfvsdshvr4135r231wzcl2n5if66r0ws-errbot-5.2.0
    - directory tree listing: https://gist.github.com/92be0fef2042d15212f373d23ed09bcf
    - du listing: https://gist.github.com/5ca847bd9354551d6e66ba1abc16d23f
    R. RyanTM committed May 26, 2018
    Copy the full SHA
    b2aef18 View commit details

Commits on May 27, 2018

  1. Mint-lang: Init at 2018.05.27

    manveru committed May 27, 2018
    Copy the full SHA
    d6c4e3e View commit details
  2. Switch to fetchgit

    manveru committed May 27, 2018
    Copy the full SHA
    4f7c918 View commit details

Commits on May 28, 2018

  1. wine: Stable: 3.0 -> 3.0.1; Unstable, Staging 3.7 -> 3.9

    Lengyel Balázs committed May 28, 2018
    Copy the full SHA
    609f718 View commit details
  2. winetricks: 20180217 -> 20180513

    Lengyel Balázs committed May 28, 2018
    Copy the full SHA
    2aebd62 View commit details
  3. php: 7.2.5 -> 7.2.6

    Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
    
    This update was made based on information from https://repology.org/metapackage/php/versions.
    
    These checks were done:
    
    - built on NixOS
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/phar.phar passed the binary check.
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/phar passed the binary check.
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/php passed the binary check.
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/phpdbg passed the binary check.
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/php-cgi passed the binary check.
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/pear passed the binary check.
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/peardev passed the binary check.
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/pecl passed the binary check.
    - /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/php-fpm passed the binary check.
    - 9 of 9 passed binary check by having a zero exit code.
    - 0 of 9 passed binary check by having the new version present in output.
    - found 7.2.6 with grep in /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6
    - directory tree listing: https://gist.github.com/409d2cfaa7e805714825281fbaba0d0f
    - du listing: https://gist.github.com/7fbd8e3d56524f70b3dfb94c045fccd2
    R. RyanTM authored and leenaars committed May 28, 2018
    Copy the full SHA
    98c4ac2 View commit details
  4. urn: init at 0.7.1

    CrazedProgrammer committed May 28, 2018
    Copy the full SHA
    4b5e23d View commit details

Commits on May 30, 2018

  1. Use fetchFromGitHub instead

    manveru committed May 30, 2018
    Copy the full SHA
    ba1268f View commit details
  2. morty: init -> 0.2.0

    leenaars committed May 30, 2018
    Copy the full SHA
    f12f058 View commit details
  3. morty: init as service

    leenaars committed May 30, 2018
    Copy the full SHA
    e9ff80d View commit details
  4. barrier: init at 2.1.1

    phryneas committed May 30, 2018
    Copy the full SHA
    bb8aa7f View commit details

Commits on Jun 1, 2018

  1. nixos/slurm: Extend configuration options

    * Updated SrunX11 option
    * Added extraPlugstackConfig parameter
    * Added option enableStools
    * Add cgroup.conf to module
    * Fix some typos
    markuskowa committed Jun 1, 2018
    Copy the full SHA
    995d2ec View commit details
  2. nixos/slurm: Add man pages to wrapedSlurm

    The nixos module adds a new derivation to
    systemPackages to make sure that the binaries
    get the generated config file. This derivation
    did not contain the man pages so far.
    Activating the module now makes the man pages
    available in the system environment.
    markuskowa committed Jun 1, 2018
    Copy the full SHA
    b7e91f0 View commit details
  3. slurm: add freeipmi, readline, libssh2, fix hwloc

    * add freeipmi to get power meter readings
    * readline support for scontrol
    * libssh2 support for X11 supporta
    * Add note to enableSrunX11 in module
    * fix hwloc support (was detected by configure)
    markuskowa committed Jun 1, 2018
    Copy the full SHA
    8026127 View commit details
  4. nixos/slurm: update test, add test for enableStools

    * Add pure submit host to test 'enableStools'
    * Disable client.enable on control machine
    markuskowa committed Jun 1, 2018
    Copy the full SHA
    c8faa48 View commit details
  5. slurm: add maintainer

    markuskowa committed Jun 1, 2018
    Copy the full SHA
    f07ddea View commit details

Commits on Jun 2, 2018

  1. Merge pull request #41287 from phryneas/package/barrier

    barrier: init at 2.1.1
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    3507fcf View commit details
  2. Merge pull request #41119 from r-ryantm/auto-update/errbot

    errbot: 5.1.3 -> 5.2.0
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    6b82583 View commit details
  3. cacert: fix certdata2pem url

    Related to #39927
    
    ```
    $ nix-prefetch-url https://salsa.debian.org/debian/ca-certificates/raw/debian/20170717/mozilla/certdata2pem.py
    path is '/nix/store/0d00axdac4h8ffxrf90s5zh8xdw3r29z-certdata2pem.py'
    1d4q27j1gss0186a5m8bs5dk786w07ccyq0qi6xmd2zr1a8q16wy
    ```
    schlarpc authored Jun 2, 2018
    Copy the full SHA
    933d7f3 View commit details
  4. Merge pull request #41379 from schlarpc/patch-1

    cacert: fix certdata2pem url
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    2fcc793 View commit details
  5. Merge pull request #41148 from manveru/add-mint-lang

    Mint-lang: Init at 2018.05.27
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    0241c2c View commit details
  6. Merge pull request #41020 from bkchr/androidndk_fix

    androidndk: Fixes missing libraries for prebuilt clang
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    1fc2853 View commit details
  7. Copy the full SHA
    97f6be5 View commit details
  8. Merge pull request #41204 from ikervagyok/wine

    Wine updates
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    dabf7c6 View commit details
  9. Merge pull request #41023 from tvbeat/lua-path-fix

    lua packages: add init.lua to modules search path
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    4ca9f84 View commit details
  10. Merge pull request #40692 from Izorkin/sshd

    sshd: add custom options
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    76d0d7c View commit details
  11. Merge pull request #40712 from aespinosa/hadoop

    hadoop: 2.2.0 -> 2.7.6, 2.8.6, 2.9.1, 3.0.2, 3.1.0
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    3faed86 View commit details
  12. Merge pull request #40611 from CrazedProgrammer/urn

    urn: init at 0.7.1
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    e3647d7 View commit details
  13. Merge pull request #40544 from jfrankenau/cura-fix-sidebar-materials

    cura: fix invisible sidebar and install missing materials
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    ed2177b View commit details
  14. Merge pull request #40171 from teto/ntp

    [RDY] openntpd: make -s flag work
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    20ca7af View commit details
  15. Merge pull request #40037 from alunduil/fix-fcrontab-setuid

    nixos/modules/services/scheduling/fcron: add setuid to fcrontab
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    e4746bd View commit details
  16. Merge pull request #40028 from WilliButz/add-dnsmasq-exporter

    prometheus-dnsmasq-exporter: init at 2018-05-05, add module
    matthewbauer authored Jun 2, 2018
    Copy the full SHA
    bc7ea93 View commit details
  17. altcoins.aeon: 0.9.14.0 -> 0.12.0.0

    Aeon was rebased onto a recent version of monero, so
    aeon/default.nix now more closely matches monero/default.nix.
    aij committed Jun 2, 2018
    Copy the full SHA
    d866a4f View commit details
  18. Merge pull request #41384 from aij/aeon-0.12.0.0

    altcoins.aeon: 0.9.14.0 -> 0.12.0.0
    adisbladis authored Jun 2, 2018
    Copy the full SHA
    6d42f13 View commit details
  19. ponyc: 0.22.2 -> 0.22.3 (#41380)

    patternspandemic authored and xeji committed Jun 2, 2018
    Copy the full SHA
    33aed15 View commit details
  20. mapmap: init at 0.6.1 (#41228)

    The Nix package currently doesn't support video textures, just still images.
    When I figure out why video textures don't work I will provide a fix.
    erictapen authored and xeji committed Jun 2, 2018
    Copy the full SHA
    4d88c02 View commit details
  21. aws-sdk-cpp: 1.4.40 -> 1.4.50 (#40694)

    Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
    
    This update was made based on information from https://repology.org/metapackage/aws-sdk-cpp/versions.
    
    These checks were done:
    
    - built on NixOS
    
    - 0 of 0 passed binary check by having a zero exit code.
    - 0 of 0 passed binary check by having the new version present in output.
    - found 1.4.50 with grep in /nix/store/kg9d5flfl989yxfcppyq886g60mfhpzy-aws-sdk-cpp-1.4.50
    - directory tree listing: https://gist.github.com/2faf1d98f152431438b23c93bd489e09
    - du listing: https://gist.github.com/9df0b904ab22201191bb2261798bb0a3
    r-ryantm authored and xeji committed Jun 2, 2018
    Copy the full SHA
    a1bc16a View commit details
  22. Copy the full SHA
    9290905 View commit details
  23. bulletml: fix build failure due to -Wformat-security (#41387)

    Some files are built with -Wno-format, which is not compatible with the
    default hardening setting of -Wformat-security in Nixpkgs.
    fgaz authored and xeji committed Jun 2, 2018
    Copy the full SHA
    799a461 View commit details
Showing with 1,109 additions and 164 deletions.
  1. +5 −0 maintainers/maintainer-list.nix
  2. +1 −0 nixos/modules/module-list.nix
  3. +56 −9 nixos/modules/services/computing/slurm/slurm.nix
  4. +1 −0 nixos/modules/services/monitoring/prometheus/exporters.nix
  5. +39 −0 nixos/modules/services/monitoring/prometheus/exporters/dnsmasq.nix
  6. +98 −0 nixos/modules/services/networking/morty.nix
  7. +6 −4 nixos/modules/services/networking/openntpd.nix
  8. +33 −3 nixos/modules/services/networking/ssh/sshd.nix
  9. +1 −0 nixos/modules/services/scheduling/fcron.nix
  10. +1 −0 nixos/release.nix
  11. +32 −0 nixos/tests/morty.nix
  12. +18 −5 nixos/tests/slurm.nix
  13. +19 −11 pkgs/applications/altcoins/aeon/default.nix
  14. +33 −0 pkgs/applications/misc/barrier/default.nix
  15. +14 −2 pkgs/applications/misc/cura/default.nix
  16. +65 −40 pkgs/applications/networking/cluster/hadoop/default.nix
  17. +2 −2 pkgs/applications/networking/errbot/default.nix
  18. +3 −3 pkgs/applications/networking/ipfs/default.nix
  19. +41 −0 pkgs/applications/networking/p2p/zeronet/default.nix
  20. +10 −3 pkgs/applications/version-management/subversion/default.nix
  21. +63 −0 pkgs/applications/video/mapmap/default.nix
  22. +1 −1 pkgs/data/misc/cacert/default.nix
  23. +0 −41 pkgs/development/compilers/adobe-flex-sdk/default.nix
  24. +56 −0 pkgs/development/compilers/apache-flex-sdk/default.nix
  25. +35 −0 pkgs/development/compilers/mint/crystal2nix.cr
  26. +61 −0 pkgs/development/compilers/mint/default.nix
  27. +62 −0 pkgs/development/compilers/mint/shards.nix
  28. +2 −2 pkgs/development/compilers/ponyc/default.nix
  29. +61 −0 pkgs/development/compilers/urn/default.nix
  30. +2 −2 pkgs/development/libraries/aws-sdk-cpp/default.nix
  31. +1 −0 pkgs/development/libraries/bulletml/default.nix
  32. +5 −2 pkgs/development/libraries/poppler/default.nix
  33. +2 −2 pkgs/development/lua-modules/generic/default.nix
  34. +10 −11 pkgs/development/mobile/androidenv/androidndk.nix
  35. +3 −3 pkgs/development/mobile/androidenv/default.nix
  36. +2 −2 pkgs/development/tools/build-managers/sbt/default.nix
  37. +7 −7 pkgs/misc/emulators/wine/sources.nix
  38. +21 −6 pkgs/servers/computing/slurm/default.nix
  39. +93 −0 pkgs/servers/monitoring/prometheus/dnsmasq-exporter-deps.nix
  40. +23 −0 pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix
  41. +41 −0 pkgs/servers/web-apps/morty/default.nix
  42. +57 −0 pkgs/servers/web-apps/morty/deps.nix
  43. +1 −0 pkgs/top-level/aliases.nix
  44. +22 −3 pkgs/top-level/all-packages.nix
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -2973,6 +2973,11 @@
github = "phreedom";
name = "Evgeny Egorochkin";
};
phryneas = {
email = "mail@lenzw.de";
github = "phryneas";
name = "Lenz Weber";
};
phunehehe = {
email = "phunehehe@gmail.com";
github = "phunehehe";
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -514,6 +514,7 @@
./services/networking/miniupnpd.nix
./services/networking/mosquitto.nix
./services/networking/monero.nix
./services/networking/morty.nix
./services/networking/miredo.nix
./services/networking/mstpd.nix
./services/networking/murmur.nix
65 changes: 56 additions & 9 deletions nixos/modules/services/computing/slurm/slurm.nix
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ let

cfg = config.services.slurm;
# configuration file can be generated by http://slurm.schedmd.com/configurator.html
configFile = pkgs.writeText "slurm.conf"
configFile = pkgs.writeTextDir "slurm.conf"
''
${optionalString (cfg.controlMachine != null) ''controlMachine=${cfg.controlMachine}''}
${optionalString (cfg.controlAddr != null) ''controlAddr=${cfg.controlAddr}''}
@@ -17,10 +17,25 @@ let
${cfg.extraConfig}
'';

plugStackConfig = pkgs.writeText "plugstack.conf"
plugStackConfig = pkgs.writeTextDir "plugstack.conf"
''
${optionalString cfg.enableSrunX11 ''optional ${pkgs.slurm-spank-x11}/lib/x11.so''}
${cfg.extraPlugstackConfig}
'';


cgroupConfig = pkgs.writeTextDir "cgroup.conf"
''
${cfg.extraCgroupConfig}
'';

# slurm expects some additional config files to be
# in the same directory as slurm.conf
etcSlurm = pkgs.symlinkJoin {
name = "etc-slurm";
paths = [ configFile cgroupConfig plugStackConfig ];
};

in

{
@@ -46,7 +61,17 @@ in

client = {
enable = mkEnableOption "slurm client daemon";
};

enableStools = mkOption {
type = types.bool;
default = false;
description = ''
Wether to provide a slurm.conf file.
Enable this option if you do not run a slurm daemon on this host
(i.e. <literal>server.enable</literal> and <literal>client.enable</literal> are <literal>false</literal>)
but you still want to run slurm commands from this host.
'';
};

package = mkOption {
@@ -97,7 +122,7 @@ in
example = "debug Nodes=linux[1-32] Default=YES MaxTime=INFINITE State=UP";
description = ''
Name by which the partition may be referenced. Note that now you have
to write patrition's parameters after the name.
to write the partition's parameters after the name.
'';
};

@@ -107,8 +132,10 @@ in
description = ''
If enabled srun will accept the option "--x11" to allow for X11 forwarding
from within an interactive session or a batch job. This activates the
slurm-spank-x11 module. Note that this requires 'services.openssh.forwardX11'
to be enabled on the compute nodes.
slurm-spank-x11 module. Note that this option also enables
'services.openssh.forwardX11' on the client.
This option requires slurm to be compiled without native X11 support.
'';
};

@@ -130,6 +157,23 @@ in
the end of the slurm configuration file.
'';
};

extraPlugstackConfig = mkOption {
default = "";
type = types.lines;
description = ''
Extra configuration that will be added to the end of <literal>plugstack.conf</literal>.
'';
};

extraCgroupConfig = mkOption {
default = "";
type = types.lines;
description = ''
Extra configuration for <literal>cgroup.conf</literal>. This file is
used when <literal>procTrackType=proctrack/cgroup</literal>.
'';
};
};

};
@@ -142,8 +186,6 @@ in
wrappedSlurm = pkgs.stdenv.mkDerivation {
name = "wrappedSlurm";

propagatedBuildInputs = [ cfg.package configFile ];

builder = pkgs.writeText "builder.sh" ''
source $stdenv/setup
mkdir -p $out/bin
@@ -155,17 +197,20 @@ in
#!/bin/sh
if [ -z "$SLURM_CONF" ]
then
SLURM_CONF="${configFile}" "$EXE" "\$@"
SLURM_CONF="${etcSlurm}/slurm.conf" "$EXE" "\$@"
else
"$EXE" "\$0"
fi
EOT
chmod +x "$wrappername"
done
mkdir -p $out/share
ln -s ${getBin cfg.package}/share/man $out/share/man
'';
};

in mkIf (cfg.client.enable || cfg.server.enable) {
in mkIf (cfg.enableStools || cfg.client.enable || cfg.server.enable) {

environment.systemPackages = [ wrappedSlurm ];

@@ -190,6 +235,8 @@ in
'';
};

services.openssh.forwardX11 = mkIf cfg.client.enable (mkDefault true);

systemd.services.slurmctld = mkIf (cfg.server.enable) {
path = with pkgs; [ wrappedSlurm munge coreutils ]
++ lib.optional cfg.enableSrunX11 slurm-spank-x11;
1 change: 1 addition & 0 deletions nixos/modules/services/monitoring/prometheus/exporters.nix
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ let
exporterOpts = {
blackbox = import ./exporters/blackbox.nix { inherit config lib pkgs; };
collectd = import ./exporters/collectd.nix { inherit config lib pkgs; };
dnsmasq = import ./exporters/dnsmasq.nix { inherit config lib pkgs; };
dovecot = import ./exporters/dovecot.nix { inherit config lib pkgs; };
fritzbox = import ./exporters/fritzbox.nix { inherit config lib pkgs; };
json = import ./exporters/json.nix { inherit config lib pkgs; };
39 changes: 39 additions & 0 deletions nixos/modules/services/monitoring/prometheus/exporters/dnsmasq.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{ config, lib, pkgs }:

with lib;

let
cfg = config.services.prometheus.exporters.dnsmasq;
in
{
port = 9153;
extraOpts = {
dnsmasqListenAddress = mkOption {
type = types.str;
default = "localhost:53";
description = ''
Address on which dnsmasq listens.
'';
};
leasesPath = mkOption {
type = types.path;
default = "/var/lib/misc/dnsmasq.leases";
example = "/var/lib/dnsmasq/dnsmasq.leases";
description = ''
Path to the <literal>dnsmasq.leases</literal> file.
'';
};
};
serviceOpts = {
serviceConfig = {
DynamicUser = true;
ExecStart = ''
${pkgs.prometheus-dnsmasq-exporter}/bin/dnsmasq_exporter \
--listen ${cfg.listenAddress}:${toString cfg.port} \
--dnsmasq ${cfg.dnsmasqListenAddress} \
--leases_path ${cfg.leasesPath} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}
98 changes: 98 additions & 0 deletions nixos/modules/services/networking/morty.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{ config, lib, pkgs, ... }:

with lib;

let

cfg = config.services.morty;

configFile = cfg.configFile;

in

{

###### interface

options = {

services.morty = {

enable = mkEnableOption
"Morty proxy server. See https://github.com/asciimoo/morty";

ipv6 = mkOption {
type = types.bool;
default = true;
description = "Allow IPv6 HTTP requests?";
defaultText = "Allow IPv6 HTTP requests.";
};

key = mkOption {
type = types.string;
default = "";
description = "HMAC url validation key (hexadecimal encoded).
Leave blank to disable. Without validation key, anyone can
submit proxy requests. Leave blank to disable.";
defaultText = "No HMAC url validation. Generate with echo -n somevalue | openssl dgst -sha1 -hmac somekey";
};

timeout = mkOption {
type = types.int;
default = 2;
description = "Request timeout in seconds.";
defaultText = "A resource now gets 2 seconds to respond.";
};

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

port = mkOption {
type = types.int;
default = 3000;
description = "Listing port";
};

listenAddress = mkOption {
type = types.string;
default = "127.0.0.1";
description = "The address on which the service listens";
defaultText = "127.0.0.1 (localhost)";
};

};

};

###### Service definition

config = mkIf config.services.morty.enable {

users.extraUsers.morty =
{ description = "Morty user";
createHome = true;
home = "/var/lib/morty";
};

systemd.services.morty =
{
description = "Morty sanitizing proxy server.";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "morty";
ExecStart = ''${cfg.package}/bin/morty \
-listen ${cfg.listenAddress}:${toString cfg.port} \
${optionalString cfg.ipv6 "-ipv6"} \
${optionalString (cfg.key != "") "-key " + cfg.key} \
'';
};
};
environment.systemPackages = [ cfg.package ];

};
}
10 changes: 6 additions & 4 deletions nixos/modules/services/networking/openntpd.nix
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let

package = pkgs.openntpd_nixos;

cfgFile = pkgs.writeText "openntpd.conf" ''
configFile = ''
${concatStringsSep "\n" (map (s: "server ${s}") cfg.servers)}
${cfg.extraConfig}
'';
@@ -31,8 +31,8 @@ in
type = with types; lines;
default = "";
example = ''
listen on 127.0.0.1
listen on ::1
listen on 127.0.0.1
listen on ::1
'';
description = ''
Additional text appended to <filename>openntpd.conf</filename>.
@@ -57,6 +57,8 @@ in
# Add ntpctl to the environment for status checking
environment.systemPackages = [ package ];

environment.etc."ntpd.conf".text = configFile;

users.extraUsers = singleton {
name = "ntp";
uid = config.ids.uids.ntp;
@@ -71,7 +73,7 @@ in
before = [ "time-sync.target" ];
after = [ "dnsmasq.service" "bind.service" "network-online.target" ];
serviceConfig = {
ExecStart = "${package}/sbin/ntpd -f ${cfgFile} -p ${pidFile} ${cfg.extraOptions}";
ExecStart = "${package}/sbin/ntpd -p ${pidFile} ${cfg.extraOptions}";
Type = "forking";
PIDFile = pidFile;
};
36 changes: 33 additions & 3 deletions nixos/modules/services/networking/ssh/sshd.nix
Original file line number Diff line number Diff line change
@@ -272,6 +272,31 @@ in
'';
};

logLevel = mkOption {
type = types.enum [ "QUIET" "FATAL" "ERROR" "INFO" "VERBOSE" "DEBUG" "DEBUG1" "DEBUG2" "DEBUG3" ];
default = "VERBOSE";
description = ''
Gives the verbosity level that is used when logging messages from sshd(8). The possible values are:
QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is VERBOSE. DEBUG and DEBUG1
are equivalent. DEBUG2 and DEBUG3 each specify higher levels of debugging output. Logging with a DEBUG level
violates the privacy of users and is not recommended.
LogLevel VERBOSE logs user's key fingerprint on login.
Needed to have a clear audit track of which key was used to log in.
'';
};

useDns = mkOption {
type = types.bool;
default = false;
description = ''
Specifies whether sshd(8) should look up the remote host name, and to check that the resolved host name for
the remote IP address maps back to the very same IP address.
If this option is set to no (the default) then only addresses and not host names may be used in
~/.ssh/authorized_keys from and sshd_config Match Host directives.
'';
};

extraConfig = mkOption {
type = types.lines;
default = "";
@@ -426,9 +451,14 @@ in
Ciphers ${concatStringsSep "," cfg.ciphers}
MACs ${concatStringsSep "," cfg.macs}
# LogLevel VERBOSE logs user's key fingerprint on login.
# Needed to have a clear audit track of which key was used to log in.
LogLevel VERBOSE
LogLevel ${cfg.logLevel}
${if cfg.useDns then ''
UseDNS yes
'' else ''
UseDNS no
''}
'';

assertions = [{ assertion = if cfg.forwardX11 then cfgc.setXAuthLocation else true;
Loading