feat: add devshell and improve input handling of cells

pass system to cells and their flake.nix inputs
This commit is contained in:
technofab 2025-08-06 10:13:34 +02:00
parent 2774f3ea91
commit c9c329ec0f
No known key found for this signature in database
9 changed files with 62 additions and 5 deletions

7
cells/repo/devShells.nix Normal file
View file

@ -0,0 +1,7 @@
{inputs, ...}: let
inherit (inputs) pkgs devshellLib;
in {
default = devshellLib.mkShell {
packages = [pkgs.alejandra];
};
}

28
cells/repo/flake.lock generated Normal file
View file

@ -0,0 +1,28 @@
{
"nodes": {
"devshell": {
"locked": {
"dir": "lib",
"lastModified": 1753958239,
"narHash": "sha256-J0B5rfQAza9UKSqnKINn++AsrMWxG3/oTqVUt3QRlWk=",
"owner": "rensa-nix",
"repo": "devshell",
"rev": "fbacfc149b59acf68efa97951418a9a7a7022707",
"type": "gitlab"
},
"original": {
"dir": "lib",
"owner": "rensa-nix",
"repo": "devshell",
"type": "gitlab"
}
},
"root": {
"inputs": {
"devshell": "devshell"
}
}
},
"root": "root",
"version": 7
}

14
cells/repo/flake.nix Normal file
View file

@ -0,0 +1,14 @@
{
inputs = {
devshell.url = "gitlab:rensa-nix/devshell?dir=lib";
};
outputs = i:
i
// rec {
pkgs = import i.parent.nixpkgs {
inherit (i) system;
};
devshellLib = i.devshell.lib {inherit pkgs;};
};
}

View file

@ -1,6 +1,3 @@
{
inputs,
cell,
}: {
hello = "world";
}