Compare commits

...

10 Commits
main ... dev

Author SHA1 Message Date
LeMarsu 99b4355a1a flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/c621e8422220273271f52058f618c94e405bb0f5?narHash=sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY%3D' (2025-04-01)
  → 'github:hercules-ci/flake-parts/758cf7296bee11f1706a574c77d072b8a7baa881?narHash=sha256-wfG0S7pltlYyZTM%2BqqlhJ7GMw2fTF4mLKCIVhLii/4M%3D' (2025-10-01)
• Updated input 'flake-parts/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/e4822aea2a6d1cdd36653c134cacfd64c97ff4fa?narHash=sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc%3D' (2025-03-30)
  → 'github:nix-community/nixpkgs.lib/a73b9c743612e4244d865a2fdee11865283c04e6?narHash=sha256-x2rJ%2BOvzq0sCMpgfgGaaqgBSwY%2BLST%2BWbZ6TytnT9Rk%3D' (2025-08-10)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/a79cfe0ebd24952b580b1cf08cd906354996d547?narHash=sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y%3D' (2025-02-08)
  → 'github:nixos/nixpkgs/7df7ff7d8e00218376575f0acdcc5d66741351ee?narHash=sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs%3D' (2025-10-02)
2025-10-06 17:21:08 +02:00
LeMarsu 14bc2d39de chore(nix): move to flake-parts 2025-05-03 14:42:41 +02:00
LeMarsu 0df7f7399c feat: add LICENSE 2025-05-03 14:00:11 +02:00
LeMarsu 4cea570a84 chore(nix): remove unneeded flake deps 2025-05-03 05:01:42 +02:00
LeMarsu 7dbf4382ef flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/d70bd19e0a38ad4790d3913bf08fcbfc9eeca507?narHash=sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ%3D' (2024-12-19)
  → 'github:nixos/nixpkgs/a79cfe0ebd24952b580b1cf08cd906354996d547?narHash=sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y%3D' (2025-02-08)
2025-02-11 20:06:51 +01:00
LeMarsu 3f58d180ec fix: inherit `nvimRequireCheck` for runtime plugin 2024-12-26 01:16:08 +01:00
LeMarsu f343d0eb15 feat: allow openStruct for `runtime`.
This allows adding `nvimRequireCheck` for your runtime.
2024-12-26 01:00:08 +01:00
LeMarsu 1b2ddaffb6 feat: define `nvimRequireCheck` for sloth-flake 2024-12-26 00:59:52 +01:00
LeMarsu 7f160dfe6c flake.lock: Update
Flake lock file updates:

• Updated input 'nil':
    'github:oxalica/nil/c8e8ce72442a164d89d3fdeaae0bcc405f8c015a?narHash=sha256-mIuOP4I51eFLquRaxMKx67pHmhatZrcVPjfHL98v/M8%3D' (2024-09-19)
  → 'github:oxalica/nil/2e24c9834e3bb5aa2a3701d3713b43a6fb106362?narHash=sha256-DCIVdlb81Fct2uwzbtnawLBC/U03U2hqx8trqTJB7WA%3D' (2024-11-19)
• Updated input 'nil/flake-utils':
    'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a?narHash=sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ%3D' (2024-03-11)
  → 'github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b?narHash=sha256-l0KFg5HjrsfsO/JpG%2Br7fRrqm12kzFHyUHqHCVpMMbI%3D' (2024-11-13)
• Updated input 'nil/nixpkgs':
    'github:nixos/nixpkgs/20f9370d5f588fb8c72e844c54511cab054b5f40?narHash=sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4%3D' (2024-09-16)
  → 'github:nixos/nixpkgs/5083ec887760adfe12af64830a66807423a859a7?narHash=sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs%3D' (2024-11-18)
• Updated input 'nil/rust-overlay':
    'github:oxalica/rust-overlay/ca2e79cd22625d214b8437c2c4080ce79bd9f7d2?narHash=sha256-pupsow4L79SBfNwT6vh/5RAbVZuhngIA0RTCZksXmZY%3D' (2024-09-16)
  → 'github:oxalica/rust-overlay/71287228d96e9568e1e70c6bbfa3f992d145947b?narHash=sha256-JECaBgC0pQ91Hq3W4unH6K9to8s2Zl2sPNu7bLOv4ek%3D' (2024-11-19)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/4aa36568d413aca0ea84a1684d2d46f55dbabad7?narHash=sha256-Zwl8YgTVJTEum%2BL%2B0zVAWvXAGbWAuXHax3KzuejaDyo%3D' (2024-11-05)
  → 'github:nixos/nixpkgs/d70bd19e0a38ad4790d3913bf08fcbfc9eeca507?narHash=sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ%3D' (2024-12-19)
