flake: reformat with nixfmt

This commit is contained in:
Infinidoge 2025-01-28 20:33:04 -05:00
parent a79e641851
commit eaf4f56ac0
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
117 changed files with 2667 additions and 1592 deletions

View file

@ -1,13 +1,13 @@
{ lib, ... }:
let
mkTemplate = name:
mkTemplate =
name:
let
path = ./. + "/${name}";
flakePath = path + "/flake.nix";
meta = if builtins.pathExists flakePath then import flakePath else { };
in
{ inherit path; }
// lib.optionalAttrs (meta ? description) { inherit (meta) description; };
{ inherit path; } // lib.optionalAttrs (meta ? description) { inherit (meta) description; };
templates = lib.attrNames (lib.filterAttrs (_: type: type == "directory") (builtins.readDir ./.));
in

View file

@ -10,20 +10,27 @@
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } ({ ... }: {
systems = [ "x86_64-linux" ];
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
{ ... }:
{
systems = [ "x86_64-linux" ];
imports = with inputs; [
devshell.flakeModule
];
imports = with inputs; [
devshell.flakeModule
];
perSystem = { pkgs, ... }: {
devshells.default.devshell = {
name = "template";
motd = "";
perSystem =
{ pkgs, ... }:
{
devshells.default.devshell = {
name = "template";
motd = "";
packages = with pkgs; [ ];
};
};
});
packages = with pkgs; [ ];
};
};
}
);
}

View file

@ -12,55 +12,66 @@
pyproject-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
imports = with inputs; [
devshell.flakeModule
];
imports = with inputs; [
devshell.flakeModule
];
perSystem = { config, pkgs, ... }:
let
project = inputs.pyproject-nix.lib.project.loadPyproject {
projectRoot = ./.;
};
perSystem =
{ config, pkgs, ... }:
let
project = inputs.pyproject-nix.lib.project.loadPyproject {
projectRoot = ./.;
};
python = pkgs.python3;
python = pkgs.python3;
in
{
packages.default = (python.pkgs.buildPythonPackage (
project.renderers.buildPythonPackage { inherit python; }
)).overrideAttrs { allowSubstitutes = false; preferLocalBuild = true; };
in
{
packages.default =
(python.pkgs.buildPythonPackage (project.renderers.buildPythonPackage { inherit python; }))
.overrideAttrs
{
allowSubstitutes = false;
preferLocalBuild = true;
};
devshells.default =
let
env = python.withPackages (
project.renderers.withPackages {
inherit python;
extraPackages = p: with p; [
python-lsp-server
python-lsp-ruff
pylsp-rope
isort
black
devshells.default =
let
env = python.withPackages (
project.renderers.withPackages {
inherit python;
extraPackages =
p: with p; [
python-lsp-server
python-lsp-ruff
pylsp-rope
isort
black
];
}
);
in
{
devshell = {
name = "rename";
motd = "";
packages = [
env
];
}
);
in
{
devshell = {
name = "rename";
motd = "";
packages = [
env
};
env = [
{
name = "PYTHONPATH";
prefix = "${env}/${env.sitePackages}";
}
];
};
env = [
{ name = "PYTHONPATH"; prefix = "${env}/${env.sitePackages}"; }
];
};
};
};
};
};
}

View file

@ -12,55 +12,66 @@
pyproject-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
imports = with inputs; [
devshell.flakeModule
];
imports = with inputs; [
devshell.flakeModule
];
perSystem = { config, pkgs, ... }:
let
project = inputs.pyproject-nix.lib.project.loadPyproject {
projectRoot = ./.;
};
perSystem =
{ config, pkgs, ... }:
let
project = inputs.pyproject-nix.lib.project.loadPyproject {
projectRoot = ./.;
};
python = pkgs.python3;
python = pkgs.python3;
in
{
packages.default = (python.pkgs.buildPythonPackage (
project.renderers.buildPythonPackage { inherit python; }
)).overrideAttrs { allowSubstitutes = false; preferLocalBuild = true; };
in
{
packages.default =
(python.pkgs.buildPythonPackage (project.renderers.buildPythonPackage { inherit python; }))
.overrideAttrs
{
allowSubstitutes = false;
preferLocalBuild = true;
};
devshells.default =
let
env = python.withPackages (
project.renderers.withPackages {
inherit python;
extraPackages = p: with p; [
python-lsp-server
python-lsp-ruff
pylsp-rope
isort
black
devshells.default =
let
env = python.withPackages (
project.renderers.withPackages {
inherit python;
extraPackages =
p: with p; [
python-lsp-server
python-lsp-ruff
pylsp-rope
isort
black
];
}
);
in
{
devshell = {
name = "rename";
motd = "";
packages = [
env
];
}
);
in
{
devshell = {
name = "rename";
motd = "";
packages = [
env
};
env = [
{
name = "PYTHONPATH";
prefix = "${env}/${env.sitePackages}";
}
];
};
env = [
{ name = "PYTHONPATH"; prefix = "${env}/${env.sitePackages}"; }
];
};
};
};
};
};
}