diff --git a/modules/graphics.nix b/modules/graphics.nix index 78a009d..347549f 100644 --- a/modules/graphics.nix +++ b/modules/graphics.nix @@ -5,7 +5,7 @@ let export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 export __GLX_VENDOR_LIBRARY_NAME=nvidia export __VK_LAYER_NV_optimus=NVIDIA_only - exec -a "$0" "$@" + exec "$@" ''; in { diff --git a/modules/xorg.nix b/modules/xorg.nix index 4d530ef..ecf61ab 100644 --- a/modules/xorg.nix +++ b/modules/xorg.nix @@ -28,8 +28,6 @@ startx = { enable = true; }; - # lightdm.enable = true; - # sessionCommands = "${pkgs.xorg.xkbcomp}/bin/xkbcomp ${compiledLayout} $DISPLAY"; }; extraLayouts = { us-colemak = { diff --git a/overlays/emacs/default.nix b/overlays/emacs/default.nix index 61d52c4..20f396a 100644 --- a/overlays/emacs/default.nix +++ b/overlays/emacs/default.nix @@ -17,6 +17,6 @@ emacsWithPackagesFromUsePackage { alwaysTangle = true; extraEmacsPackages = epkgs: with epkgs; [ use-package - # (epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins)) + (epkgs.tree-sitter-langs.withPlugins (_: epkgs.tree-sitter-langs.plugins)) ]; } diff --git a/overlays/packages.nix b/overlays/packages.nix index 6085d33..bc5e94c 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -1,6 +1,10 @@ -final: prev: { - mpd_discord_richpresence = prev.callPackage ./mpd-rpc { }; - customscripts = prev.callPackage ./customscripts { }; - gruvbox-icons = prev.callPackage ./gruvbox-icons { }; - mymacs = c: prev.callPackage ./emacs { conf = c; }; +final: prev: +let + call = prev.callPackage; in +{ + mpd_discord_richpresence = call ./mpd-rpc { }; + customscripts = call ./customscripts { }; + gruvbox-icons = call ./gruvbox-icons { }; + mymacs = c: call ./emacs { conf = c; }; + tlauncher = call ./tlauncher { }; } diff --git a/overlays/tlauncher/default.nix b/overlays/tlauncher/default.nix new file mode 100644 index 0000000..b81f5db --- /dev/null +++ b/overlays/tlauncher/default.nix @@ -0,0 +1,72 @@ +{ stdenv +, openjdk8 +, buildFHSUserEnv +, fetchzip +}: + +let + version = "2.86"; + jar = stdenv.mkDerivation { + pname = "tlauncher-jar"; + inherit version; + src = fetchzip { + name = "tlauncher.zip"; + url = "https://dl2.tlauncher.org/f.php?f=files%2FTLauncher-${version}.zip"; + sha256 = "sha256-Tpia/GtPfeO8/Tca0fE7z387FRpkXfS1CtvX/oNJDag="; + stripRoot = false; + }; + installPhase = '' + cp $src/*.jar $out + ''; + }; + fhs = buildFHSUserEnv { + name = "tlauncher"; + runScript = '' + ${openjdk8}/bin/java -jar "${jar}" "$@" + ''; + targetPkgs = pkgs: with pkgs; [ + zip + zlib + alsa-lib + cpio + cups + file + fontconfig + freetype + giflib + glib + gnome2.GConf + gnome2.gnome_vfs + gtk2 + libjpeg + libGL + openjdk8-bootstrap + perl + which + ] ++ + (with xorg; [ + libICE + libX11 + libXcursor + libXext + libXi + libXinerama + libXrandr + xrandr + libXrender + libXt + libXtst + libXtst + libXxf86vm + ]); + }; +in +stdenv.mkDerivation rec { + pname = "tlauncher"; + inherit version; + dontUnpack = true; + installPhase = '' + mkdir $out/{bin,share/applications} -p + install ${fhs}/bin/tlauncher $out/bin + ''; +}