hyprspace/flake.nix
Max bde41b6a3e
Formatting (#31)
* add Nix formatter

* nix fmt

* check that Nix and Go code is formatted correctly

* refactor flake.nix

* add formatter to devShell
2024-06-02 21:45:11 +02:00

54 lines
1.4 KiB
Nix

{
description = "Hyprspace";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
flake =
{ config, ... }:
{
herculesCI.ciSystems = [
"x86_64-linux"
"aarch64-linux"
];
nixosModules = {
default = config.nixosModules.hyprspace;
hyprspace =
{ lib, pkgs, ... }:
{
imports = [ ./nixos ];
services.hyprspace.package = lib.mkOptionDefault inputs.self.packages.${pkgs.system}.default;
};
};
};
imports = [ ./dev ];
perSystem =
{ config, pkgs, ... }:
{
packages = {
default = config.packages.hyprspace;
hyprspace = pkgs.callPackage ./package.nix {
generateSchemasProgram = config.apps.dev-generate-schemas.program;
};
docs = pkgs.callPackage ./docs/package.nix { hyprspace = config.packages.default; };
};
};
};
}