Files
archived-hipudding-teslamate/flake.nix
scottbot95 dffdea99ef refactor: Cleanup nix code (#4265)
* refactor: Extract package creation to separate flake-module

* refactor: move module.nix to nix folder

* refactor: extract checks into their own flake module

* refactor: extract devShell into its own flake module

* refactor: Extract nix dev dependencies to a separate partition

* fix: spelling error

* fix: Checks break on darwin

Looks like `mkIf` doesn't work properly with flake-parts/perSystem

* fix: Remove partitions to make `devenv up` work

RIP partitions :(

* style: linter findings

---------

Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2024-10-21 15:40:49 +02:00

35 lines
1.0 KiB
Nix

{
description = "TeslaMate Logger";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
devenv-root.url = "file+file:///dev/null";
devenv-root.flake = false;
devenv.url = "github:cachix/devenv";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
flake.nixosModules.default = import ./nix/module.nix { inherit self; };
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
# See ./nix/flake-modules/*.nix for the modules that are imported here.
imports = [
./nix/flake-modules/checks.nix
./nix/flake-modules/devenv.nix
./nix/flake-modules/formatter.nix
./nix/flake-modules/package.nix
];
};
}