Reformat nix source file using nixfmt
This commit is contained in:
parent
2e4a532958
commit
9201969c1b
220 changed files with 3169 additions and 2487 deletions
|
|
@ -3,28 +3,29 @@
|
|||
buildNpmPackage,
|
||||
importNpmLock,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (srcs.OuterWildsTextAdventure) src date version;
|
||||
in
|
||||
buildNpmPackage {
|
||||
pname = "OuterWildsTextAdventure";
|
||||
version = "0-unstable.${date}-git${version}";
|
||||
inherit src;
|
||||
buildNpmPackage {
|
||||
pname = "OuterWildsTextAdventure";
|
||||
version = "0-unstable.${date}-git${version}";
|
||||
inherit src;
|
||||
|
||||
npmDeps = importNpmLock {
|
||||
npmRoot = src;
|
||||
};
|
||||
npmDeps = importNpmLock {
|
||||
npmRoot = src;
|
||||
};
|
||||
|
||||
npmBuildScript = "bundle";
|
||||
npmBuildScript = "bundle";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -rt $out/ index.html data p5.min.js bundle.js bundle.js.map
|
||||
mkdir -p $out
|
||||
cp -rt $out/ index.html data p5.min.js bundle.js bundle.js.map
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
npmConfigHook = importNpmLock.npmConfigHook;
|
||||
}
|
||||
npmConfigHook = importNpmLock.npmConfigHook;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
}:
|
||||
symlinkJoin {
|
||||
name = "QQ";
|
||||
paths = [qq];
|
||||
paths = [ qq ];
|
||||
inherit (qq) meta;
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{srcs}: let
|
||||
{ srcs }:
|
||||
let
|
||||
inherit (srcs) TrackersListCollection;
|
||||
in
|
||||
TrackersListCollection.src
|
||||
TrackersListCollection.src
|
||||
|
|
|
|||
|
|
@ -8,34 +8,37 @@
|
|||
gnugrep,
|
||||
lib,
|
||||
makeWrapper,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (srcs.cliphist) src date version;
|
||||
in
|
||||
cliphist.overrideAttrs (_final: prev: {
|
||||
cliphist.overrideAttrs (
|
||||
_final: prev: {
|
||||
inherit src;
|
||||
version =
|
||||
if prev.version != "0.6.1"
|
||||
then
|
||||
if prev.version != "0.6.1" then
|
||||
throw ''
|
||||
Please remove <pkgs/cliphist.nix>
|
||||
''
|
||||
else "0-unstable-${date}-git${version}";
|
||||
else
|
||||
"0-unstable-${date}-git${version}";
|
||||
vendorHash = "sha256-No8d9ztepBO+fgF2XkEf/tyCPDAD57rBkzA8iVyNUmw=";
|
||||
buildInputs =
|
||||
(prev.buildInputs or [])
|
||||
++ [
|
||||
makeWrapper
|
||||
];
|
||||
buildInputs = (prev.buildInputs or [ ]) ++ [
|
||||
makeWrapper
|
||||
];
|
||||
postInstall = ''
|
||||
cp -t $out/bin/ $src/contrib/*
|
||||
rm $out/bin/cliphist.service
|
||||
wrapProgram $out/bin/cliphist-fuzzel-img \
|
||||
--prefix PATH : ${lib.makeBinPath [
|
||||
imagemagick
|
||||
wl-clipboard
|
||||
fuzzel
|
||||
gawk
|
||||
gnugrep
|
||||
]}
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
imagemagick
|
||||
wl-clipboard
|
||||
fuzzel
|
||||
gawk
|
||||
gnugrep
|
||||
]
|
||||
}
|
||||
'';
|
||||
})
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -79,6 +79,5 @@ symlinkJoin {
|
|||
zls
|
||||
ty
|
||||
];
|
||||
postBuild = ''
|
||||
'';
|
||||
postBuild = '''';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,18 +2,19 @@
|
|||
nixosTests,
|
||||
srcs,
|
||||
stdenvNoCC,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
source = srcs.noto-sans-cjk;
|
||||
in
|
||||
stdenvNoCC.mkDerivation (_finalAttrs: {
|
||||
pname = "noto-sans-cjk";
|
||||
version = source.version;
|
||||
stdenvNoCC.mkDerivation (_finalAttrs: {
|
||||
pname = "noto-sans-cjk";
|
||||
version = source.version;
|
||||
|
||||
src = source.src;
|
||||
src = source.src;
|
||||
|
||||
installPhase = ''
|
||||
install -m444 -Dt $out/share/fonts/opentype/noto-sans-cjk Sans/OTC/*.ttc
|
||||
'';
|
||||
installPhase = ''
|
||||
install -m444 -Dt $out/share/fonts/opentype/noto-sans-cjk Sans/OTC/*.ttc
|
||||
'';
|
||||
|
||||
passthru.tests.noto-fonts = nixosTests.noto-fonts;
|
||||
})
|
||||
passthru.tests.noto-fonts = nixosTests.noto-fonts;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,18 +2,19 @@
|
|||
nixosTests,
|
||||
srcs,
|
||||
stdenvNoCC,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
source = srcs.noto-serif-cjk;
|
||||
in
|
||||
stdenvNoCC.mkDerivation (_finalAttrs: {
|
||||
pname = "noto-serif-cjk";
|
||||
version = source.version;
|
||||
stdenvNoCC.mkDerivation (_finalAttrs: {
|
||||
pname = "noto-serif-cjk";
|
||||
version = source.version;
|
||||
|
||||
src = source.src;
|
||||
src = source.src;
|
||||
|
||||
installPhase = ''
|
||||
install -m444 -Dt $out/share/fonts/opentype/noto-serif-cjk Serif/OTC/*.ttc
|
||||
'';
|
||||
installPhase = ''
|
||||
install -m444 -Dt $out/share/fonts/opentype/noto-serif-cjk Serif/OTC/*.ttc
|
||||
'';
|
||||
|
||||
passthru.tests.noto-fonts = nixosTests.noto-fonts;
|
||||
})
|
||||
passthru.tests.noto-fonts = nixosTests.noto-fonts;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,36 +5,31 @@
|
|||
symlinkJoin,
|
||||
makeWrapper,
|
||||
lib,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (inputs.helix.packages."${system}") helix;
|
||||
helixWithPassthru =
|
||||
helix
|
||||
// {
|
||||
passthru =
|
||||
helix.passthru
|
||||
// {
|
||||
languages = lib.pipe "${helix.src}/languages.toml" [
|
||||
builtins.readFile
|
||||
builtins.fromTOML
|
||||
];
|
||||
};
|
||||
helixWithPassthru = helix // {
|
||||
passthru = helix.passthru // {
|
||||
languages = lib.pipe "${helix.src}/languages.toml" [
|
||||
builtins.readFile
|
||||
builtins.fromTOML
|
||||
];
|
||||
};
|
||||
runtime = callPackage ./runtime.nix {};
|
||||
};
|
||||
runtime = callPackage ./runtime.nix { };
|
||||
in
|
||||
symlinkJoin {
|
||||
name = "helix-wrapped";
|
||||
paths = [helixWithPassthru];
|
||||
inherit (helixWithPassthru) meta;
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/hx \
|
||||
--set HELIX_RUNTIME ${runtime}
|
||||
'';
|
||||
passthru =
|
||||
helixWithPassthru.passthru
|
||||
// {
|
||||
helix-unwrapped = helixWithPassthru;
|
||||
};
|
||||
}
|
||||
symlinkJoin {
|
||||
name = "helix-wrapped";
|
||||
paths = [ helixWithPassthru ];
|
||||
inherit (helixWithPassthru) meta;
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/hx \
|
||||
--set HELIX_RUNTIME ${runtime}
|
||||
'';
|
||||
passthru = helixWithPassthru.passthru // {
|
||||
helix-unwrapped = helixWithPassthru;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
srcs,
|
||||
stdenv,
|
||||
runCommandNoCCLocal,
|
||||
}: let
|
||||
buildGrammar = grammar:
|
||||
}:
|
||||
let
|
||||
buildGrammar =
|
||||
grammar:
|
||||
stdenv.mkDerivation {
|
||||
pname = "helix-tree-sitter-${grammar.name}";
|
||||
version = grammar.version;
|
||||
|
|
@ -78,20 +80,20 @@
|
|||
}
|
||||
)
|
||||
|> lib.mapAttrsToList (_: value: "ln -s ${value.value}/${value.name}.so $out/${value.name}.so");
|
||||
grammarDir = runCommandNoCCLocal "helix-grammars" {} ''
|
||||
grammarDir = runCommandNoCCLocal "helix-grammars" { } ''
|
||||
mkdir -p $out
|
||||
|
||||
${builtins.concatStringsSep "\n" grammarLinks}
|
||||
'';
|
||||
queryDir = runCommandNoCCLocal "helix-query" {} ''
|
||||
queryDir = runCommandNoCCLocal "helix-query" { } ''
|
||||
mkdir -p $out
|
||||
|
||||
${builtins.concatStringsSep "\n" queries}
|
||||
'';
|
||||
in
|
||||
runCommandNoCCLocal "helix-runtime" {} ''
|
||||
mkdir -p $out
|
||||
runCommandNoCCLocal "helix-runtime" { } ''
|
||||
mkdir -p $out
|
||||
|
||||
ln -s ${grammarDir} $out/grammars
|
||||
ln -s ${queryDir} $out/queries
|
||||
''
|
||||
ln -s ${grammarDir} $out/grammars
|
||||
ln -s ${queryDir} $out/queries
|
||||
''
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{...}: {}
|
||||
{ ... }: { }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.blink-cmp = {
|
||||
enable = true;
|
||||
setupLspCapabilities = true;
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
};
|
||||
menu = {
|
||||
draw = {
|
||||
treesitter = ["lsp"];
|
||||
treesitter = [ "lsp" ];
|
||||
};
|
||||
};
|
||||
documentation = {
|
||||
|
|
@ -41,8 +42,13 @@
|
|||
};
|
||||
};
|
||||
sources = {
|
||||
compat = [];
|
||||
default = ["lsp" "path" "snippets" "buffer"];
|
||||
compat = [ ];
|
||||
default = [
|
||||
"lsp"
|
||||
"path"
|
||||
"snippets"
|
||||
"buffer"
|
||||
];
|
||||
};
|
||||
cmdline = {
|
||||
enabled = false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins = {
|
||||
lazydev = {
|
||||
enable = true;
|
||||
|
|
@ -6,7 +7,7 @@
|
|||
library = [
|
||||
{
|
||||
path = "$''{3rd}/luv/library";
|
||||
words = ["vim%.uv"];
|
||||
words = [ "vim%.uv" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.mini-ai = {
|
||||
enable = true;
|
||||
luaConfig.pre =
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.mini-pairs = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.ts-comments.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins = {
|
||||
# grug-far = {
|
||||
# enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.gitsigns = {
|
||||
enable = true;
|
||||
luaConfig.post =
|
||||
|
|
@ -24,19 +25,41 @@
|
|||
numhl = true;
|
||||
linehl = false;
|
||||
signs = {
|
||||
add = {text = "┃";};
|
||||
change = {text = "┃";};
|
||||
delete = {text = "";};
|
||||
topdelete = {text = "";};
|
||||
changedelete = {text = "┃";};
|
||||
untracked = {text = "┃";};
|
||||
add = {
|
||||
text = "┃";
|
||||
};
|
||||
change = {
|
||||
text = "┃";
|
||||
};
|
||||
delete = {
|
||||
text = "";
|
||||
};
|
||||
topdelete = {
|
||||
text = "";
|
||||
};
|
||||
changedelete = {
|
||||
text = "┃";
|
||||
};
|
||||
untracked = {
|
||||
text = "┃";
|
||||
};
|
||||
};
|
||||
signs_staged = {
|
||||
add = {text = "┃";};
|
||||
change = {text = "┃";};
|
||||
delete = {text = "";};
|
||||
topdelete = {text = "";};
|
||||
changedelete = {text = "┃";};
|
||||
add = {
|
||||
text = "┃";
|
||||
};
|
||||
change = {
|
||||
text = "┃";
|
||||
};
|
||||
delete = {
|
||||
text = "";
|
||||
};
|
||||
topdelete = {
|
||||
text = "";
|
||||
};
|
||||
changedelete = {
|
||||
text = "┃";
|
||||
};
|
||||
};
|
||||
on_attach = {
|
||||
__raw =
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.trouble = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -16,7 +17,10 @@
|
|||
border = "rounded";
|
||||
title = "Preview";
|
||||
title_pos = "center";
|
||||
position = [0 (-2)];
|
||||
position = [
|
||||
0
|
||||
(-2)
|
||||
];
|
||||
size = {
|
||||
width = 0.3;
|
||||
height = 0.3;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins = {
|
||||
which-key = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,82 +1,85 @@
|
|||
{...}: {
|
||||
userCommands = let
|
||||
formatCmd = {
|
||||
desc = "Format all the buffer";
|
||||
# conform.format function can deal with range by itself
|
||||
range = "%";
|
||||
bang = true;
|
||||
bar = true;
|
||||
nargs = "?";
|
||||
complete = {
|
||||
__raw =
|
||||
#lua
|
||||
''
|
||||
function(ArgLead, CmdLine, CursorPos)
|
||||
return vim.iter(require("conform").list_all_formatters()):filter(function(val)
|
||||
return val.available
|
||||
end):map(function(val)
|
||||
{ ... }:
|
||||
{
|
||||
userCommands =
|
||||
let
|
||||
formatCmd = {
|
||||
desc = "Format all the buffer";
|
||||
# conform.format function can deal with range by itself
|
||||
range = "%";
|
||||
bang = true;
|
||||
bar = true;
|
||||
nargs = "?";
|
||||
complete = {
|
||||
__raw =
|
||||
#lua
|
||||
''
|
||||
function(ArgLead, CmdLine, CursorPos)
|
||||
return vim.iter(require("conform").list_all_formatters()):filter(function(val)
|
||||
return val.available
|
||||
end):map(function(val)
|
||||
return val.name
|
||||
end):filter(function(name)
|
||||
return string.match(name, "^" .. ArgLead) ~= nil
|
||||
end):totable()
|
||||
end
|
||||
'';
|
||||
};
|
||||
command = {
|
||||
__raw =
|
||||
#lua
|
||||
''
|
||||
function(opts)
|
||||
local format = require("conform").format
|
||||
if #(opts.fargs) == 0 then
|
||||
return format()
|
||||
else
|
||||
return format({ formatters = { opts.fargs[1] } })
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
Format = formatCmd;
|
||||
Fmt = formatCmd;
|
||||
Formatter = {
|
||||
desc = "Show config of formatter";
|
||||
nargs = "?";
|
||||
bar = true;
|
||||
complete = {
|
||||
__raw =
|
||||
#lua
|
||||
''
|
||||
function(ArgLead, CmdLine, CursorPos)
|
||||
return vim.iter(require("conform").list_all_formatters()):map(function(val)
|
||||
return val.name
|
||||
end):filter(function(name)
|
||||
return string.match(name, "^" .. ArgLead) ~= nil
|
||||
end):totable()
|
||||
end
|
||||
'';
|
||||
};
|
||||
command = {
|
||||
__raw =
|
||||
#lua
|
||||
''
|
||||
function(opts)
|
||||
local format = require("conform").format
|
||||
if #(opts.fargs) == 0 then
|
||||
return format()
|
||||
else
|
||||
return format({ formatters = { opts.fargs[1] } })
|
||||
end):filter(function(name)
|
||||
return string.match(name, "^" .. ArgLead) ~= nil
|
||||
end):totable()
|
||||
end
|
||||
end
|
||||
'';
|
||||
'';
|
||||
};
|
||||
command = {
|
||||
__raw =
|
||||
#lua
|
||||
''
|
||||
function(opts)
|
||||
local conform = require("conform")
|
||||
if #(opts.fargs) == 0 then
|
||||
local formatters = conform.list_all_formatters()
|
||||
print(vim.inspect(formatters))
|
||||
return formatters
|
||||
else
|
||||
local config = conform.get_formatter_config(opts.fargs[1])
|
||||
print(vim.inspect(config))
|
||||
return config
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
Format = formatCmd;
|
||||
Fmt = formatCmd;
|
||||
Formatter = {
|
||||
desc = "Show config of formatter";
|
||||
nargs = "?";
|
||||
bar = true;
|
||||
complete = {
|
||||
__raw =
|
||||
#lua
|
||||
''
|
||||
function(ArgLead, CmdLine, CursorPos)
|
||||
return vim.iter(require("conform").list_all_formatters()):map(function(val)
|
||||
return val.name
|
||||
end):filter(function(name)
|
||||
return string.match(name, "^" .. ArgLead) ~= nil
|
||||
end):totable()
|
||||
end
|
||||
'';
|
||||
};
|
||||
command = {
|
||||
__raw =
|
||||
#lua
|
||||
''
|
||||
function(opts)
|
||||
local conform = require("conform")
|
||||
if #(opts.fargs) == 0 then
|
||||
local formatters = conform.list_all_formatters()
|
||||
print(vim.inspect(formatters))
|
||||
return formatters
|
||||
else
|
||||
local config = conform.get_formatter_config(opts.fargs[1])
|
||||
print(vim.inspect(config))
|
||||
return config
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = {
|
||||
|
|
@ -89,7 +92,10 @@
|
|||
'';
|
||||
};
|
||||
key = "=";
|
||||
mode = ["n" "v"];
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
options = {
|
||||
desc = "Format with conform";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{...}: {}
|
||||
{ ... }: { }
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic.plugins.conform-nvim.settings = {
|
||||
formatters_by_ft.c = {
|
||||
__unkeyed-1 = "clang-format";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic.plugins.conform-nvim.settings = {
|
||||
formatters_by_ft.cpp = {
|
||||
__unkeyed-1 = "clang-format";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
extraPackagesAfter = with pkgs; [idris2Packages.idris2Lsp];
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
extraPackagesAfter = with pkgs; [ idris2Packages.idris2Lsp ];
|
||||
lsp.servers.idris2 = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic.plugins.conform-nvim.settings = {
|
||||
formatters_by_ft.json = {
|
||||
__unkeyed-1 = "deno_fmt";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
lsp.servers.lua_ls = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic.plugins.conform-nvim.settings = {
|
||||
formatters_by_ft.markdown = {
|
||||
__unkeyed-1 = "deno_fmt";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
lsp.servers = {
|
||||
nixd = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic.plugins.conform-nvim.settings = {
|
||||
formatters_by_ft.python = {
|
||||
__unkeyed-1 = "ruff_format";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic.plugins.conform-nvim.settings = {
|
||||
formatters_by_ft.rust = {
|
||||
__unkeyed-1 = "rustfmt";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic.plugins.conform-nvim.settings = {
|
||||
formatters_by_ft.toml = {
|
||||
__unkeyed-1 = "taplo";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
youthlic.plugins.conform-nvim.settings = {
|
||||
formatters_by_ft.yaml = {
|
||||
__unkeyed-1 = "deno_fmt";
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{...}: {}
|
||||
{ ... }: { }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.lspconfig.enable = true;
|
||||
lsp = {
|
||||
inlayHints.enable = true;
|
||||
|
|
|
|||
|
|
@ -3,27 +3,35 @@
|
|||
config,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.plugins = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule ({
|
||||
name,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
freeformType = lib.types.anything;
|
||||
options = {
|
||||
enable = lib.mkEnableOption "nvimPlugins.${name}";
|
||||
};
|
||||
}));
|
||||
default = {};
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{
|
||||
name,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
freeformType = lib.types.anything;
|
||||
options = {
|
||||
enable = lib.mkEnableOption "nvimPlugins.${name}";
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
config = let
|
||||
enabledPlugins = lib.filterAttrs (_name: value: value.enable) cfg.plugins;
|
||||
in
|
||||
config =
|
||||
let
|
||||
enabledPlugins = lib.filterAttrs (_name: value: value.enable) cfg.plugins;
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
plugins = enabledPlugins;
|
||||
|
|
@ -32,14 +40,16 @@ in {
|
|||
plugins = lib.pipe enabledPlugins [
|
||||
builtins.attrNames
|
||||
(lib.filter (name: options.plugins.${name} ? luaConfig))
|
||||
(map (name:
|
||||
(map (
|
||||
name:
|
||||
lib.nameValuePair name {
|
||||
luaConfig.post =
|
||||
#lua
|
||||
''
|
||||
_M.load("${name}")
|
||||
'';
|
||||
}))
|
||||
}
|
||||
))
|
||||
lib.listToAttrs
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
extraConfigLua =
|
||||
#lua
|
||||
''
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
globals = {
|
||||
mapleader = {
|
||||
__raw =
|
||||
|
|
@ -11,7 +12,11 @@
|
|||
opts = {
|
||||
autoindent = true;
|
||||
autoread = true;
|
||||
backspace = ["indent" "eol" "start"];
|
||||
backspace = [
|
||||
"indent"
|
||||
"eol"
|
||||
"start"
|
||||
];
|
||||
backup = false;
|
||||
|
||||
breakindent = true;
|
||||
|
|
@ -21,18 +26,33 @@
|
|||
cdhome = true;
|
||||
cedit = "<C-F>";
|
||||
cmdheight = 1;
|
||||
completeopt = ["fuzzy" "menuone" "noselect" "popup"];
|
||||
completeopt = [
|
||||
"fuzzy"
|
||||
"menuone"
|
||||
"noselect"
|
||||
"popup"
|
||||
];
|
||||
concealcursor = "v";
|
||||
confirm = true;
|
||||
cursorline = true;
|
||||
diffopt = ["algorithm:minimal" "closeoff" "context:20" "followwrap" "internal" "linematch:40"];
|
||||
diffopt = [
|
||||
"algorithm:minimal"
|
||||
"closeoff"
|
||||
"context:20"
|
||||
"followwrap"
|
||||
"internal"
|
||||
"linematch:40"
|
||||
];
|
||||
errorbells = true;
|
||||
expandtab = true;
|
||||
exrc = true;
|
||||
foldcolumn = "auto";
|
||||
fsync = true;
|
||||
gdefault = false;
|
||||
helplang = ["zh" "en"];
|
||||
helplang = [
|
||||
"zh"
|
||||
"en"
|
||||
];
|
||||
history = 10000;
|
||||
hlsearch = true;
|
||||
|
||||
|
|
@ -66,11 +86,17 @@
|
|||
termguicolors = true;
|
||||
undofile = true;
|
||||
undolevels = 100000;
|
||||
virtualedit = ["block" "onemore"];
|
||||
virtualedit = [
|
||||
"block"
|
||||
"onemore"
|
||||
];
|
||||
whichwrap = "b,s,<,>";
|
||||
wildmenu = true;
|
||||
wildmode = ["full"];
|
||||
wildoptions = ["fuzzy" "pum"];
|
||||
wildmode = [ "full" ];
|
||||
wildoptions = [
|
||||
"fuzzy"
|
||||
"pum"
|
||||
];
|
||||
winborder = "rounded";
|
||||
wrap = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ makeNixvimWithModule {
|
|||
inherit nixvimPlugins;
|
||||
};
|
||||
module = {
|
||||
imports = with lib; youthlic.loadImports' ./. (filter (name: !hasSuffix "/package.nix" (toString name)));
|
||||
imports =
|
||||
with lib;
|
||||
youthlic.loadImports' ./. (filter (name: !hasSuffix "/package.nix" (toString name)));
|
||||
enableMan = true;
|
||||
enablePrintInit = true;
|
||||
package = neovim_git;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.bufferline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
colorschemes.gruvbox = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.lualine = {
|
||||
enable = true;
|
||||
luaConfig.pre =
|
||||
|
|
@ -16,6 +17,6 @@
|
|||
vim.o.laststatus = vim.g.lualine_laststatus
|
||||
end
|
||||
'';
|
||||
settings = {};
|
||||
settings = { };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
extraConfigLuaPre =
|
||||
#lua
|
||||
''
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
youthlic.plugins.snacks = {
|
||||
enable = true;
|
||||
luaConfig.content =
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{nixvimPlugins, ...}: {
|
||||
{ nixvimPlugins, ... }:
|
||||
{
|
||||
extraPlugins = [
|
||||
{
|
||||
config =
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
srcs,
|
||||
vimUtils,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (srcs.nvim_vim-startuptime) src version date;
|
||||
in
|
||||
vimUtils.buildVimPlugin {
|
||||
pname = "vim-startuptime";
|
||||
version = "0-unstable-${date}-git${version}";
|
||||
inherit src;
|
||||
}
|
||||
vimUtils.buildVimPlugin {
|
||||
pname = "vim-startuptime";
|
||||
version = "0-unstable-${date}-git${version}";
|
||||
inherit src;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,19 +2,20 @@
|
|||
rustPlatform,
|
||||
srcs,
|
||||
git,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (srcs) radicle-ci-broker;
|
||||
in
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "radicle-ci-broker";
|
||||
version = "0-unstable-${radicle-ci-broker.date}-git${radicle-ci-broker.version}";
|
||||
inherit (radicle-ci-broker) src;
|
||||
nativeBuildInputs = [git];
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "radicle-ci-broker";
|
||||
version = "0-unstable-${radicle-ci-broker.date}-git${radicle-ci-broker.version}";
|
||||
inherit (radicle-ci-broker) src;
|
||||
nativeBuildInputs = [ git ];
|
||||
|
||||
cargoLock = {
|
||||
lockFile = "${finalAttrs.src}/Cargo.lock";
|
||||
allowBuiltinFetchGit = true;
|
||||
};
|
||||
cargoLock = {
|
||||
lockFile = "${finalAttrs.src}/Cargo.lock";
|
||||
allowBuiltinFetchGit = true;
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
})
|
||||
doCheck = false;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -25,11 +25,14 @@
|
|||
scheme = "https";
|
||||
}
|
||||
];
|
||||
}).overrideAttrs (prev: {
|
||||
postInstall =
|
||||
(prev.postInstall or "")
|
||||
+ ''
|
||||
ln -s ${rootPath + "/assets/radicle-explorer/youthlic-seed-header.png"} $out/images/youthlic-seed-header.png
|
||||
ln -s ${rootPath + "/assets/radicle-explorer/youthlic-seed-avatar.jpg"} $out/images/youthlic-seed-avatar.jpg
|
||||
}).overrideAttrs
|
||||
(prev: {
|
||||
postInstall = (prev.postInstall or "") + ''
|
||||
ln -s ${
|
||||
rootPath + "/assets/radicle-explorer/youthlic-seed-header.png"
|
||||
} $out/images/youthlic-seed-header.png
|
||||
ln -s ${
|
||||
rootPath + "/assets/radicle-explorer/youthlic-seed-avatar.jpg"
|
||||
} $out/images/youthlic-seed-avatar.jpg
|
||||
'';
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,32 +2,36 @@
|
|||
srcs,
|
||||
stdenv,
|
||||
unzip,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (srcs.rime-yuhaostar) src version;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "rime-yuhaostar";
|
||||
version =
|
||||
if version != "v3.9.0"
|
||||
then
|
||||
throw ''
|
||||
Please update 宇浩输入法。
|
||||
''
|
||||
else version;
|
||||
inherit src;
|
||||
nativeBuildInputs = [unzip];
|
||||
stdenv.mkDerivation {
|
||||
pname = "rime-yuhaostar";
|
||||
version =
|
||||
if version != "v3.9.0" then
|
||||
throw ''
|
||||
Please update 宇浩输入法。
|
||||
''
|
||||
else
|
||||
version;
|
||||
inherit src;
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
sourceRoot = "schema";
|
||||
sourceRoot = "schema";
|
||||
|
||||
patches = [./punctuator.patch ./key_binder.patch];
|
||||
patches = [
|
||||
./punctuator.patch
|
||||
./key_binder.patch
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/rime-data
|
||||
cp -rt $out/share/rime-data -- ./*
|
||||
rm $out/share/rime-data/default.custom.yaml
|
||||
mkdir -p $out/share/rime-data
|
||||
cp -rt $out/share/rime-data -- ./*
|
||||
rm $out/share/rime-data/default.custom.yaml
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,28 +5,29 @@
|
|||
perl,
|
||||
symlinkJoin,
|
||||
srcs,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (srcs) spotx;
|
||||
spotifyx = spotify.overrideAttrs (_final: prev: {
|
||||
nativeBuildInputs =
|
||||
prev.nativeBuildInputs
|
||||
++ [
|
||||
spotifyx = spotify.overrideAttrs (
|
||||
_final: prev: {
|
||||
nativeBuildInputs = prev.nativeBuildInputs ++ [
|
||||
unzip
|
||||
zip
|
||||
perl
|
||||
];
|
||||
spotx = spotx.src;
|
||||
postUnpack = ''
|
||||
cp $spotx/spotx.sh ./spotx.sh
|
||||
chmod +x ./spotx.sh
|
||||
patchShebangs --build ./spotx.sh
|
||||
'';
|
||||
postInstall = ''
|
||||
./spotx.sh -P $out/share/spotify -h
|
||||
'';
|
||||
});
|
||||
spotx = spotx.src;
|
||||
postUnpack = ''
|
||||
cp $spotx/spotx.sh ./spotx.sh
|
||||
chmod +x ./spotx.sh
|
||||
patchShebangs --build ./spotx.sh
|
||||
'';
|
||||
postInstall = ''
|
||||
./spotx.sh -P $out/share/spotify -h
|
||||
'';
|
||||
}
|
||||
);
|
||||
in
|
||||
symlinkJoin {
|
||||
name = "spotifyx";
|
||||
paths = [spotifyx];
|
||||
}
|
||||
symlinkJoin {
|
||||
name = "spotifyx";
|
||||
paths = [ spotifyx ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,18 @@
|
|||
runCommandNoCCLocal,
|
||||
rootPath,
|
||||
lib,
|
||||
}: let
|
||||
wallpapers = with lib; srcs |> filterAttrs (name: _value: hasPrefix "wallpaper" name) |> concatMapAttrsStringSep "\n" (name: value: "ln -s ${value.src} $out/${name}");
|
||||
}:
|
||||
let
|
||||
wallpapers =
|
||||
with lib;
|
||||
srcs
|
||||
|> filterAttrs (name: _value: hasPrefix "wallpaper" name)
|
||||
|> concatMapAttrsStringSep "\n" (name: value: "ln -s ${value.src} $out/${name}");
|
||||
in
|
||||
runCommandNoCCLocal "wallpapers" {} ''
|
||||
mkdir -p $out
|
||||
runCommandNoCCLocal "wallpapers" { } ''
|
||||
mkdir -p $out
|
||||
|
||||
${wallpapers}
|
||||
${wallpapers}
|
||||
|
||||
ln -s ${rootPath + "/assets/wallpaper/01.png"} $out/01.png
|
||||
''
|
||||
ln -s ${rootPath + "/assets/wallpaper/01.png"} $out/01.png
|
||||
''
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
{
|
||||
srcs,
|
||||
wshowkeys,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (srcs) wshowkeys-mao;
|
||||
in
|
||||
wshowkeys.overrideAttrs (_final: _prev: {
|
||||
wshowkeys.overrideAttrs (
|
||||
_final: _prev: {
|
||||
inherit (wshowkeys-mao) src;
|
||||
pname = "wshowkeys-mao";
|
||||
version = wshowkeys-mao.date + "-" + wshowkeys-mao.version;
|
||||
})
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue