mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +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;
|
||||
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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
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