• Updated input 'utils':
    'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a?narHash=sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ%3D' (2024-09-17)
  → 'github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b?narHash=sha256-l0KFg5HjrsfsO/JpG%2Br7fRrqm12kzFHyUHqHCVpMMbI%3D' (2024-11-13)
2024-12-25 23:46:24 +01:00
LeMarsu 5cef4b0503 flake.lock: Update
Flake lock file updates:

• Updated input 'nil':
    'github:oxalica/nil/ab3ddb8f063774cf7e22eb610f5ecfdb77309f3c?narHash=sha256-GmsEQa4HZeMfec37LZnwG/Lt/XmqFLXsjv5QWojeNiM%3D' (2024-05-30)
  → 'github:oxalica/nil/c8e8ce72442a164d89d3fdeaae0bcc405f8c015a?narHash=sha256-mIuOP4I51eFLquRaxMKx67pHmhatZrcVPjfHL98v/M8%3D' (2024-09-19)
• Updated input 'nil/nixpkgs':
    'github:nixos/nixpkgs/ac82a513e55582291805d6f09d35b6d8b60637a1?narHash=sha256-pFe5jLeIPlKEln5n2h998d7cpzXFdbrBMRe3suz4K1o%3D' (2024-05-29)
  → 'github:nixos/nixpkgs/20f9370d5f588fb8c72e844c54511cab054b5f40?narHash=sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4%3D' (2024-09-16)
• Updated input 'nil/rust-overlay':
    'github:oxalica/rust-overlay/095702e63a40e86f339d11864da9dc965b70a01e?narHash=sha256-MzH%2ByjKULH3HCRj9QCTwBvqq4LZkR0ZqRE/QfGOGC2E%3D' (2024-05-30)
  → 'github:oxalica/rust-overlay/ca2e79cd22625d214b8437c2c4080ce79bd9f7d2?narHash=sha256-pupsow4L79SBfNwT6vh/5RAbVZuhngIA0RTCZksXmZY%3D' (2024-09-16)
• Removed input 'nil/rust-overlay/flake-utils'
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/57610d2f8f0937f39dbd72251e9614b1561942d8?narHash=sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0%3D' (2024-05-31)
  → 'github:nixos/nixpkgs/4aa36568d413aca0ea84a1684d2d46f55dbabad7?narHash=sha256-Zwl8YgTVJTEum%2BL%2B0zVAWvXAGbWAuXHax3KzuejaDyo%3D' (2024-11-05)
• Updated input 'utils':
    'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a?narHash=sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ%3D' (2024-03-11)
  → 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a?narHash=sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ%3D' (2024-09-17)
2024-11-08 02:25:51 +01:00
10 changed files with 104 additions and 261 deletions

20
LICENSE.md Normal file
View File

@ -0,0 +1,20 @@
sloth-flake.nvim - A neovim plugin and configuration management plugin, highly inspired by lazy, using nix.
Copyright © 2024 LeMarsu
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

6
dev/default.nix Normal file
View File

@ -0,0 +1,6 @@
{
imports = [
./formatter.nix
./shell.nix
];
}

5
dev/formatter.nix Normal file
View File

@ -0,0 +1,5 @@
{
perSystem = {pkgs, ...}: {
formatter = pkgs.alejandra;
};
}

12
dev/shell.nix Normal file
View File

@ -0,0 +1,12 @@
{
perSystem = {pkgs, ...}: {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
alejandra
git-cliff
nil
sumneko-lua-language-server
];
};
};
}

View File

