mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-05-19 23:43:46 +02:00
Compare commits
3 commits
f0d49bc838
...
b56d389390
Author | SHA1 | Date | |
---|---|---|---|
LordMZTE | b56d389390 | ||
LordMZTE | 3e159a31d1 | ||
LordMZTE | 774f48f30a |
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713537308,
|
"lastModified": 1713714899,
|
||||||
"narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=",
|
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f",
|
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
11
flake.nix
11
flake.nix
|
@ -14,7 +14,6 @@
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
common = pkgs.callPackage ./lib/common-nix { };
|
common = pkgs.callPackage ./lib/common-nix { };
|
||||||
flakePkg = ref: (builtins.getFlake ref).packages.${system}.default;
|
|
||||||
|
|
||||||
root-mod = {
|
root-mod = {
|
||||||
options.packages = nixpkgs.lib.mkOption { };
|
options.packages = nixpkgs.lib.mkOption { };
|
||||||
|
@ -26,16 +25,6 @@
|
||||||
inherit (pkgs) lib stdenv stdenvNoCC;
|
inherit (pkgs) lib stdenv stdenvNoCC;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Local user nix env
|
|
||||||
config.packages.mzte-nix = pkgs.symlinkJoin {
|
|
||||||
name = "mzte-nix";
|
|
||||||
paths = [
|
|
||||||
pkgs.nix-output-monitor
|
|
||||||
pkgs.nix-du
|
|
||||||
(flakePkg "github:nix-community/zon2nix")
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# devshell for the dotfiles
|
# devshell for the dotfiles
|
||||||
config.dev-shells.default = nixpkgs.legacyPackages.${system}.mkShell {
|
config.dev-shells.default = nixpkgs.legacyPackages.${system}.mkShell {
|
||||||
buildInputs = with pkgs;
|
buildInputs = with pkgs;
|
||||||
|
|
|
@ -24,16 +24,23 @@ fn lOnAttach(l: *c.lua_State) !c_int {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (has_inlay_hints) {
|
if (has_inlay_hints) {
|
||||||
|
// func: vim.lsp.inlay_hint.enable
|
||||||
c.lua_getglobal(l, "vim");
|
c.lua_getglobal(l, "vim");
|
||||||
defer c.lua_pop(l, 1);
|
|
||||||
c.lua_getfield(l, -1, "lsp");
|
c.lua_getfield(l, -1, "lsp");
|
||||||
defer c.lua_pop(l, 1);
|
|
||||||
c.lua_getfield(l, -1, "inlay_hint");
|
c.lua_getfield(l, -1, "inlay_hint");
|
||||||
defer c.lua_pop(l, 1);
|
|
||||||
c.lua_getfield(l, -1, "enable");
|
c.lua_getfield(l, -1, "enable");
|
||||||
c.lua_pushnumber(l, bufnr);
|
|
||||||
|
// arg 1: true
|
||||||
c.lua_pushboolean(l, 1);
|
c.lua_pushboolean(l, 1);
|
||||||
|
|
||||||
|
// arg 2: table w/ bufnr
|
||||||
|
c.lua_createtable(l, 0, 1);
|
||||||
|
c.lua_pushnumber(l, bufnr);
|
||||||
|
c.lua_setfield(l, -2, "bufnr");
|
||||||
|
|
||||||
c.lua_call(l, 2, 0);
|
c.lua_call(l, 2, 0);
|
||||||
|
|
||||||
|
c.lua_pop(l, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./cgnix
|
./cgnix
|
||||||
./mcdev.nix
|
./mcdev.nix
|
||||||
./userstyles.nix
|
./mzte-nix.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
18
nix/mzte-nix.nix
Normal file
18
nix/mzte-nix.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
let
|
||||||
|
flakePkg = ref: (builtins.getFlake ref).packages.${pkgs.system}.default;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.mzte-nix-packages = lib.mkOption { };
|
||||||
|
|
||||||
|
config.mzte-nix-packages = [
|
||||||
|
pkgs.nix-output-monitor
|
||||||
|
pkgs.nix-du
|
||||||
|
(flakePkg "github:nix-community/zon2nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
config.packages.mzte-nix = pkgs.symlinkJoin {
|
||||||
|
name = "mzte-nix";
|
||||||
|
paths = config.mzte-nix-packages;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,38 +0,0 @@
|
||||||
# Module that provides an output for a stylus import file with catppuccin themes.
|
|
||||||
{ pkgs, stdenvNoCC, ... }:
|
|
||||||
let
|
|
||||||
flavor = "mocha";
|
|
||||||
accent-color = "red";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
packages.userstyles = stdenvNoCC.mkDerivation {
|
|
||||||
name = "userstyles.json";
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "https://github.com/catppuccin/userstyles/releases/download/all-userstyles-export/import.json";
|
|
||||||
hash = "sha256-eYU9Y95au9mI3muS4+1QJt31W7s2zVmurdKbQ1dU+pk=";
|
|
||||||
};
|
|
||||||
|
|
||||||
dontUnpack = true;
|
|
||||||
|
|
||||||
# TODO: use better language
|
|
||||||
realBuilder = "${pkgs.deno}/bin/deno";
|
|
||||||
args = [
|
|
||||||
"run"
|
|
||||||
"-A"
|
|
||||||
(pkgs.writeText "build.js" ''
|
|
||||||
const json = await import(Deno.env.get("src"), { with: { type: "json" } });
|
|
||||||
const processed = json.default.map(theme => {
|
|
||||||
if (theme.usercssData?.vars?.accentColor?.default)
|
|
||||||
theme.usercssData.vars.accentColor.default = "${accent-color}";
|
|
||||||
|
|
||||||
if (theme.usercssData?.vars?.darkFlavor?.default)
|
|
||||||
theme.usercssData.vars.darkFlavor.default = "${flavor}";
|
|
||||||
|
|
||||||
return theme;
|
|
||||||
});
|
|
||||||
|
|
||||||
Deno.writeTextFileSync(Deno.env.get("out"), JSON.stringify(processed));
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue