feat: Change nix formatter to alejandra

This commit is contained in:
ulic-youthlic 2025-11-09 06:25:03 +08:00
parent 0b8b647f05
commit b4c3dfec42
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
229 changed files with 2528 additions and 2884 deletions

View file

@ -3,29 +3,28 @@
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;
}

View file

@ -6,7 +6,7 @@
}:
symlinkJoin {
name = "QQ";
paths = [ qq ];
paths = [qq];
inherit (qq) meta;
buildInputs = [
makeWrapper

View file

@ -1,5 +1,4 @@
{ srcs }:
let
{srcs}: let
inherit (srcs) TrackersListCollection;
in
TrackersListCollection.src
TrackersListCollection.src

View file

@ -8,37 +8,38 @@
gnugrep,
lib,
makeWrapper,
}:
let
}: let
inherit (srcs.cliphist) src date version;
in
cliphist.overrideAttrs (
_final: prev: {
inherit src;
version =
if prev.version != "0.6.1" then
throw ''
Please remove <pkgs/cliphist.nix>
''
else
"0-unstable-${date}-git${version}";
vendorHash = "sha256-4XyDLOJHdre/1BpjgFt/W6gOlPOvKztE+MsbwE3JAaQ=";
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
]
}
'';
}
)
cliphist.overrideAttrs (
_final: prev: {
inherit src;
version =
if prev.version != "0.6.1"
then
throw ''
Please remove <pkgs/cliphist.nix>
''
else "0-unstable-${date}-git${version}";
vendorHash = "sha256-4XyDLOJHdre/1BpjgFt/W6gOlPOvKztE+MsbwE3JAaQ=";
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
]
}
'';
}
)

View file

@ -4,12 +4,11 @@
editor-runtime,
symlinkJoin,
makeWrapper,
}:
let
}: let
inherit (stdenv.hostPlatform) system;
inherit (inputs) nixpkgs emacs-overlay nix-doom;
pkgs = import nixpkgs {
localSystem = { inherit system; };
localSystem = {inherit system;};
overlays = [
emacs-overlay.overlays.default
nix-doom.overlays.default
@ -20,8 +19,8 @@ let
doomDir = ./config;
doomLocalDir = "~/.local/share/nix-doom";
emacs = emacs;
extraPackages =
ep: with ep; [
extraPackages = ep:
with ep; [
melpaPackages.telega
melpaPackages.nixos-options
melpaPackages.scroll-on-jump
@ -38,29 +37,29 @@ let
];
};
in
symlinkJoin {
name = "doom-emacs";
paths = [ doom-emacs ];
inherit (doom-emacs) meta;
buildInputs = [
makeWrapper
];
env = {
ORIGINAL_EMACS = toString emacs;
};
postBuild = ''
wrapProgram $out/bin/doom-emacs \
--unset EMACSNATIVELOADPATH \
--unset EMACSLOADPATH \
--inherit-argv0
symlinkJoin {
name = "doom-emacs";
paths = [doom-emacs];
inherit (doom-emacs) meta;
buildInputs = [
makeWrapper
];
env = {
ORIGINAL_EMACS = toString emacs;
};
postBuild = ''
wrapProgram $out/bin/doom-emacs \
--unset EMACSNATIVELOADPATH \
--unset EMACSLOADPATH \
--inherit-argv0
mkdir -p $out/share/applications
cp ''${ORIGINAL_EMACS}/share/applications/emacs.desktop \
$out/share/applications/doom-emacs.desktop
cp -rt $out/share ''${ORIGINAL_EMACS}/share/icons
substituteInPlace $out/share/applications/doom-emacs.desktop \
--replace 'Name=Emacs' 'Name=Doom Emacs' \
--replace 'Exec=emacs' "Exec=$out/bin/doom-emacs" \
--replace 'StartupWMClass=Emacs' "StartupWMClass=Doom Emacs"
'';
}
mkdir -p $out/share/applications
cp ''${ORIGINAL_EMACS}/share/applications/emacs.desktop \
$out/share/applications/doom-emacs.desktop
cp -rt $out/share ''${ORIGINAL_EMACS}/share/icons
substituteInPlace $out/share/applications/doom-emacs.desktop \
--replace 'Name=Emacs' 'Name=Doom Emacs' \
--replace 'Exec=emacs' "Exec=$out/bin/doom-emacs" \
--replace 'StartupWMClass=Emacs' "StartupWMClass=Doom Emacs"
'';
}

View file

@ -2,19 +2,18 @@
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;
})

