real meat hours

This commit is contained in:
atagen 2024-08-20 13:11:37 +10:00
parent d4a800971f
commit 0de0a3898a
7 changed files with 217 additions and 78 deletions

View file

@ -2,8 +2,20 @@
description = "the meat (package) manager";
inputs = {
# use registry nixpkgs
# nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs.url = "nixpkgs/nixos-unstable";
nh.url = "github:viperML/nh";
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
inputs.lix.follows = "lix";
};
src = {
url = "path:src";
@ -14,22 +26,24 @@
outputs = {
self,
nixpkgs,
lix-module,
lix,
nh,
src,
}: let
# System types to support.
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
# Nixpkgs instantiated for supported system types.
nixpkgsFor = forAllSystems (system:
import nixpkgs {
inherit system;
# overlays = [self.overlay];
overlays = [
lix-module.overlays.default
nh.overlays.default
];
});
in {
# Provide some binary packages for selected system types.
packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
@ -38,12 +52,8 @@
};
});
# The default package for 'nix build'. This makes sense if the
# flake provides only one package or there is a clear "main"
# package.
defaultPackage = forAllSystems (system: self.packages.${system}.meat);
# A NixOS module, if applicable (e.g. if the package provides a system service).
nixosModules.meat = {
pkgs,
config,
@ -68,7 +78,5 @@
};
};
};
# Tests run by 'nix flake check' and by Hydra.
};
}