1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2024-12-21 18:44:36 +01:00
parent 004b442296
commit 5b9fdb8172
No known key found for this signature in database
5 changed files with 98 additions and 16 deletions

View file

@ -1,21 +1,51 @@
{
description = "A wrapper for Helix that provides language support";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = {nixpkgs, ...}: let
supportedSystems = nixpkgs.lib.systems.flakeExposed;
forAllSupportedSystems = f:
nixpkgs.lib.genAttrs supportedSystems (
system:
f (import nixpkgs {
inherit system;
config.allowUnfree = true;
})
);
in {
packages = forAllSupportedSystems (pkgs: {
default = pkgs.callPackage ./package.nix {};
});
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
devenv-root = {
url = "file+file:///dev/null";
flake = false;
};
devenv.url = "github:cachix/devenv";
};
outputs = {
self,
nixpkgs,
flake-parts,
devenv,
devenv-root,
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
devenv.flakeModule
];
systems = nixpkgs.lib.systems.flakeExposed;
flake = {
lib = nixpkgs.lib.extend (import ./lib.nix);
nixosConfigurations = self.lib.genNixosConfigurations {inherit inputs;};
};
perSystem = {pkgs, ...}: {
devenv.shells.default = {
devenv.root = let
devenvRootFileContent = builtins.readFile devenv-root.outPath;
in
pkgs.lib.mkIf (devenvRootFileContent != "") devenvRootFileContent;
name = "hxwrap";
imports = [
./devenv.nix
];
};
packages.default = pkgs.callPackage ./package.nix {};
};
};
}