Merge pull request #30057 from dtzWill/feature/webos-novacomd
webos: init novacom, novacomd, cmake-modules; add nixos service
This commit is contained in:
@@ -342,6 +342,7 @@
|
||||
./services/misc/nix-optimise.nix
|
||||
./services/misc/nixos-manual.nix
|
||||
./services/misc/nix-ssh-serve.nix
|
||||
./services/misc/novacomd.nix
|
||||
./services/misc/nzbget.nix
|
||||
./services/misc/octoprint.nix
|
||||
./services/misc/osrm.nix
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.novacomd;
|
||||
|
||||
in {
|
||||
|
||||
options = {
|
||||
services.novacomd = {
|
||||
enable = mkEnableOption "Novacom service for connecting to WebOS devices";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.webos.novacom ];
|
||||
|
||||
systemd.services.novacomd = {
|
||||
description = "Novacom WebOS daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.webos.novacomd}/sbin/novacomd";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ dtzWill ];
|
||||
}
|
||||
@@ -318,6 +318,7 @@ in rec {
|
||||
tests.nfs4 = callTest tests/nfs.nix { version = 4; };
|
||||
tests.nginx = callTest tests/nginx.nix { };
|
||||
tests.nghttpx = callTest tests/nghttpx.nix { };
|
||||
tests.novacomd = callTestOnTheseSystems ["x86_64-linux"] tests/novacomd.nix { };
|
||||
tests.leaps = callTest tests/leaps.nix { };
|
||||
tests.nsd = callTest tests/nsd.nix {};
|
||||
tests.openssh = callTest tests/openssh.nix {};
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "novacomd";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ dtzWill ];
|
||||
};
|
||||
|
||||
machine = { config, pkgs, ... }: {
|
||||
services.novacomd.enable = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
|
||||
$machine->waitForUnit("novacomd.service");
|
||||
|
||||
# Check status and try connecting with novacom
|
||||
$machine->succeed("systemctl status novacomd.service >&2");
|
||||
$machine->succeed("novacom -l");
|
||||
|
||||
# Stop the daemon, double-check novacom fails if daemon isn't working
|
||||
$machine->stopJob("novacomd");
|
||||
$machine->fail("novacom -l");
|
||||
|
||||
# And back again for good measure
|
||||
$machine->startJob("novacomd");
|
||||
$machine->succeed("novacom -l");
|
||||
'';
|
||||
})
|
||||
Reference in New Issue
Block a user