From 6352f821c371f16a9f1bacc48af186d2d9b8b697 Mon Sep 17 00:00:00 2001 From: Hung Date: Sat, 17 Jun 2023 20:32:15 -0700 Subject: [PATCH] add some more hints on the default settings for neovim; just go with alejandra formatter; add more docs on qa --- docs/manual-test/tailwind-color-cmp.md | 12 + native_configs/neovim/init.lua | 65 +++- nix-conf/home-manager/home.nix | 9 +- nix-conf/lib/serde/default.nix | 3 +- nix-conf/pkgs/default.nix | 3 +- .../nixos-wsl/modules/build-tarball.nix | 6 +- nix-conf/system/nixos-wsl/modules/interop.nix | 3 +- .../system/nixos-wsl/modules/wsl-distro.nix | 3 +- nix/cells/home-configs/default.nix | 3 +- nix/cells/packages/default.nix | 3 +- nix/cells/repo/home-modules/default.nix | 350 +++++++++--------- nix/cells/repo/lib/default.nix | 31 +- out-of-tree/flake-compat/default.nix | 15 +- 13 files changed, 296 insertions(+), 210 deletions(-) create mode 100644 docs/manual-test/tailwind-color-cmp.md diff --git a/docs/manual-test/tailwind-color-cmp.md b/docs/manual-test/tailwind-color-cmp.md new file mode 100644 index 0000000..2a6247b --- /dev/null +++ b/docs/manual-test/tailwind-color-cmp.md @@ -0,0 +1,12 @@ +# Neovim: Testing cmp for color with Tailwind + +- [ ] It should detect a project uses tailwind, maybe via some kind of config file +(`tailwind.config.{cjs,mjs,js,ts,json,tsx,toml,yaml}`), or just based on the +string content or via tree-stiter. Check this by `:LspInfo` and `tailwindcss-lsp` +should attach to the current buffer that has tailwind-css string +- [ ] Type in a classname `text-red-500`, just stop at somewhere and start +browsing the cmp-lsp window. It should show a color in place of `lspkind`. +This validates `tailwindcss-colorizer-cmp.nvim` is good +- [ ] Hit that autocomplete, the string should show the color red. This validates +`nvim-colorizer.lua` is properly setup. + diff --git a/native_configs/neovim/init.lua b/native_configs/neovim/init.lua index 5c9386b..6030a33 100644 --- a/native_configs/neovim/init.lua +++ b/native_configs/neovim/init.lua @@ -104,7 +104,7 @@ WPlug('kyazdani42/nvim-web-devicons') -- icons for folder and filetype WPlug('m-demare/hlargs.nvim') -- highlights arguments; great for func prog WPlug('folke/todo-comments.nvim') -- Highlights TODO WPlug('NvChad/nvim-colorizer.lua') -- color highlighter with tailwind support -WPlug('roobert/tailwindcss-colorizer-cmp.nvim') -- color highlighter with tailwind support +WPlug('roobert/tailwindcss-colorizer-cmp.nvim') -- color for tailiwnd for compe -- other utilities WPlug('nvim-treesitter/nvim-treesitter-context') -- Top one-liner context of func/class scope @@ -112,6 +112,7 @@ WPlug('nvim-treesitter/playground') -- Sees Treesitter AST - less h WPlug('saadparwaiz1/cmp_luasnip') -- snippet engine WPlug('L3MON4D3/LuaSnip') -- snippet engine WPlug('mickael-menu/zk-nvim') -- Zettelkasten +WPlug('folke/neodev.nvim') -- Neovim + lua development setup -- Switch cases: -- `gsp` -> PascalCase (classes), `gsc` -> camelCase (Java), `gs_` -> snake_case (C/C++/Rust) -- `gsu` -> UPPER_CASE (CONSTs), `gsk` -> kebab-case (Clojure), `gsK` -> Title-Kebab-Case @@ -241,7 +242,57 @@ colorscheme gruvbox ]]) require('hlargs').setup() require('nvim-web-devicons').setup() -require('trouble').setup() +require('trouble').setup { + position = "bottom", -- position of the list can be: bottom, top, left, right + height = 10, -- height of the trouble list when position is top or bottom + width = 50, -- width of the list when position is left or right + icons = true, -- use devicons for filenames + mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist" + severity = nil, -- nil (ALL) or vim.diagnostic.severity.ERROR | WARN | INFO | HINT + fold_open = "", -- icon used for open folds + fold_closed = "", -- icon used for closed folds + group = true, -- group results by file + padding = true, -- add an extra new line on top of the list + action_keys = { + -- key mappings for actions in the trouble list + -- map to {} to remove a mapping, for example: + -- close = {}, + close = "q", -- close the list + cancel = "", -- cancel the preview and get back to your last window / buffer / cursor + refresh = "r", -- manually refresh + jump = { "", "" }, -- jump to the diagnostic or open / close folds + open_split = { "" }, -- open buffer in new split + open_vsplit = { "" }, -- open buffer in new vsplit + open_tab = { "" }, -- open buffer in new tab + jump_close = { "o" }, -- jump to the diagnostic and close the list + toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode + switch_severity = "s", -- switch "diagnostics" severity filter level to HINT / INFO / WARN / ERROR + toggle_preview = "P", -- toggle auto_preview + hover = "K", -- opens a small popup with the full multiline message + preview = "p", -- preview the diagnostic location + close_folds = { "zM", "zm" }, -- close all folds + open_folds = { "zR", "zr" }, -- open all folds + toggle_fold = { "zA", "za" }, -- toggle fold of current file + previous = "k", -- previous item + next = "j" -- next item + }, + indent_lines = true, -- add an indent guide below the fold icons + auto_open = false, -- automatically open the list when you have diagnostics + auto_close = false, -- automatically close the list when you have no diagnostics + auto_preview = true, -- automatically preview the location of the diagnostic. to close preview and go back to last window + auto_fold = false, -- automatically fold a file trouble list at creation + auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result + signs = { + -- icons / text used for a diagnostic + error = "", + warning = "", + hint = "", + information = "", + other = "", + }, + use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client +} + -- TODO: Any way to collect all the TODOs and its variants? require('todo-comments').setup() @@ -922,10 +973,10 @@ require('mason-lspconfig').setup_handlers({ defaultConfig = { indent_style = "space", indent_size = 4, - } - } - } - } + }, + }, + }, + }, } end, ["pyright"] = function() @@ -1002,7 +1053,7 @@ require('mason-lspconfig').setup_handlers({ settings = { ["nil"] = { formatting = { - command = {"nix", "run", "nixpkgs#alejandra"}, + command = { "nix", "run", "nixpkgs#alejandra" }, }, nix = { flake = { diff --git a/nix-conf/home-manager/home.nix b/nix-conf/home-manager/home.nix index 3c1dfde..4510639 100644 --- a/nix-conf/home-manager/home.nix +++ b/nix-conf/home-manager/home.nix @@ -4,11 +4,14 @@ # Additional configurations goes to profiles/ # or inlined in flake.nix { - config, # Represents the realized final configuration - pkgs, # This is by default just ``= import {}` + config, + # Represents the realized final configuration + pkgs, + # This is by default just ``= import {}` myHome, myLib, - option, # The options we're given, this might be useful for typesafety? + option, + # The options we're given, this might be useful for typesafety? proj_root, ... }: let diff --git a/nix-conf/lib/serde/default.nix b/nix-conf/lib/serde/default.nix index dd4c05f..8a50344 100644 --- a/nix-conf/lib/serde/default.nix +++ b/nix-conf/lib/serde/default.nix @@ -9,7 +9,8 @@ pkgs.callPackage ({runCommand}: # runCommand source: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/trivial-builders.nix#L33 - runCommand outputPath { + runCommand outputPath + { inherit yamlContent; nativeBuildInputs = [pkgs.yq]; } diff --git a/nix-conf/pkgs/default.nix b/nix-conf/pkgs/default.nix index 1f03b27..81eccdd 100644 --- a/nix-conf/pkgs/default.nix +++ b/nix-conf/pkgs/default.nix @@ -3,7 +3,8 @@ { pkgs, lib, - naersk, # rust packages + naersk, + # rust packages ... } @ pkgs_input: { # dot-hwtr = import "./dot-hwtr" pkgs_input; diff --git a/nix-conf/system/nixos-wsl/modules/build-tarball.nix b/nix-conf/system/nixos-wsl/modules/build-tarball.nix index f0d82e0..7f974af 100644 --- a/nix-conf/system/nixos-wsl/modules/build-tarball.nix +++ b/nix-conf/system/nixos-wsl/modules/build-tarball.nix @@ -4,9 +4,11 @@ lib, ... }: -with builtins; with lib; let +with builtins; +with lib; let pkgs2storeContents = l: - map (x: { + map + (x: { object = x; symlink = "none"; }) diff --git a/nix-conf/system/nixos-wsl/modules/interop.nix b/nix-conf/system/nixos-wsl/modules/interop.nix index 4557aee..ae825eb 100644 --- a/nix-conf/system/nixos-wsl/modules/interop.nix +++ b/nix-conf/system/nixos-wsl/modules/interop.nix @@ -4,7 +4,8 @@ config, ... }: -with builtins; with lib; { +with builtins; +with lib; { imports = [ (mkRenamedOptionModule ["wsl" "compatibility" "interopPreserveArgvZero"] ["wsl" "interop" "preserveArgvZero"]) ]; diff --git a/nix-conf/system/nixos-wsl/modules/wsl-distro.nix b/nix-conf/system/nixos-wsl/modules/wsl-distro.nix index c7ba346..bf4f58c 100644 --- a/nix-conf/system/nixos-wsl/modules/wsl-distro.nix +++ b/nix-conf/system/nixos-wsl/modules/wsl-distro.nix @@ -4,7 +4,8 @@ config, ... }: -with builtins; with lib; { +with builtins; +with lib; { options.wsl = with types; let coercedToStr = coercedTo (oneOf [bool path int]) toString str; in { diff --git a/nix/cells/home-configs/default.nix b/nix/cells/home-configs/default.nix index 656a82c..027783e 100644 --- a/nix/cells/home-configs/default.nix +++ b/nix/cells/home-configs/default.nix @@ -2,5 +2,4 @@ inputs, cell, }: let -in { -} +in {} diff --git a/nix/cells/packages/default.nix b/nix/cells/packages/default.nix index aa49c70..d2b2fc2 100644 --- a/nix/cells/packages/default.nix +++ b/nix/cells/packages/default.nix @@ -1,5 +1,4 @@ { inputs, cell, -}: { -} +}: {} diff --git a/nix/cells/repo/home-modules/default.nix b/nix/cells/repo/home-modules/default.nix index b5e90df..34e5d8a 100644 --- a/nix/cells/repo/home-modules/default.nix +++ b/nix/cells/repo/home-modules/default.nix @@ -1,188 +1,200 @@ # This is an interface for home-profiles and should not contain opinionated # configurations. It should provide alternative configurations, aggregates # or new configurations -_imports@{inputs, cell}: let +_imports@{ inputs, cell }: +let namespace = "repo"; - imports = _imports // {inherit namespace;}; -in { - git = { config , lib , ... }: let - cfg = config."${namespace}".git; - baseAliases = { - a = "add"; - c = "commit"; - ca = "commit --amend"; - cm = "commit -m"; - lol = "log --graph --decorate --pretty=oneline --abbrev-commit"; - lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all"; - sts = "status"; - co = "checkout"; - b = "branch"; - }; - default-user = "Pegasust"; - default-email = "pegasucksgg@gmail.com"; - in { - options."${namespace}".git = { - aliases = lib.mkOption { - type = lib.types.attrs; - default = { }; - example = baseAliases; - description = '' - Additional git aliases. This settings comes with base configuration. - Redeclaring the base config will override the values. - ''; # TODO: Add baseAliases as string here (builtins.toString doesn't work) + imports = _imports // { inherit namespace; }; +in +{ + git = { config, lib, ... }: + let + cfg = config."${namespace}".git; + baseAliases = { + a = "add"; + c = "commit"; + ca = "commit --amend"; + cm = "commit -m"; + lol = "log --graph --decorate --pretty=oneline --abbrev-commit"; + lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all"; + sts = "status"; + co = "checkout"; + b = "branch"; }; - name = lib.mkOption { - type = lib.types.str; - default = default-user; - description = "Git username that appears on commits"; - example = default-user; + default-user = "Pegasust"; + default-email = "pegasucksgg@gmail.com"; + in + { + options."${namespace}".git = { + aliases = lib.mkOption { + type = lib.types.attrs; + default = { }; + example = baseAliases; + description = '' + Additional git aliases. This settings comes with base configuration. + Redeclaring the base config will override the values. + ''; # TODO: Add baseAliases as string here (builtins.toString doesn't work) + }; + name = lib.mkOption { + type = lib.types.str; + default = default-user; + description = "Git username that appears on commits"; + example = default-user; + }; + email = lib.mkOption { + type = lib.types.str; + default = default-email; + example = default-email; + description = "Git email that appears on commits"; + }; + ignores = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ + ".vscode" # vscode settings + ".direnv" # .envrc cached outputs + ".DS_Store" # MacOS users, amrite + ]; + description = '' + .gitignore patterns that are applied in every "${namespace}"sitory. + This is useful for IDE-specific settings. + ''; + example = [ ".direnv" "node_modules" ]; + }; + enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Enables git + ''; + example = false; + }; + credentialCacheTimeoutSeconds = lib.mkOption { + type = lib.types.int; + default = 3000; + description = "Credential cache (in-memory store) for Git in seconds."; + example = 3000; + }; }; - email = lib.mkOption { - type = lib.types.str; - default = default-email; - example = default-email; - description = "Git email that appears on commits"; - }; - ignores = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = [ - ".vscode" # vscode settings - ".direnv" # .envrc cached outputs - ".DS_Store" # MacOS users, amrite - ]; - description = '' - .gitignore patterns that are applied in every "${namespace}"sitory. - This is useful for IDE-specific settings. - ''; - example = [ ".direnv" "node_modules" ]; - }; - enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = '' - Enables git - ''; - example = false; - }; - credentialCacheTimeoutSeconds = lib.mkOption { - type = lib.types.int; - default = 3000; - description = "Credential cache (in-memory store) for Git in seconds."; - example = 3000; + # TODO : anyway to override configuration? + # idk wtf I was thinking about. there is no context in this question + config.programs.git = { + inherit (cfg) enable ignores; + userName = cfg.name; + userEmail = cfg.email; + aliases = baseAliases // cfg.aliases; + extraConfig = { + # TODO: in the case of darwin, git always open up the built-in keychain. + # possibly something we can't really control since we don't have access to `nix-darwin` + credential.helper = "cache --timeout=${builtins.toString cfg.credentialCacheTimeoutSeconds}"; + }; + lfs.enable = true; }; }; - # TODO : anyway to override configuration? - # idk wtf I was thinking about. there is no context in this question - config.programs.git = { - inherit (cfg) enable ignores; - userName = cfg.name; - userEmail = cfg.email; - aliases = baseAliases // cfg.aliases; - extraConfig = { - # TODO: in the case of darwin, git always open up the built-in keychain. - # possibly something we can't really control since we don't have access to `nix-darwin` - credential.helper = "cache --timeout=${builtins.toString cfg.credentialCacheTimeoutSeconds}"; - }; - lfs.enable = true; - }; - }; - alacritty = {config, lib}: let - inherit (inputs.cells.repo.lib) fromYAML; - cfg = config."${namespace}".alacritty; - in { - options."${namespace}".alacritty = { - font.family = lib.mkOption { - type = lib.types.nullOr lib.types.singleLineStr; - default = null; - description = '' - The font family for Alacritty - ''; - example = "DroidSansMono NF"; + alacritty = { config, lib }: + let + inherit (inputs.cells.repo.lib) fromYAML; + cfg = config."${namespace}".alacritty; + in + { + options."${namespace}".alacritty = { + font.family = lib.mkOption { + type = lib.types.nullOr lib.types.singleLineStr; + default = null; + description = '' + The font family for Alacritty + ''; + example = "DroidSansMono NF"; + }; + font.size = lib.mkOption { + type = lib.types.nullOr lib.types.number; + default = 11.0; + description = '' + The default font size for Alacritty. This is probably measured in px. + ''; + example = 7.0; + }; + enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Enables alacritty + ''; + example = true; + }; + config-path = lib.mkOption { + type = lib.types.path; + description = "Path to alacritty yaml"; + default = null; + example = "./config/alacritty.yaml"; + }; }; - font.size = lib.mkOption { - type = lib.types.nullOr lib.types.number; - default = 11.0; - description = '' - The default font size for Alacritty. This is probably measured in px. - ''; - example = 7.0; - }; - enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = '' - Enables alacritty - ''; - example = true; - }; - config-path = lib.mkOption { - type = lib.types.path; - description = "Path to alacritty yaml"; - default = null; - example = "./config/alacritty.yaml"; + config.programs.alacritty = { + enable = cfg.enable; + settings = + let + ; + actualConfig = + if cfg.config-path != null then fromYAML (builtins.readFile cfg.config-path) else { }; + in + lib.recursiveUpdate actualConfig { + font.normal.family = lib.mkIf (font.family != null) font.family; + font.size = lib.mkIf (font.size != null) font.size; + }; }; }; - config.programs.alacritty = { - enable = cfg.enable; - settings = let ; - actualConfig = if cfg.config-path != null then fromYAML (builtins.readFile cfg.config-path) else {}; - in lib.recursiveUpdate actualConfig { - font.normal.family = lib.mkIf (font.family != null) font.family; - font.size = lib.mkIf (font.size != null) font.size; - }; - }; - }; # TODO: chromium is not really supported on darwin - private_chromium = { config, pkgs, lib, ... }: let - cfg = config."${namespace}".private_chromium; - in { - options."${namespace}".private_chromium = { - enable = lib.mkOption { - type = lib.types.bool; - default = true; - example = false; - description = '' - Enable extremely lightweight chromium with vimium plugin - ''; + private_chromium = { config, pkgs, lib, ... }: + let + cfg = config."${namespace}".private_chromium; + in + { + options."${namespace}".private_chromium = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + example = false; + description = '' + Enable extremely lightweight chromium with vimium plugin + ''; + }; }; - }; - config = lib.mkIf (cfg.enable) { - # home.packages = [pkgs.ungoogled-chromium]; - programs.chromium = { - enable = true; - package = pkgs.ungoogled-chromium; - extensions = - let - # TODO: how about a chrome extension registry? - mkChromiumExtForVersion = browserVersion: { id, sha256, extVersion, ... }: - { - inherit id; - crxPath = builtins.fetchurl { - url = "https://clients2.google.com/service/update2/crx" + - "?response=redirect" + - "&acceptformat=crx2,crx3" + - "&prodversion=${browserVersion}" + - "&x=id%3D${id}%26installsource%3Dondemand%26uc"; - name = "${id}.crx"; - inherit sha256; + config = lib.mkIf (cfg.enable) { + # home.packages = [pkgs.ungoogled-chromium]; + programs.chromium = { + enable = true; + package = pkgs.ungoogled-chromium; + extensions = + let + # TODO: how about a chrome extension registry? + mkChromiumExtForVersion = browserVersion: { id, sha256, extVersion, ... }: + { + inherit id; + crxPath = builtins.fetchurl { + url = "https://clients2.google.com/service/update2/crx" + + "?response=redirect" + + "&acceptformat=crx2,crx3" + + "&prodversion=${browserVersion}" + + "&x=id%3D${id}%26installsource%3Dondemand%26uc"; + name = "${id}.crx"; + inherit sha256; + }; + version = extVersion; }; - version = extVersion; - }; - mkChromiumExt = mkChromiumExtForVersion (lib.versions.major pkgs.ungoogled-chromium.version); - in - [ - # vimium - (mkChromiumExt { - id = "dbepggeogbaibhgnhhndojpepiihcmeb"; - sha256 = "00qhbs41gx71q026xaflgwzzridfw1sx3i9yah45cyawv8q7ziic"; - extVersion = "1.67.4"; - }) - ]; + mkChromiumExt = mkChromiumExtForVersion (lib.versions.major pkgs.ungoogled-chromium.version); + in + [ + # vimium + (mkChromiumExt { + id = "dbepggeogbaibhgnhhndojpepiihcmeb"; + sha256 = "00qhbs41gx71q026xaflgwzzridfw1sx3i9yah45cyawv8q7ziic"; + extVersion = "1.67.4"; + }) + ]; + }; }; }; - }; darwin-spotlight = { lib, pkgs, config, ... }: { # This patch exists since Darwin's search bar requires solid apps and not @@ -222,7 +234,7 @@ in { ""; # We need this in case upstream home-manager changes the behavior of linking # applications - home.activation.remove-patch-spotlight = + home.activation.remove-patch-spotlight = if pkgs.stdenv.isDarwin then lib.hm.dag.entryBefore [ "checkLinkTargets" ] '' HM_APPS="$HOME/Applications/Home Manager Apps" @@ -234,6 +246,6 @@ in { else ""; }; - + } diff --git a/nix/cells/repo/lib/default.nix b/nix/cells/repo/lib/default.nix index 2e7bc77..a44fed5 100644 --- a/nix/cells/repo/lib/default.nix +++ b/nix/cells/repo/lib/default.nix @@ -1,36 +1,39 @@ -{inputs, cell}: let +{ inputs, cell }: +let namespace = "repo"; yamlToJsonDrv = pkgs: yamlContent: outputPath: (pkgs.runCommand - outputPath { inherit yamlContent; nativeBuildInputs = [ pkgs.yq ]; } - # run yq which outputs '.' (no filter) on file at yamlPath - # note that $out is passed onto the bash/sh script for execution - '' - echo "$yamlContent" | yq >$out - '') + outputPath + { inherit yamlContent; nativeBuildInputs = [ pkgs.yq ]; } + # run yq which outputs '.' (no filter) on file at yamlPath + # note that $out is passed onto the bash/sh script for execution + '' + echo "$yamlContent" | yq >$out + '') { }); -in { +in +{ fromYAML = yamlContent: bulitins.fromJSON (builtins.readFile (yamlToJsonDrv inputs.nixpkgs yamlContent "fromYaml.json")); # NOTE: Deprecate # ctor - opt-some = a: [a]; - opt-none = []; - opt-none_thunk = _: []; + opt-some = a: [ a ]; + opt-none = [ ]; + opt-none_thunk = _: [ ]; # from-to null - opt-fromNullable = nullable: if nullable == null then [] else [nullable]; + opt-fromNullable = nullable: if nullable == null then [ ] else [ nullable ]; opt-toNullable = opt-fork (a:a) (_: null); opt-map = builtins.map; opt-filter = builtins.filter; - opt-fork = on_some: on_none: opt: if opt == [] then (on_none null) else (on_some (builtins.elemAt opt 0)); + opt-fork = on_some: on_none: opt: if opt == [ ] then (on_none null) else (on_some (builtins.elemAt opt 0)); opt-unwrap = opt-fork (a:a) (_: throw "opt-unwrap: expected some, got none"); opt-unwrapOrElse = opt-fork (a:a); opt-unwrapOr = fallback_val: opt-fork (a:a) (_: fallback_val); opt-orElse = opt: fallback_opt: opt-fork (opt-some) (opt-none_thunk) (opt ++ fallback_opt); - opt-leftmostSome = opts: builtins.foldl' (opt-orElse) [] opts; + opt-leftmostSome = opts: builtins.foldl' (opt-orElse) [ ] opts; } diff --git a/out-of-tree/flake-compat/default.nix b/out-of-tree/flake-compat/default.nix index a6744f0..d925572 100644 --- a/out-of-tree/flake-compat/default.nix +++ b/out-of-tree/flake-compat/default.nix @@ -64,8 +64,7 @@ rev = info.rev; shortRev = builtins.substring 0 7 info.rev; } - else { - } + else {} ) else if info.type == "path" then { @@ -112,11 +111,13 @@ callFlake4 = flakeSrc: locks: let flake = import (flakeSrc + "/flake.nix"); - inputs = builtins.mapAttrs (n: v: - if v.flake or true - then callFlake4 (fetchTree (v.locked // v.info)) v.inputs - else fetchTree (v.locked // v.info)) - locks; + inputs = + builtins.mapAttrs + (n: v: + if v.flake or true + then callFlake4 (fetchTree (v.locked // v.info)) v.inputs + else fetchTree (v.locked // v.info)) + locks; outputs = flakeSrc // (flake.outputs (inputs // {self = outputs;})); in