1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 08:57:46 +00:00

nix: package superfreq; add NixOS module

This commit is contained in:
NotAShelf 2025-05-14 02:37:23 +03:00
parent fd23e1b9aa
commit 8f04194f95
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
4 changed files with 125 additions and 33 deletions

View file

@ -1,22 +1,26 @@
{
description = "Superfreq";
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default-linux";
};
outputs = inputs @ {
outputs = {
self,
nixpkgs,
systems,
}: let
inherit (nixpkgs) lib;
eachSystem = lib.genAttrs (import inputs.systems);
pkgsFor = eachSystem (system: nixpkgs.legacyPackages.${system});
...
} @ inputs: let
forAllSystems = nixpkgs.lib.genAttrs ["x86_64-linux"];
pkgsForEach = nixpkgs.legacyPackages;
in {
devShells = eachSystem (system: {
default = pkgsFor.${system}.callPackage ./nix/shell.nix {};
packages = forAllSystems (system: {
superfreq = pkgsForEach.${system}.callPackage ./nix/package.nix {};
default = self.packages.${system}.superfreq;
});
devShells = forAllSystems (system: {
default = pkgsForEach.${system}.callPackage ./nix/shell.nix {};
});
nixosModules = {
superfreq = import ./nix/module.nix inputs;
default = self.nixosModules.superfreq;
};
};
}