summaryrefslogtreecommitdiff
path: root/nix_archive/nix/scripts.nix
blob: 2f53a2a5e53a9d117f91dc0959913cfc8c8066ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config, lib, pkgs, ... }:
let
  loc = config.local;
  colo = loc.scheme;
in {
  environment.etc = {
    "emoji.json".source = builtins.fetchurl {
      url = "https://raw.githubusercontent.com/github/gemoji/0eca75db9301421efc8710baf7a7576793ae452a/db/emoji.json";
      sha256 = "sha256-sXSuKusyG1L2Stuf9BL5ZqfzOIOdeAeE3RXcrXAsLdY=";
    };
  };
  environment.systemPackages = with pkgs; [
    (writeShellScriptBin "bemenu-colored" ''
      bemenu -C --single-instance -B 0 -M 0 --hp 6 \
      --fn "${loc.font.name} ${toString (loc.font.size - 1)}" -H ${toString ((loc.font.size * 2) - 4)} \
      --cf "#${colo.foreground}" --cb "#${colo.background}" \
      --hf "#${colo.background}" --hb "#${colo.color4}" \
      --nf "#${colo.foreground}" --nb "#${colo.background}" \
      --ff "#${colo.foreground}" --fb "#${colo.background}" \
      --af "#${colo.foreground}" --ab "#${colo.background}" -p ""
    '')
  ] ++ (lib.lists.forEach loc.scripts.imports (x: pkgs.writeTextFile {
    name = x;
    text = (builtins.readFile ../../scripts/desktop/${x});
    executable = true;
    destination = "/bin/${x}";
  }));
}