mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-25 06:19:10 +00:00
chore: reformat codebase
This commit is contained in:
parent
947f1da754
commit
15a43cd1e5
@ -24,7 +24,8 @@ in
|
||||
local hsluv = lush.hsluv
|
||||
'';
|
||||
themes =
|
||||
lib.mapAttrs (name: metadata: {
|
||||
lib.mapAttrs
|
||||
(name: metadata: {
|
||||
extraConfigLua = ''
|
||||
${lib.foldlAttrs initLushBase16 "" metadata.palette}
|
||||
|
||||
@ -357,6 +358,7 @@ in
|
||||
"${sym "@text.uri"}" = { fg = mkRaw "base0C"; };
|
||||
})
|
||||
];
|
||||
}) config.bahaghari.tinted-theming.schemes;
|
||||
})
|
||||
config.bahaghari.tinted-theming.schemes;
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
extraPlugins = builtins.map (path:
|
||||
extraPlugins = builtins.map
|
||||
(path:
|
||||
pkgs.runCommand "vim-plugin-bare" { } ''
|
||||
mkdir -p "$out"
|
||||
cp -r ${path}/* "$out"
|
||||
|
@ -27,7 +27,8 @@ in
|
||||
lua = true;
|
||||
} // settings;
|
||||
in
|
||||
lib.mapAttrsToList mkDAPBinding {
|
||||
lib.mapAttrsToList mkDAPBinding
|
||||
{
|
||||
"b" = {
|
||||
options.desc = "Toggle breakpoint";
|
||||
action = "require('dap').toggle_breakpoint";
|
||||
|
@ -28,7 +28,8 @@ in {
|
||||
lib.count (attr: pred attr.name attr.value)
|
||||
(lib.mapAttrsToList lib.nameValuePair attrs);
|
||||
enabledThemes = countAttrs (_: theme: theme.enable) cfg.workflows;
|
||||
in cfg.disableLimit || (enabledThemes <= 1);
|
||||
in
|
||||
cfg.disableLimit || (enabledThemes <= 1);
|
||||
message = "Can't have more than one theme enabled at any given time.";
|
||||
}];
|
||||
};
|
||||
|
@ -8,7 +8,8 @@
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }:
|
||||
let systems = inputs.flake-utils.lib.defaultSystems;
|
||||
in inputs.flake-utils.lib.eachSystem systems (system: {
|
||||
in inputs.flake-utils.lib.eachSystem systems
|
||||
(system: {
|
||||
devShells.default =
|
||||
import ./shell.nix { pkgs = import nixpkgs { inherit system; }; };
|
||||
}) // import ./default.nix { };
|
||||
|
@ -24,7 +24,7 @@
|
||||
${pkgs.lib.getExe' pkgs.yaml2json "yaml2json"} < "${path}" > "$out"
|
||||
'';
|
||||
in
|
||||
pkgs.lib.importJSON dataDrv.outPath;
|
||||
pkgs.lib.importJSON dataDrv;
|
||||
|
||||
/* Convert a given decimal number to a specified base digit with the set of
|
||||
glyphs for each digit as returned from lib.toBaseDigits.
|
||||
@ -34,11 +34,13 @@
|
||||
Example:
|
||||
toBaseDigitWithGlyphs 24 267 {
|
||||
"0" = "0";
|
||||
"1" = "1";
|
||||
"2" = "2";
|
||||
# ...
|
||||
"22" = "L";
|
||||
"23" = "M";
|
||||
"24" = "N";
|
||||
"22" = "O";
|
||||
"23" = "P";
|
||||
}
|
||||
=>
|
||||
*/
|
||||
toBaseDigitsWithGlyphs = base: i: glyphs:
|
||||
let
|
||||
@ -55,10 +57,20 @@
|
||||
|
||||
Example:
|
||||
generateGlyphSet [ "0" "1" "2" "3" "4" "5" "6" "7" "8 "9" "A" "B" "C" "D" "E" "F" ]
|
||||
=> {
|
||||
"0" = "0";
|
||||
"1" = "1";
|
||||
# ...
|
||||
"14" = "E";
|
||||
"15" = "F";
|
||||
}
|
||||
*/
|
||||
generateGlyphSet = glyphsList:
|
||||
let
|
||||
glyphsList' = pkgs.lib.lists.imap0 (i: glyph: { "${builtins.toString i}" = glyph; }) glyphsList;
|
||||
glyphsList' =
|
||||
pkgs.lib.lists.imap0
|
||||
(i: glyph: { "${builtins.toString i}" = glyph; })
|
||||
glyphsList;
|
||||
in
|
||||
pkgs.lib.foldl (acc: glyph: acc // glyph) { } glyphsList';
|
||||
}
|
||||
|
@ -48,9 +48,32 @@ pkgs.lib.runTests {
|
||||
testGenerateBase24GlyphSet = {
|
||||
expr =
|
||||
lib.trivial.generateGlyphSet
|
||||
[ "0" "1" "2" "3" "4" "5" "6" "7"
|
||||
"8" "9" "A" "B" "C" "D" "E" "F"
|
||||
"G" "H" "I" "J" "M" "N" "O" "P" ];
|
||||
[
|
||||
"0"
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
"A"
|
||||
"B"
|
||||
"C"
|
||||
"D"
|
||||
"E"
|
||||
"F"
|
||||
"G"
|
||||
"H"
|
||||
"I"
|
||||
"J"
|
||||
"M"
|
||||
"N"
|
||||
"O"
|
||||
"P"
|
||||
];
|
||||
expected = customBase24Glyphs;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user