mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
services/barrier: drop module
Upstream package removed and unmaintained project. Recommended to replace with maintained alternatives such as `deskflow` and `input-leap` Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
b52ece2bb6
commit
06e268d66b
4 changed files with 4 additions and 114 deletions
|
|
@ -81,6 +81,10 @@ let
|
|||
(lib.mkRemovedOptionModule [ "programs" "octant" ] ''
|
||||
Octant is no longer maintained and project was archived.
|
||||
'')
|
||||
(lib.mkRemovedOptionModule [ "services" "barrier" ] ''
|
||||
The corresponding package was removed from nixpkgs,
|
||||
consider using `deskflow` or `input-leap` instead.
|
||||
'')
|
||||
]
|
||||
++ (lib.concatMap
|
||||
(
|
||||
|
|
|
|||
|
|
@ -1,96 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
getExe'
|
||||
mkEnableOption
|
||||
mkOption
|
||||
optional
|
||||
types
|
||||
;
|
||||
|
||||
cfg = config.services.barrier;
|
||||
in
|
||||
{
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ kritnich ];
|
||||
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule [ "services" "barrier" "client" "tray" ] ''
|
||||
The tray option is non-functional and has been removed.
|
||||
'')
|
||||
];
|
||||
|
||||
options.services.barrier = {
|
||||
|
||||
package = lib.mkPackageOption pkgs "barrier" { };
|
||||
|
||||
client = {
|
||||
|
||||
enable = mkEnableOption "Barrier Client daemon";
|
||||
|
||||
name = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Screen name of client. Defaults to hostname.
|
||||
'';
|
||||
};
|
||||
|
||||
server = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
Server to connect to formatted as
|
||||
`<host>[:<port>]`.
|
||||
Port defaults to `24800`.
|
||||
'';
|
||||
};
|
||||
|
||||
enableCrypto = mkEnableOption "crypto (SSL) plugin" // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
enableDragDrop = mkEnableOption "file drag & drop";
|
||||
|
||||
extraFlags = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "-f" ];
|
||||
defaultText = lib.literalExpression ''[ "-f" ]'';
|
||||
description = ''
|
||||
Additional flags to pass to {command}`barrierc`.
|
||||
See {command}`barrierc --help`.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.client.enable {
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "services.barrier" pkgs lib.platforms.linux)
|
||||
];
|
||||
|
||||
systemd.user.services.barrierc = {
|
||||
Unit = {
|
||||
Description = "Barrier Client daemon";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service.ExecStart =
|
||||
with cfg.client;
|
||||
toString (
|
||||
[ "${getExe' cfg.package "barrierc"}" ]
|
||||
++ optional (name != null) "--name ${name}"
|
||||
++ optional (!enableCrypto) "--disable-crypto"
|
||||
++ optional enableDragDrop "--enable-drag-drop"
|
||||
++ extraFlags
|
||||
++ [ server ]
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
services.barrier.client = {
|
||||
enable = true;
|
||||
server = "testServer";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
clientServiceFile=home-files/.config/systemd/user/barrierc.service
|
||||
|
||||
assertFileExists $clientServiceFile
|
||||
assertFileRegex $clientServiceFile 'ExecStart=.*/bin/barrierc -f testServer'
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
barrier-basic-configuration = ./basic-configuration.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue