This commit is contained in:
Hadi
2025-09-24 17:20:03 +02:00
commit b9fbed9a54
83 changed files with 6241 additions and 0 deletions

58
flake.nix Normal file
View File

@@ -0,0 +1,58 @@
{
description = "Flake for eleakxir";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs = {
systems,
self,
nixpkgs,
...
}: let
eachSystem = nixpkgs.lib.genAttrs (import systems);
importBackend = system:
import ./nix/back.nix {
pkgs = nixpkgs.legacyPackages.${system};
lib = nixpkgs.lib;
inherit self;
};
importUtils = system:
import ./nix/leak-utils.nix {
pkgs = nixpkgs.legacyPackages.${system};
lib = nixpkgs.lib;
inherit self;
};
importDevShell = system:
import ./nix/devshell.nix {
pkgs = nixpkgs.legacyPackages.${system};
lib = nixpkgs.lib;
inherit self;
};
in {
packages = eachSystem (system: {
backend = (importBackend system).package;
leak-utils = (importUtils system).package;
});
devShells = eachSystem (system: {
default = (importDevShell system).devShell;
});
nixosModules.eleakxir = {
config,
lib,
pkgs,
...
}:
(importBackend pkgs.system).nixosModule {
inherit config lib pkgs;
inherit self;
};
};
}