nix: drop flake parts

This commit is contained in:
pengo 2026-06-08 17:13:07 -06:00
parent 36398a1af2
commit bb86ea12ca
2 changed files with 52 additions and 76 deletions

34
flake.lock generated
View file

@ -1,23 +1,5 @@
{ {
"nodes": { "nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1749398372,
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1778274207, "lastModified": 1778274207,
@ -34,24 +16,8 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1748740939,
"narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "656a64127e9d791a334452c6b6606d17539476e2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"scenefx": "scenefx" "scenefx": "scenefx"
} }

View file

@ -1,7 +1,6 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
scenefx = { scenefx = {
url = "github:wlrfx/scenefx"; url = "github:wlrfx/scenefx";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -10,54 +9,65 @@
outputs = { outputs = {
self, self,
flake-parts, nixpkgs,
... scenefx,
} @ inputs: }: let
flake-parts.lib.mkFlake {inherit inputs;} { inherit (nixpkgs.lib) genAttrs;
imports = [
inputs.flake-parts.flakeModules.easyOverlay
];
flake = { # Systems mangowm supports. Options that call `forEachSystem` will generate an attribute for each of these options.
hmModules.mango = import ./nix/hm-modules.nix self; systems = [
nixosModules.mango = import ./nix/nixos-modules.nix self; "x86_64-linux"
}; "aarch64-linux"
];
perSystem = { # Helper function that generates an attribute set by calling the provided `perSystem` function for each system in `systems` defined above.
config, forEachSystem = perSystem:
genAttrs systems (
system:
perSystem {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
}
);
in {
overlays.default = final: prev: {
inherit (self.packages.${final.stdenv.hostPlatform.system}) mango;
};
packages = forEachSystem (
{
pkgs, pkgs,
... system,
}: let }: let
inherit (pkgs) callPackage ; inherit (pkgs) callPackage;
mango = callPackage ./nix { mango = callPackage ./nix {
inherit (inputs.scenefx.packages.${pkgs.stdenv.hostPlatform.system}) scenefx; inherit (scenefx.packages.${system}) scenefx;
};
shellOverride = old: {
nativeBuildInputs = old.nativeBuildInputs ++ [];
buildInputs = old.buildInputs ++ [];
}; };
in { in {
packages.default = mango; inherit mango;
overlayAttrs = { default = mango;
inherit (config.packages) mango; hm-options-json = callPackage (import ./nix/generate-options.nix self) {
module = ./nix/hm-modules.nix;
optionPrefix = "wayland.windowManager.mango.";
}; };
packages = { nixos-options-json = callPackage (import ./nix/generate-options.nix self) {
inherit mango; module = ./nix/nixos-modules.nix;
hm-options-json = pkgs.callPackage (import ./nix/generate-options.nix self) { optionPrefix = "programs.mango.";
module = ./nix/hm-modules.nix;
optionPrefix = "wayland.windowManager.mango.";
};
nixos-options-json = pkgs.callPackage (import ./nix/generate-options.nix self) {
module = ./nix/nixos-modules.nix;
optionPrefix = "programs.mango.";
};
}; };
devShells.default = mango.overrideAttrs shellOverride; }
formatter = pkgs.alejandra; );
};
systems = [ nixosModules.mango = import ./nix/nixos-modules.nix self;
"x86_64-linux" hmModules.mango = import ./nix/hm-modules.nix self;
"aarch64-linux"
]; devShells = forEachSystem (
}; {system, ...}: {
default = self.packages.${system}.mango;
}
);
formatter = forEachSystem (
{pkgs, ...}: pkgs.alejandra
);
};
} }