View file

@ -2,19 +2,18 @@
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;
})

View file

@ -4,14 +4,12 @@
callPackage,
buildEnv,
lib,
}:
let
}: let
inherit (stdenv.hostPlatform) system;
inherit (inputs.helix.packages."${system}") helix;
runtime = callPackage ./runtime.nix { };
runtime = callPackage ./runtime.nix {};
helix' = helix.overrideAttrs (
_final: prev:
let
_final: prev: let
helix-runtime = buildEnv {
name = "helix-runtime";
paths = [
@ -19,18 +17,19 @@ let
prev.env.HELIX_DEFAULT_RUNTIME
];
};
in
{
in {
env.HELIX_DEFAULT_RUNTIME = toString helix-runtime;
}
);
in
helix'
// {
passthru = (helix'.passthru or { }) // {
languages = lib.pipe "${helix.src}/languages.toml" [
builtins.readFile
builtins.fromTOML
];
};
}
helix'
// {
passthru =
(helix'.passthru or {})
// {
languages = lib.pipe "${helix.src}/languages.toml" [
builtins.readFile
builtins.fromTOML
];
};
}

View file

@ -3,10 +3,8 @@
srcs,
stdenv,
runCommandLocal,
}:
let
buildGrammar =
grammar:
}: let
buildGrammar = grammar:
stdenv.mkDerivation {
pname = "helix-tree-sitter-${grammar.name}";
version = grammar.version;
@ -60,10 +58,9 @@ let
runHook postFixup
'';
};
grammars = with lib; pipe srcs [ (filterAttrs (key: _: hasPrefix "tree-sitter-" key)) ];
grammars = with lib; pipe srcs [(filterAttrs (key: _: hasPrefix "tree-sitter-" key))];
queries =
with lib;
queries = with lib;
pipe grammars [
(mapAttrsToList (
_: value: ''
@ -73,8 +70,7 @@ let
''
))
];
grammarLinks =
with lib;
grammarLinks = with lib;
pipe grammars [
(builtins.mapAttrs (
_: v: {
@ -84,20 +80,20 @@ let
))
(mapAttrsToList (_: value: "ln -s ${value.value}/${value.name}.so $out/${value.name}.so"))
];
grammarDir = runCommandLocal "helix-grammars" { } ''
grammarDir = runCommandLocal "helix-grammars" {} ''
mkdir -p $out
${builtins.concatStringsSep "\n" grammarLinks}
'';
queryDir = runCommandLocal "helix-query" { } ''
queryDir = runCommandLocal "helix-query" {} ''
mkdir -p $out
${builtins.concatStringsSep "\n" queries}
'';
in
runCommandLocal "helix-runtime" { } ''
mkdir -p $out
runCommandLocal "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
''

View file

@ -1 +1 @@
{ ... }: { }
{...}: {}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.blink-cmp = {
enable = true;
setupLspCapabilities = true;
@ -26,7 +25,7 @@
};
menu = {
draw = {
treesitter = [ "lsp" ];
treesitter = ["lsp"];
};
};
documentation = {
@ -42,7 +41,7 @@
};
};
sources = {
compat = [ ];
compat = [];
default = [
"lsp"
"path"

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins = {
lazydev = {
enable = true;
@ -7,7 +6,7 @@
library = [
{
path = "$''{3rd}/luv/library";
words = [ "vim%.uv" ];
words = ["vim%.uv"];
}
];
};

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.mini-ai = {
enable = true;
luaConfig.pre =

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.mini-pairs = {
enable = true;
settings = {

View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
youthlic.plugins.ts-comments.enable = true;
}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins = {
# grug-far = {
# enable = true;

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.gitsigns = {
enable = true;
luaConfig.post =

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.trouble = {
enable = true;
settings = {

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins = {
which-key = {
enable = true;

View file

@ -1,85 +1,82 @@
{ ... }:
{
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)
{...}: {
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):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
'';
};
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
'';
};
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 = {

View file

@ -1 +1 @@
{ ... }: { }
{...}: {}

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.c = {
__unkeyed-1 = "clang-format";

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.cpp = {
__unkeyed-1 = "clang-format";

View file

@ -1,6 +1,5 @@
{ pkgs, ... }:
{
extraPackagesAfter = with pkgs; [ idris2Packages.idris2Lsp ];
{pkgs, ...}: {
extraPackagesAfter = with pkgs; [idris2Packages.idris2Lsp];
lsp.servers.idris2 = {
enable = true;
};

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.json = {
__unkeyed-1 = "deno_fmt";

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
lsp.servers.lua_ls = {
enable = true;
};

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.markdown = {
__unkeyed-1 = "deno_fmt";

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
lsp.servers = {
nixd = {
enable = true;

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.python = {
__unkeyed-1 = "ruff_format";

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.rust = {
__unkeyed-1 = "rustfmt";

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.toml = {
__unkeyed-1 = "taplo";

View file

@ -2,8 +2,7 @@
lib,
pkgs,
...
}:
{
}: {
youthlic.plugins.conform-nvim.settings = {
formatters_by_ft.yaml = {
__unkeyed-1 = "deno_fmt";

View file

@ -1 +1 @@
{ ... }: { }
{...}: {}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.lspconfig.enable = true;
lsp = {
inlayHints.enable = true;

View file

@ -3,11 +3,9 @@
config,
options,
...
}:
let
}: let
cfg = config.youthlic;
in
{
in {
options = {
youthlic.plugins = lib.mkOption {
type = lib.types.attrsOf (
@ -16,8 +14,7 @@ in
name,
lib,
...
}:
{
}: {
freeformType = lib.types.anything;
options = {
enable = lib.mkEnableOption "nvimPlugins.${name}";
@ -25,13 +22,12 @@ in
}
)
);
default = { };
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;
@ -42,13 +38,13 @@ in
(lib.filter (name: options.plugins.${name} ? luaConfig))
(map (
name:
lib.nameValuePair name {
luaConfig.post =
#lua
''
_M.load("${name}")
'';
}
lib.nameValuePair name {
luaConfig.post =
#lua
''
_M.load("${name}")
'';
}
))
lib.listToAttrs
];

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
extraConfigLua =
#lua
''

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
globals = {
mapleader = {
__raw =
@ -92,7 +91,7 @@
];
whichwrap = "b,s,<,>";
wildmenu = true;
wildmode = [ "full" ];
wildmode = ["full"];
wildoptions = [
"fuzzy"
"pum"

View file

@ -11,8 +11,7 @@ makeNixvimWithModule {
inherit nixvimPlugins;
};
module = {
imports =
with lib;
imports = with lib;
youthlic.loadImports' ./. (filter (name: !hasSuffix "/package.nix" (toString name)));
enableMan = true;
enablePrintInit = true;

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins = {
treesitter = {
enable = true;

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.bufferline = {
enable = true;
settings = {

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
colorschemes.gruvbox = {
enable = true;
settings = {

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.lualine = {
enable = true;
luaConfig.pre =
@ -17,6 +16,6 @@
vim.o.laststatus = vim.g.lualine_laststatus
end
'';
settings = { };
settings = {};
};
}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
extraConfigLuaPre =
#lua
''

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
youthlic.plugins.snacks = {
enable = true;
luaConfig.content =

View file

@ -1,5 +1,4 @@
{ nixvimPlugins, ... }:
{
{nixvimPlugins, ...}: {
extraPlugins = [
{
config =

View file

@ -1,12 +1,11 @@
{
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;
}

View file

@ -26,8 +26,10 @@
}
];
}).overrideAttrs
(prev: {
postInstall = (prev.postInstall or "") + ''
(prev: {
postInstall =
(prev.postInstall or "")
+ ''
ln -s ${
rootPath + "/assets/radicle-explorer/youthlic-seed-header.png"
} $out/images/youthlic-seed-header.png
@ -35,4 +37,4 @@
rootPath + "/assets/radicle-explorer/youthlic-seed-avatar.jpg"
} $out/images/youthlic-seed-avatar.jpg
'';
})
})

View file

@ -2,36 +2,35 @@
srcs,
stdenv,
unzip,
}:
let
}: let
inherit (srcs.rime-yuhaostar) src version;
in
stdenv.mkDerivation {
pname = "rime-yuhaostar";
version =
if version != "v3.10.0" then
throw ''
Please update
''
else
version;
inherit src;
nativeBuildInputs = [ unzip ];
stdenv.mkDerivation {
pname = "rime-yuhaostar";
version =
if version != "v3.10.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
'';
}

View file

@ -3,25 +3,25 @@
spotifyd,
rustPlatform,
...
}:
let
}: let
inherit (srcs.spotifyd) src date version;
in
spotifyd.overrideAttrs (
_final: prev: {
inherit src;
version =
if prev.version != "0.4.1" then
throw ''
Please remove <pkgs/spotifyd.nix>
''
else
"0-unstable-${date}-git${version}";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (prev)
src
;
hash = "sha256-WwShp1ebk89cBqRXqKDgbwGZraCDjQAOxoL4uEIq2aw=";
};
}
)
spotifyd.overrideAttrs (
_final: prev: {
inherit src;
version =
if prev.version != "0.4.1"
then
throw ''
Please remove <pkgs/spotifyd.nix>
''
else "0-unstable-${date}-git${version}";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit
(prev)
src
;
hash = "sha256-WwShp1ebk89cBqRXqKDgbwGZraCDjQAOxoL4uEIq2aw=";
};
}
)

View file

@ -5,31 +5,32 @@
perl,
makeWrapper,
srcs,
}:
let
}: let
inherit (srcs) spotx;
in
spotify.overrideAttrs (
_final: prev: {
nativeBuildInputs = prev.nativeBuildInputs ++ [
unzip
zip
perl
makeWrapper
];
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 -p
'';
postFixup = ''
wrapProgram $out/bin/spotify \
--set NIXOS_OZONE_WL 1 \
--add-flags '--wayland-text-input-version=3'
'';
}
)
spotify.overrideAttrs (
_final: prev: {
nativeBuildInputs =
prev.nativeBuildInputs
++ [
unzip
zip
perl
makeWrapper
];
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 -p
'';
postFixup = ''
wrapProgram $out/bin/spotify \
--set NIXOS_OZONE_WL 1 \
--add-flags '--wayland-text-input-version=3'
'';
}
)

View file

@ -1,4 +1,7 @@
{ vim-full, vimPlugins }:
{
vim-full,
vimPlugins,
}:
vim-full.customize {
name = "vim";
@ -9,7 +12,7 @@ vim-full.customize {
vim-one
vim-airline
];
opt = [ ];
opt = [];
};
};
}

View file

@ -3,19 +3,17 @@
runCommandLocal,
rootPath,
lib,
}:
let
wallpapers =
with lib;
}: let
wallpapers = with lib;
pipe srcs [
(filterAttrs (name: _value: hasPrefix "wallpaper" name))
(concatMapAttrsStringSep "\n" (name: value: "ln -s ${value.src} $out/${name}"))
];
in
runCommandLocal "wallpapers" { } ''
mkdir -p $out
runCommandLocal "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
''

View file

@ -1,14 +1,13 @@
{
srcs,
wshowkeys,
}:
let
}: let
inherit (srcs) wshowkeys-mao;
in
wshowkeys.overrideAttrs (
_final: _prev: {
inherit (wshowkeys-mao) src;
pname = "wshowkeys-mao";
version = wshowkeys-mao.date + "-" + wshowkeys-mao.version;
}
)
wshowkeys.overrideAttrs (
_final: _prev: {
inherit (wshowkeys-mao) src;
pname = "wshowkeys-mao";
version = wshowkeys-mao.date + "-" + wshowkeys-mao.version;
}
)