diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b793868 --- /dev/null +++ b/flake.nix @@ -0,0 +1,79 @@ +# rocie - An enterprise grocery management system +# +# Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of Rocie. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + description = "rocie"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; + + rocie-mobile = { + url = "git+file:../rocie-mobile"; + inputs = { + nixpkgs.follows = "nixpkgs"; + treefmt-nix.follows = "treefmt-nix"; + }; + }; + rocie-server = { + url = "git+file:../rocie-server"; + inputs = { + nixpkgs.follows = "nixpkgs"; + treefmt-nix.follows = "treefmt-nix"; + }; + }; + + treefmt-nix = { + url = "github:numtide/treefmt-nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + }; + + outputs = { + self, + nixpkgs, + treefmt-nix, + rocie-mobile, + rocie-server, + }: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages."${system}"; + inherit (pkgs) lib; + + treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;}; + + module = import ./module { + rocie-mobile = + rocie-mobile.outputs.packages."${system}".rocie; + rocie-server = + rocie-server.outputs.packages."${system}".rocie; + }; + in { + checks."${system}" = { + formatting = treefmtEval.config.build.check self; + }; + + nixosModules = { + default = module; + }; + + formatter."${system}" = treefmtEval.config.build.wrapper; + + devShells."${system}".default = pkgs.mkShell { + packages = [ + # Releng + pkgs.git-bug + pkgs.reuse + pkgs.cocogitto + ]; + }; + }; +} |
