style(repo): format nix flake

This commit is contained in:
cswimr 2025-01-22 08:57:20 -06:00
parent 39d286b559
commit 9637f5209f
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087

View file

@ -2,45 +2,62 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-python.url = "github:cachix/nixpkgs-python"; nixpkgs-python.url = "github:cachix/nixpkgs-python";
nixpkgs-python.inputs = { nixpkgs.follows = "nixpkgs"; }; nixpkgs-python.inputs = {
nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default"; systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv"; devenv.url = "github:cachix/devenv";
devenv.inputs.nixpkgs.follows = "nixpkgs"; devenv.inputs.nixpkgs.follows = "nixpkgs";
}; };
nixConfig = { nixConfig = {
extra-trusted-public-keys = extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org"; extra-substituters = "https://devenv.cachix.org";
}; };
outputs = { self, nixpkgs, devenv, systems, ... }@inputs: outputs =
let forEachSystem = nixpkgs.lib.genAttrs (import systems); {
in { self,
nixpkgs,
devenv,
systems,
...
}@inputs:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = forEachSystem (system: { packages = forEachSystem (system: {
devenv-up = self.devShells.${system}.default.config.procfileScript; devenv-up = self.devShells.${system}.default.config.procfileScript;
devenv-test = self.devShells.${system}.default.config.test; devenv-test = self.devShells.${system}.default.config.test;
}); });
devShells = forEachSystem (system: devShells = forEachSystem (
let pkgs = nixpkgs.legacyPackages.${system}; system:
in { let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = devenv.lib.mkShell { default = devenv.lib.mkShell {
inherit inputs pkgs; inherit inputs pkgs;
modules = [{ modules = [
languages.python = { {
enable = true; languages.python = {
version = "3.11";
uv = {
enable = true; enable = true;
sync = { version = "3.11";
venv.enable = true;
uv = {
enable = true; enable = true;
allExtras = true; sync = {
enable = true;
allExtras = true;
};
}; };
}; };
}; }
}]; ];
}; };
}); }
);
}; };
} }