mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
autostart vmware-usbarbitrator
This commit is contained in:
parent
b0ed4a16a0
commit
eae459d8fa
4 changed files with 26 additions and 9 deletions
|
@ -8,6 +8,7 @@
|
||||||
gnome = true;
|
gnome = true;
|
||||||
profile = "desktop";
|
profile = "desktop";
|
||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
|
horizon.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc =
|
environment.etc =
|
||||||
|
@ -19,11 +20,6 @@
|
||||||
"ssh/ssh_host_rsa_key"
|
"ssh/ssh_host_rsa_key"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
wine
|
|
||||||
vmware-horizon-client
|
|
||||||
];
|
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
|
@ -23,10 +23,9 @@
|
||||||
sconfig = {
|
sconfig = {
|
||||||
gnome = true;
|
gnome = true;
|
||||||
profile = "desktop";
|
profile = "desktop";
|
||||||
|
horizon.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.vmware-horizon-client ];
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
loader.efi.canTouchEfiVariables = false;
|
loader.efi.canTouchEfiVariables = false;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
sconfig = {
|
sconfig = {
|
||||||
gnome = true;
|
gnome = true;
|
||||||
profile = "desktop";
|
profile = "desktop";
|
||||||
|
horizon.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
zramSwap.enable = false;
|
zramSwap.enable = false;
|
||||||
|
@ -31,8 +32,6 @@
|
||||||
randomEncryption.enable = true;
|
randomEncryption.enable = true;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.vmware-horizon-client ];
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
23
modules/horizon.nix
Normal file
23
modules/horizon.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue