EdenQwQ/flake.nix

71 lines
1.9 KiB
Nix

{
description = "Eden's NixOS Flake";
outputs =
{
self,
nixpkgs,
...
}@inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
imports = [
./hosts
inputs.treefmt-nix.flakeModule
{ _module.args = { inherit inputs self nixpkgs; }; }
];
perSystem =
{ pkgs, ... }:
{
treefmt = {
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
programs.black.enable = true;
programs.prettier.enable = true;
programs.beautysh.enable = true;
programs.toml-sort.enable = true;
settings.global.excludes = [ "*.age" ];
settings.formatter = {
jsonc = {
command = "${pkgs.nodePackages.prettier}/bin/prettier";
includes = [ "*.jsonc" ];
};
scripts = {
command = "${pkgs.beautysh}/bin/beautysh";
includes = [ "*/scripts/*" ];
};
};
};
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
niri.url = "github:sodiboo/niri-flake";
nur.url = "github:nix-community/NUR";
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
};
nixd = {
url = "github:nix-community/nixd";
inputs.nixpkgs.follows = "nixpkgs";
};
nh.url = "github:viperML/nh";
treefmt-nix.url = "github:numtide/treefmt-nix";
agenix.url = "github:ryantm/agenix";
};
}