Compare commits

..

No commits in common. "f0d49bc838e0c97a1becc2830e8cd92a5902612c" and "080c16564fc29243ca8ff151ff0d39bda9bdddf2" have entirely different histories.

3 changed files with 24 additions and 54 deletions

View file

@ -26,10 +26,7 @@
:tray {:spacing 10}
:clock {:tooltip-format "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
:format-alt "{:%Y-%m-%d}"}
:cpu {:format (.. (faccumulate [s "" i 0 (- (cg.opt.system :nproc) 1)]
(.. s "{icon" i "}")) " {usage}% ")
:format-icons ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"]
:interval 2}
:cpu {:format "{usage}% "}
:memory {:format "{}% "}
:temperature {:hwmon-path "<% opt.cpu_temp_hwmon %>"
:critical-threshold 80

View file

@ -3,9 +3,6 @@
, pkgs
, ...
}:
let
luaExpr = val: if val == null then "nil" else "[[${val}]]";
in
{
imports = [
./jvm.nix
@ -24,7 +21,7 @@ in
name = "nix.lua";
text = ''
return {
${builtins.concatStringsSep "\n " (lib.mapAttrsToList (k: v: ''["${k}"] = ${luaExpr v},'') config.cgnix.entries)}
${builtins.concatStringsSep "\n " (lib.mapAttrsToList (k: v: ''["${k}"] = "${v}",'') config.cgnix.entries)}
}
'';
};

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, stdenvNoCC, ... }:
{ config, pkgs, lib, stdenv, ... }:
let
plugin = name: fetchGit { url = "https://git.mzte.de/nvim-plugins/${name}.git"; };
@ -67,7 +67,7 @@ let
in
if (builtins.pathExists path) then
# This derivation exists to patch a potentially mismatched dynamic linker.
stdenvNoCC.mkDerivation
stdenv.mkDerivation
{
name = "mzte-nv-compiler-patched";
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
@ -82,51 +82,27 @@ in
options.cgnix.nvim-plugins = lib.mkOption { };
config.cgnix.nvim-plugins = plugins;
config.cgnix.entries.nvim_plugins = stdenvNoCC.mkDerivation {
name = "nvim-plugins";
config.cgnix.entries.nvim_plugins = pkgs.linkFarm "nvim-plugins"
(lib.mapAttrsToList
(name: src: {
name = name;
path = stdenv.mkDerivation {
name = "${name}-compiled";
inherit src;
nativeBuildInputs = with pkgs; [ luajit luajitPackages.fennel ];
nativeBuildInputs = with pkgs; [ luajit luajitPackages.fennel ];
unpackPhase = ''
# Copy plugins sources here
${builtins.concatStringsSep "\n" (lib.mapAttrsToList
(name: src: "cp -r ${src} ${name}")
config.cgnix.nvim-plugins)}
chmod -R +rw .
'';
buildPhase = ''
# Compile source with mzte-nv-compile
${if mzte-nv-compiler != "" then "${mzte-nv-compiler} ." else ""}
'';
buildPhase = ''
# Compile
${if mzte-nv-compiler != "" then "${mzte-nv-compiler} ." else ""}
'';
installPhase = ''
mkdir -p "$out"
mv * .* "$out"
'';
};
#pkgs.linkFarm "nvim-plugins"
# (lib.mapAttrsToList
# (name: src: {
# name = name;
# path = stdenv.mkDerivation {
# name = "${name}-compiled";
# inherit src;
# nativeBuildInputs = with pkgs; [ luajit luajitPackages.fennel ];
# buildPhase = ''
# # Compile source with mzte-nv-compile
# ${if mzte-nv-compiler != "" then "${mzte-nv-compiler} ." else ""}
# '';
# installPhase = ''
# mkdir -p "$out"
# mv * .* "$out"
# '';
# };
# })
# config.cgnix.nvim-plugins
# );
installPhase = ''
mkdir -p "$out"
mv * .* "$out"
'';
};
})
config.cgnix.nvim-plugins
);
}