@ -1,127 +1,30 @@
{
"nodes": {
"alejandra": {
"flake-parts": {
"inputs": {
"fenix": "fenix",
"flakeCompat": "flakeCompat",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1660592437,
"narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=",
"owner": "kamadorueda",
"repo": "alejandra",
"rev": "e7eac49074b70814b542fee987af2987dd0520b5",
"lastModified": 1759362264,
"narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
"type": "github"
},
"original": {
"owner": "kamadorueda",
"ref": "3.0.0",
"repo": "alejandra",
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"alejandra",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1657607339,
"narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=",
"owner": "nix-community",
"repo": "fenix",
"rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakeCompat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"nil": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1717086091,
"narHash": "sha256-GmsEQa4HZeMfec37LZnwG/Lt/XmqFLXsjv5QWojeNiM=",
"owner": "oxalica",
"repo": "nil",
"rev": "ab3ddb8f063774cf7e22eb610f5ecfdb77309f3c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "nil",
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716977081,
"narHash": "sha256-pFe5jLeIPlKEln5n2h998d7cpzXFdbrBMRe3suz4K1o=",
"lastModified": 1759381078,
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ac82a513e55582291805d6f09d35b6d8b60637a1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1717196966,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"type": "github"
},
"original": {
@ -131,7 +34,22 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs-lib": {
"locked": {
"lastModified": 1754788789,
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1660438583,
"narHash": "sha256-rJUTYxFKlWUJI3njAwEc1pKAVooAViZGJvsgqfh/q/E=",
@ -148,106 +66,14 @@
},
"root": {
"inputs": {
"alejandra": "alejandra",
"nil": "nil",
"nixpkgs": "nixpkgs_2",
"utils": "utils",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"yants": "yants"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1657557289,
"narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "caf23f29144b371035b864a1017dbc32573ad56d",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"nil",
"flake-utils"
],
"nixpkgs": [
"nil",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717035469,
"narHash": "sha256-MzH+yjKULH3HCRj9QCTwBvqq4LZkR0ZqRE/QfGOGC2E=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "095702e63a40e86f339d11864da9dc965b70a01e",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"yants": {
"inputs": {
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1686863218,

View File

@ -3,42 +3,17 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
nil.url = "github:oxalica/nil";
yants.url = "github:divnix/yants";
alejandra = {
url = "github:kamadorueda/alejandra/3.0.0";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = {
self,
alejandra,
nixpkgs,
utils,
yants,
...
} @ inputs: let
inherit (builtins) readFile replaceStrings;
fu = utils.lib;
versionFile = replaceStrings ["\n"] [""] (readFile ./VERSION);
version =
if self.sourceInfo ? dirtyShortRev
then "${versionFile}-${self.sourceInfo.dirtyShortRev}"
else versionFile;
outputs = {flake-parts, ...} @ inputs: let
in (flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
forSystem = system: let
pkgs = nixpkgs.legacyPackages.${system};
formatter = alejandra.defaultPackage.${system};
inherit (inputs.nil.packages.${system}) nil;
in {
inherit formatter;
devShells.default = import ./shell.nix {
inherit pkgs nil formatter;
};
};
in
(fu.eachDefaultSystem forSystem)
// {lib = import ./lib {inherit version yants;};};
imports = [
./dev
./lib
];
});
}

View File

@ -1,9 +1,19 @@
{
version,
yants,
self,
inputs,
...
}: let
types = import ./types.nix {inherit yants;};
inherit (builtins) readFile replaceStrings;
versionFile = replaceStrings ["\n"] [""] (readFile ../VERSION);
version =
if self.sourceInfo ? dirtyShortRev
then "${versionFile}-${self.sourceInfo.dirtyShortRev}"
else versionFile;
types = import ./types.nix {inherit (inputs) yants;};
in {
mkNeovimPkg = import ./mkNeovimPkg.nix {inherit version types;};
mkPluginsFromInputs = import ./mkPluginsFromInputs.nix;
flake.lib = {
mkNeovimPkg = import ./mkNeovimPkg.nix {inherit version types;};
mkPluginsFromInputs = import ./mkPluginsFromInputs.nix;
};
}

View File

@ -106,10 +106,13 @@
src,
version,
...
}:
}@opts:
vimUtils.buildVimPlugin ({
inherit src;
}
// (optionalAttrs (opts ? nvimRequireCheck) {
inherit (opts) nvimRequireCheck;
})
// (optionalAttrs (isNull version) {
name = "runtime";
})
@ -127,6 +130,7 @@
root = ../.;
fileset = ../lua/sloth-flake;
};
nvimRequireCheck = "sloth-flake";
buildPhase = ''
dir=lua/sloth-flake

View File

@ -7,7 +7,7 @@
in rec {
# The runtime object
runtimeType = with yants;
struct "runtime" {
openStruct "runtime" {
# The version of the runtime
version = option string;

View File

@ -1,15 +0,0 @@
{
formatter,
nil,
pkgs,
...
}:
with pkgs;
mkShell {
buildInputs = [
formatter
git-cliff
nil
sumneko-lua-language-server
];
}