attempt omnissa on arm
This commit is contained in:
@@ -146,4 +146,20 @@ in
|
|||||||
programs = {
|
programs = {
|
||||||
password-store = enabled;
|
password-store = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dconf = {
|
||||||
|
settings = {
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0".name = "Keyboard Backlight +";
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0".binding = "<Shift><Super>MonBrightnessUp";
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0".command = "brightnessctl -d kbd_backlight +10";
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1".name = "Keyboard Backlight -";
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1".binding = "<Shift><Super>MonBrightnessDown";
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1".command = "brightnessctl -d kbd_backlight 10-";
|
||||||
|
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys".custom-keybindings = [
|
||||||
|
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||||
|
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ in
|
|||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
with pkgs;
|
with pkgs;
|
||||||
[
|
[
|
||||||
|
brightnessctl
|
||||||
dconf
|
dconf
|
||||||
disko
|
disko
|
||||||
nil
|
nil
|
||||||
@@ -28,7 +29,6 @@ in
|
|||||||
aspellDicts.en
|
aspellDicts.en
|
||||||
aspellDicts.en-computers
|
aspellDicts.en-computers
|
||||||
aspellDicts.en-science
|
aspellDicts.en-science
|
||||||
brightnessctl
|
|
||||||
ddcui
|
ddcui
|
||||||
ddcutil
|
ddcutil
|
||||||
ddccontrol
|
ddccontrol
|
||||||
|
|||||||
174
packages/omnissa/default.nix
Normal file
174
packages/omnissa/default.nix
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
buildFHSEnv,
|
||||||
|
copyDesktopItems,
|
||||||
|
fetchurl,
|
||||||
|
gsettings-desktop-schemas,
|
||||||
|
makeDesktopItem,
|
||||||
|
makeWrapper,
|
||||||
|
opensc,
|
||||||
|
writeTextDir,
|
||||||
|
configText ? "",
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
version = "2512";
|
||||||
|
|
||||||
|
sysArch =
|
||||||
|
if (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "aarch64-linux") then
|
||||||
|
"x64"
|
||||||
|
else
|
||||||
|
throw "Unsupported system: ${stdenv.hostPlatform.system}";
|
||||||
|
# The downloaded archive also contains ARM binaries, but these have not been tested.
|
||||||
|
|
||||||
|
# For USB support, ensure that /var/run/omnissa/<YOUR-UID>
|
||||||
|
# exists and is owned by you. Then run omnissa-usbarbitrator as root.
|
||||||
|
|
||||||
|
mainProgram = "horizon-client";
|
||||||
|
|
||||||
|
# This forces the default GTK theme (Adwaita) because Horizon is prone to
|
||||||
|
# UI usability issues when using non-default themes, such as Adwaita-dark.
|
||||||
|
# wrapBinCommands = path: name: ''
|
||||||
|
# makeWrapper "$out/${path}/${name}" "$out/bin/${name}_wrapper" \
|
||||||
|
# --set GTK_THEME Adwaita \
|
||||||
|
# --suffix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
|
||||||
|
# --suffix LD_LIBRARY_PATH : "$out/lib/omnissa/horizon/crtbora:$out/lib/omnissa"
|
||||||
|
# '';
|
||||||
|
|
||||||
|
wrapBinCommands = path: name: ''
|
||||||
|
makeWrapper "$out/${path}/${name}" "$out/bin/${name}_wrapper" \
|
||||||
|
--set GTK_THEME Adwaita \
|
||||||
|
--suffix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
|
||||||
|
--suffix LD_LIBRARY_PATH : "$out/lib/omnissa/horizon/crtbora:$out/lib/omnissa:${stdenv.cc.cc.lib}/lib"
|
||||||
|
'';
|
||||||
|
|
||||||
|
omnissaHorizonClientFiles = stdenv.mkDerivation {
|
||||||
|
pname = "omnissa-horizon-files";
|
||||||
|
inherit version;
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://download3.omnissa.com/software/CART26FQ4_LIN_2512_TARBALL/Omnissa-Horizon-Client-Linux-2512-8.17.0-20187591429.tar.gz";
|
||||||
|
hash = "sha256-dYvP3W/tciqwazuVu4ib9gB98JUJykczd7sPCUih/Ew=";
|
||||||
|
};
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir ext
|
||||||
|
find ${sysArch} -type f -print0 | xargs -0n1 tar -Cext --strip-components=1 -xf
|
||||||
|
|
||||||
|
chmod -R u+w ext/usr/lib
|
||||||
|
mv ext/usr $out
|
||||||
|
cp -r ext/${sysArch}/include $out/
|
||||||
|
cp -r ext/${sysArch}/lib $out/
|
||||||
|
|
||||||
|
# Horizon includes a copy of libstdc++ which is loaded via $LD_LIBRARY_PATH
|
||||||
|
# when it cannot detect a new enough version already present on the system.
|
||||||
|
# The checks are distribution-specific and do not function correctly on NixOS.
|
||||||
|
# Deleting the bundled library is the simplest way to force it to use our version.
|
||||||
|
rm "$out/lib/omnissa/gcc/libstdc++.so.6"
|
||||||
|
|
||||||
|
# This opensc library is required to support smartcard authentication during the
|
||||||
|
# initial connection to Horizon.
|
||||||
|
mkdir $out/lib/omnissa/horizon/pkcs11
|
||||||
|
ln -s ${opensc}/lib/pkcs11/opensc-pkcs11.so $out/lib/omnissa/horizon/pkcs11/libopenscpkcs11.so
|
||||||
|
|
||||||
|
${wrapBinCommands "bin" "horizon-client"}
|
||||||
|
${wrapBinCommands "lib/omnissa/horizon/usb" "horizon-eucusbarbitrator"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
omnissaFHSUserEnv =
|
||||||
|
pname:
|
||||||
|
buildFHSEnv {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
|
runScript = "${omnissaHorizonClientFiles}/bin/${pname}_wrapper";
|
||||||
|
|
||||||
|
targetPkgs =
|
||||||
|
pkgs: with pkgs; [
|
||||||
|
at-spi2-atk
|
||||||
|
atk
|
||||||
|
cairo
|
||||||
|
dbus
|
||||||
|
file
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
gcc
|
||||||
|
gdk-pixbuf
|
||||||
|
glib
|
||||||
|
gtk2
|
||||||
|
gtk3-x11
|
||||||
|
harfbuzz
|
||||||
|
liberation_ttf
|
||||||
|
libjpeg
|
||||||
|
libpng
|
||||||
|
libpulseaudio
|
||||||
|
libtiff
|
||||||
|
libudev0-shim
|
||||||
|
libuuid
|
||||||
|
libv4l
|
||||||
|
pango
|
||||||
|
pcsclite
|
||||||
|
pixman
|
||||||
|
udev
|
||||||
|
omnissaHorizonClientFiles
|
||||||
|
openssl
|
||||||
|
libx11
|
||||||
|
libxau
|
||||||
|
libxcursor
|
||||||
|
libxext
|
||||||
|
libxi
|
||||||
|
libxinerama
|
||||||
|
libxkbfile
|
||||||
|
libxrandr
|
||||||
|
libxrender
|
||||||
|
libxscrnsaver
|
||||||
|
libxtst
|
||||||
|
zlib
|
||||||
|
libxml2_13
|
||||||
|
|
||||||
|
(writeTextDir "etc/omnissa/config" configText)
|
||||||
|
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopItem = makeDesktopItem {
|
||||||
|
name = "horizon-client";
|
||||||
|
desktopName = "Omnissa Horizon Client";
|
||||||
|
icon = "${omnissaHorizonClientFiles}/share/icons/horizon-client.png";
|
||||||
|
exec = "${omnissaFHSUserEnv mainProgram}/bin/${mainProgram} %u";
|
||||||
|
mimeTypes = [
|
||||||
|
"x-scheme-handler/horizon-client"
|
||||||
|
"x-scheme-handler/vmware-view"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "omnissa-horizon-client";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ copyDesktopItems ];
|
||||||
|
|
||||||
|
desktopItems = [ desktopItem ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${omnissaFHSUserEnv "horizon-client"}/bin/horizon-client $out/bin/
|
||||||
|
ln -s ${omnissaFHSUserEnv "omnissa-usbarbitrator"}/bin/omnissa-usbarbitrator $out/bin/
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
unwrapped = omnissaHorizonClientFiles;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
inherit mainProgram;
|
||||||
|
description = "Allows you to connect to your Omnissa Horizon virtual desktop";
|
||||||
|
homepage = "https://www.omnissa.com/products/horizon-8/";
|
||||||
|
license = lib.licenses.unfree;
|
||||||
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
maintainers = with lib.maintainers; [ mhutter ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
hardware = {
|
hardware = {
|
||||||
battery = {
|
battery = {
|
||||||
enable = true;
|
enable = true;
|
||||||
battery = " /sys/class/power_supply/macsmc-battery/charge_control_end_threshold";
|
battery = "/sys/class/power_supply/macsmc-battery/charge_control_end_threshold";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
network = {
|
network = {
|
||||||
@@ -130,7 +130,9 @@
|
|||||||
(pkgs.OVMF.override {
|
(pkgs.OVMF.override {
|
||||||
secureBoot = true;
|
secureBoot = true;
|
||||||
})
|
})
|
||||||
];
|
] ++ (with pkgs.${namespace}; [
|
||||||
|
omnissa
|
||||||
|
]);
|
||||||
|
|
||||||
networking.networkmanager.wifi.backend = "iwd";
|
networking.networkmanager.wifi.backend = "iwd";
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/mapper/cryptroot";
|
device = "/dev/mapper/cryptroot";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=home" ];
|
options = [ "subvol=home" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."cryptroot".device =
|
boot.initrd.luks.devices."cryptroot".device =
|
||||||
@@ -44,31 +44,31 @@
|
|||||||
fileSystems."/persist" = {
|
fileSystems."/persist" = {
|
||||||
device = "/dev/mapper/cryptroot";
|
device = "/dev/mapper/cryptroot";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=persist" ];
|
options = [ "subvol=persist" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/etc" = {
|
fileSystems."/etc" = {
|
||||||
device = "/dev/mapper/cryptroot";
|
device = "/dev/mapper/cryptroot";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=etc" ];
|
options = [ "subvol=etc" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/root" = {
|
fileSystems."/root" = {
|
||||||
device = "/dev/mapper/cryptroot";
|
device = "/dev/mapper/cryptroot";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=root" ];
|
options = [ "subvol=root" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" = {
|
fileSystems."/nix" = {
|
||||||
device = "/dev/mapper/cryptroot";
|
device = "/dev/mapper/cryptroot";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=nix" ];
|
options = [ "subvol=nix" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" = {
|
fileSystems."/var/log" = {
|
||||||
device = "/dev/mapper/cryptroot";
|
device = "/dev/mapper/cryptroot";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=log" ];
|
options = [ "subvol=log" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|||||||
Reference in New Issue
Block a user