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:
parent
fd23e1b9aa
commit
8f04194f95
4 changed files with 125 additions and 33 deletions
32
flake.nix
32
flake.nix
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue