autostart vmware-usbarbitrator

This commit is contained in:
Sean Buckley 2022-03-03 10:46:24 -05:00
parent b0ed4a16a0
commit eae459d8fa
4 changed files with 26 additions and 9 deletions

View file

@ -8,6 +8,7 @@
gnome = true;
profile = "desktop";
gaming.enable = true;
horizon.enable = true;
};
environment.etc =
@ -19,11 +20,6 @@
"ssh/ssh_host_rsa_key"
]);
environment.systemPackages = with pkgs; [
wine
vmware-horizon-client
];
services.openssh.enable = true;
users.mutableUsers = false;

View file

@ -23,10 +23,9 @@
sconfig = {
gnome = true;
profile = "desktop";
horizon.enable = true;
};
environment.systemPackages = [ pkgs.vmware-horizon-client ];
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = false;

View file

@ -23,6 +23,7 @@
sconfig = {
gnome = true;
profile = "desktop";
horizon.enable = true;
};
zramSwap.enable = false;
@ -31,8 +32,6 @@
randomEncryption.enable = true;
}];
environment.systemPackages = [ pkgs.vmware-horizon-client ];
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;

23
modules/horizon.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sconfig.horizon;
in
{
options.sconfig.horizon.enable = lib.mkEnableOption "Enable vmware-horizon";
config = lib.mkIf cfg.enable
{
systemd.services.vmware-usbarbitrator = {
serviceConfig.Type = "forking";
wantedBy = [ "multi-user.target" ];
script = "${pkgs.vmware-horizon-client}/bin/vmware-usbarbitrator";
preStart = ''
vdir="/var/run/vmware/$(id -u sean)"
mkdir -p $vdir
chmod 700 $vdir
chown sean $vdir
'';
};
environment.systemPackages = [ pkgs.vmware-horizon-client ];
};
}