summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/ades/iso.nix6
-rw-r--r--hosts/ades/thin-shim.nix41
-rw-r--r--hosts/default.nix1
3 files changed, 4 insertions, 44 deletions
diff --git a/hosts/ades/iso.nix b/hosts/ades/iso.nix
index 79db210..a0bd2e5 100644
--- a/hosts/ades/iso.nix
+++ b/hosts/ades/iso.nix
@@ -1,4 +1,4 @@
-{ modulesPath, lib, config, pkgs, ... }:
+{ modulesPath, lib, tlib, config, pkgs, ... }:
let
inherit (lib.attrsets)
@@ -6,6 +6,8 @@ let
inherit (builtins)
map;
+ mkThinShim = tlib.mkThinShim pkgs;
+
shimmedPackages = [
"wesnoth"
"luanti"
@@ -17,8 +19,6 @@ let
"taisei"
"unvanquished"
];
-
- mkThinShim = import ./thin-shim.nix pkgs;
in
rec {
imports = [
diff --git a/hosts/ades/thin-shim.nix b/hosts/ades/thin-shim.nix
deleted file mode 100644
index a9f931b..0000000
--- a/hosts/ades/thin-shim.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-pkgs:
-let
- inherit (builtins)
- map elem;
-
- inherit (pkgs) stdenv;
-in
-pkg: inst:
-stdenv.mkDerivation {
- pname = pkg.pname + "-shim";
- version = pkg.version;
- nativeBuildInputs = [pkg];
- dontUnpack = true;
- buildPhase = ''
-if [ -d ${pkg}/bin ]; then
- mkdir -p "$out/bin"
- for exe in $(ls "${pkg}/bin/"); do
- cat >"$out/bin/$exe" <<EOF
-#!/bin/sh
-
-term=urxvt
-which \$term >/dev/null 2>&1 || term=xterm
-
-if [ "\$DISPLAY" ]; then
- \$term -e nix shell '${inst}' --command '$exe' \$*
-else
- nix shell '${inst}' --command '$exe' \$*
-fi
-EOF
- chmod +x "$out/bin/$exe"
- done
-fi
-
-for dir in "share/applications" "share/icons"; do
- if [ -d "${pkg}/$dir" ]; then
- mkdir -p "$out/$dir"
- cp -a "${pkg}/$dir/"* "$out/$dir"
- fi
-done
-'';
-}
diff --git a/hosts/default.nix b/hosts/default.nix
index d5770c6..8ba60fb 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -9,6 +9,7 @@ let
modules = [ ../modules ../users ] ++ modules;
specialArgs = {
inherit hostname inputs;
+ tlib = import ../lib { };
};
};
};