maomaowm/flake.nix

56 lines
1.3 KiB
Nix
Raw Normal View History

2025-02-25 22:05:29 +08:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
2025-06-25 00:03:25 +08:00
scenefx = {
url = "github:wlrfx/scenefx";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-02-25 22:05:29 +08:00
};
outputs = {
self,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
2025-02-25 22:05:29 +08:00
imports = [
inputs.flake-parts.flakeModules.easyOverlay
];
2025-03-24 10:55:11 +08:00
flake = {
2025-07-30 14:54:59 +08:00
hmModules.mango = import ./nix/hm-modules.nix self;
nixosModules.mango = import ./nix/nixos-modules.nix self;
2025-03-24 10:55:11 +08:00
};
2025-02-25 22:05:29 +08:00
perSystem = {
config,
pkgs,
...
}: let
2025-08-12 19:42:16 +08:00
inherit (pkgs) callPackage ;
2025-07-30 14:54:59 +08:00
mango = callPackage ./nix {
2025-06-25 00:03:25 +08:00
inherit (inputs.scenefx.packages.${pkgs.system}) scenefx;
2025-02-25 22:05:29 +08:00
};
shellOverride = old: {
nativeBuildInputs = old.nativeBuildInputs ++ [];
buildInputs = old.buildInputs ++ [];
};
in {
2025-07-30 14:54:59 +08:00
packages.default = mango;
overlayAttrs = {
2025-07-30 14:54:59 +08:00
inherit (config.packages) mango;
};
packages = {
2025-07-30 14:54:59 +08:00
inherit mango;
};
2025-07-30 14:54:59 +08:00
devShells.default = mango.overrideAttrs shellOverride;
2025-06-22 00:53:38 +03:00
formatter = pkgs.alejandra;
};
2025-06-25 00:03:25 +08:00
systems = [
"x86_64-linux"
"aarch64-linux"
];
2025-02-25 22:05:29 +08:00
};
}