diff options
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/misc/ids.nix | 2 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/mail/postfix.nix | 6 | ||||
-rw-r--r-- | nixos/modules/services/networking/mfi.nix | 100 | ||||
-rw-r--r-- | nixos/release-combined.nix | 4 | ||||
-rw-r--r-- | nixos/release.nix | 8 | ||||
-rw-r--r-- | nixos/tests/hibernate.nix | 2 |
7 files changed, 7 insertions, 116 deletions
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 859838182ed4..0f3b8bcab8b0 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -254,7 +254,6 @@ hydra-queue-runner = 235; hydra-www = 236; syncthing = 237; - mfi = 238; caddy = 239; taskd = 240; factorio = 241; @@ -522,7 +521,6 @@ octoprint = 230; radicale = 234; syncthing = 237; - #mfi = 238; # unused caddy = 239; taskd = 240; factorio = 241; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 8a7a5bf4bc4d..a46448b94378 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -458,7 +458,6 @@ ./services/networking/lldpd.nix ./services/networking/logmein-hamachi.nix ./services/networking/mailpile.nix - ./services/networking/mfi.nix ./services/networking/mjpg-streamer.nix ./services/networking/minidlna.nix ./services/networking/miniupnpd.nix diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index 01ae49d49090..d88a38def82c 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -836,11 +836,5 @@ in (mkIf (cfg.dnsBlacklists != []) { services.postfix.mapFiles."client_access" = checkClientAccessFile; }) - (mkIf (cfg.extraConfig != "") { - warnings = [ "The services.postfix.extraConfig option was deprecated. Please use services.postfix.config instead." ]; - }) - (mkIf (cfg.extraMasterConf != "") { - warnings = [ "The services.postfix.extraMasterConf option was deprecated. Please use services.postfix.masterConfig instead." ]; - }) ]); } diff --git a/nixos/modules/services/networking/mfi.nix b/nixos/modules/services/networking/mfi.nix deleted file mode 100644 index 775564a2c446..000000000000 --- a/nixos/modules/services/networking/mfi.nix +++ /dev/null @@ -1,100 +0,0 @@ -{ config, lib, pkgs, utils, ... }: -with lib; -let - name = "Ubiquiti mFi Controller"; - cfg = config.services.mfi; - stateDir = "/var/lib/mfi"; - # XXX 2 runtime exceptions using jre8: JSPException on GET / ; can't initialize ./data/keystore on first run. - cmd = "@${pkgs.jre7}/bin/java java -jar ${stateDir}/lib/ace.jar"; - mountPoints = [ - { what = "${pkgs.mfi}/dl"; where = "${stateDir}/dl"; } - { what = "${pkgs.mfi}/lib"; where = "${stateDir}/lib"; } - { what = "${pkgs.mongodb248}/bin"; where = "${stateDir}/bin"; } - { what = "${cfg.dataDir}"; where = "${stateDir}/data"; } - ]; - systemdMountPoints = map (m: "${utils.escapeSystemdPath m.where}.mount") mountPoints; - ports = [ 6080 6880 6443 6843 ]; -in -{ - options = { - services.mfi = { - enable = mkEnableOption name; - openPorts = mkOption { - type = types.bool; - default = true; - description = "Whether to open TCP ports ${concatMapStrings (a: "${toString a} ") ports}for the services."; - }; - dataDir = mkOption { - type = types.str; - default = "${stateDir}/data"; - description = '' - Where to store the database and other data. - - This directory will be bind-mounted to ${stateDir}/data as part of the service startup. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - - networking.firewall.allowedTCPPorts = mkIf config.services.mfi.openPorts ports; - - users.users.mfi = { - uid = config.ids.uids.mfi; - description = "mFi controller daemon user"; - home = "${stateDir}"; - }; - - # We must create the binary directories as bind mounts instead of symlinks - # This is because the controller resolves all symlinks to absolute paths - # to be used as the working directory. - systemd.mounts = map ({ what, where }: { - bindsTo = [ "mfi.service" ]; - partOf = [ "mfi.service" ]; - unitConfig.RequiresMountsFor = stateDir; - options = "bind"; - what = what; - where = where; - }) mountPoints; - - systemd.services.mfi = { - description = "mFi controller daemon"; - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ] ++ systemdMountPoints; - partOf = systemdMountPoints; - bindsTo = systemdMountPoints; - unitConfig.RequiresMountsFor = stateDir; - - preStart = '' - # Clear ./webapps each run. - rm -rf "${stateDir}/webapps" - mkdir -p "${stateDir}/webapps" - ln -s "${pkgs.mfi}/webapps/ROOT.war" "${stateDir}/webapps" - - # Copy initial config only once. - test -e "${stateDir}/conf" || cp -ar "${pkgs.mfi}/conf" "${stateDir}/conf" - test -e "${stateDir}/data" || cp -ar "${pkgs.mfi}/data" "${stateDir}/data" - - # Fix Permissions. - # (Bind-mounts cause errors; ignore exit codes) - chown -fR mfi: "${stateDir}" || true - chmod -fR u=rwX,go= "${stateDir}" || true - ''; - - postStop = '' - rm -rf "${stateDir}/webapps" - ''; - - serviceConfig = { - Type = "simple"; - ExecStart = "${cmd} start"; - ExecStop = "${cmd} stop"; - User = "mfi"; - PermissionsStartOnly = true; - UMask = "0077"; - WorkingDirectory = "${stateDir}"; - }; - }; - }; -} diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index 6f6253e330b7..7e1b01c3081b 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -81,8 +81,8 @@ in rec { (all nixos.tests.boot.uefiUsb) (all nixos.tests.boot-stage1) nixos.tests.hibernate.x86_64-linux # i686 is flaky, see #23107 - nixos.tests.docker.x86_64-linux - nixos.tests.docker-edge.x86_64-linux + nixos.tests.docker + nixos.tests.docker-edge (all nixos.tests.ecryptfs) (all nixos.tests.env) (all nixos.tests.ipv6) diff --git a/nixos/release.nix b/nixos/release.nix index a893a64df1c2..c43034ff44b4 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -263,10 +263,10 @@ in rec { tests.plasma5 = callTest tests/plasma5.nix {}; tests.keymap = callSubTests tests/keymap.nix {}; tests.initrdNetwork = callTest tests/initrd-network.nix {}; - tests.kernel-copperhead = tests/kernel-copperhead.nix {}; - tests.kernel-latest = tests/kernel-latest.nix {}; - tests.kernel-lts = tests/kernel-lts.nix {}; - tests.kernel-params = tests/kernel-params.nix {}; + tests.kernel-copperhead = callTest tests/kernel-copperhead.nix {}; + tests.kernel-latest = callTest tests/kernel-latest.nix {}; + tests.kernel-lts = callTest tests/kernel-lts.nix {}; + tests.kernel-params = callTest tests/kernel-params.nix {}; tests.keystone = callTest tests/keystone.nix {}; tests.kubernetes = hydraJob (import tests/kubernetes.nix { system = "x86_64-linux"; }); tests.latestKernel.login = callTest tests/login.nix { latestKernel = true; }; diff --git a/nixos/tests/hibernate.nix b/nixos/tests/hibernate.nix index db58a2f5c857..a95235887e89 100644 --- a/nixos/tests/hibernate.nix +++ b/nixos/tests/hibernate.nix @@ -37,7 +37,7 @@ import ./make-test.nix (pkgs: { $machine->waitForShutdown; $machine->start; $probe->waitForUnit("network.target"); - $probe->waitUntilSucceeds("echo test | nc machine 4444"); + $probe->waitUntilSucceeds("echo test | nc machine 4444 -q 0"); ''; }) |