outage-detector/flake.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

2023-08-15 21:13:14 +00:00
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
};
outputs = {
self,
nixpkgs,
} @ inputs: let
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
in {
2023-10-13 11:56:55 +00:00
# `nix fmt`
2023-08-15 21:13:14 +00:00
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
2023-10-13 11:56:55 +00:00
# `nix build`
2023-08-15 21:13:14 +00:00
packages = forAllSystems (system: {
2023-10-13 13:20:28 +00:00
default = pkgs.${system}.poetry2nix.mkPoetryApplication {
projectDir = self;
};
2023-08-15 21:13:14 +00:00
});
2023-10-13 11:56:55 +00:00
# `nix develop`
2023-08-15 21:13:14 +00:00
devShells = forAllSystems (system: {
default = pkgs.${system}.mkShellNoCC {
packages = with pkgs.${system}; [
(poetry2nix.mkPoetryEnv {projectDir = self;})
poetry
mypy
python310Packages.types-requests
];
};
});
2023-08-19 15:44:50 +00:00
# TODO: Home Manager Module
2023-08-15 21:13:14 +00:00
# homeManagerModules.default = import ./nix/hm-module.nix self;
2023-08-19 15:44:50 +00:00
2023-08-15 21:13:14 +00:00
# NixOS Module
2023-08-19 15:44:50 +00:00
nixosModules.default = import ./nix/module.nix inputs;
2023-08-15 21:13:14 +00:00
};
}