feat: Change nix formatter to alejandra

This commit is contained in:
ulic-youthlic 2025-11-09 06:25:03 +08:00
parent 0b8b647f05
commit b4c3dfec42
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
229 changed files with 2528 additions and 2884 deletions

View file

@ -1,52 +1,49 @@
{
description = "A simple NixOS flakes";
outputs =
{
flake-parts,
flake-utils,
home-manager,
treefmt-nix,
nixpkgs,
...
}@inputs:
let
nixpkgs-lib = nixpkgs.lib;
lib = nixpkgs-lib.extend (import ./lib);
in
outputs = {
flake-parts,
flake-utils,
home-manager,
treefmt-nix,
nixpkgs,
...
} @ inputs: let
nixpkgs-lib = nixpkgs.lib;
lib = nixpkgs-lib.extend (import ./lib);
in
flake-parts.lib.mkFlake
{
inherit inputs;
specialArgs = {
inherit lib;
rootPath = ./.;
};
}
(
{ lib, ... }:
{
systems = flake-utils.lib.defaultSystems;
imports = [
{
inherit inputs;
specialArgs = {
inherit lib;
rootPath = ./.;
};
}
(
{lib, ...}: {
systems = flake-utils.lib.defaultSystems;
imports =
[
home-manager.flakeModules.home-manager
treefmt-nix.flakeModule
]
++ lib.youthlic.loadImports ./flake;
flake = {
inherit lib;
nix.settings = {
# substituters shared in home-manager and nixos configuration
substituters =
let
cachix = x: "https://${x}.cachix.org";
in
lib.flatten [
(cachix "nix-community")
"https://cache.nixos.org"
];
};
flake = {
inherit lib;
nix.settings = {
# substituters shared in home-manager and nixos configuration
substituters = let
cachix = x: "https://${x}.cachix.org";
in
lib.flatten [
(cachix "nix-community")
"https://cache.nixos.org"
];
};
}
);
};
}
);
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";