Update flake template
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,42 +1,33 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
type = "github";
|
||||
owner = "karaolidis";
|
||||
repo = "nixpkgs";
|
||||
ref = "integration";
|
||||
};
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
flake-utils = {
|
||||
type = "github";
|
||||
owner = "numtide";
|
||||
repo = "flake-utils";
|
||||
ref = "main";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
treefmt-nix = {
|
||||
type = "github";
|
||||
owner = "numtide";
|
||||
repo = "treefmt-nix";
|
||||
ref = "main";
|
||||
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
inputs.flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
inputs:
|
||||
(
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell { packages = with pkgs; [ ]; };
|
||||
devShells.${system}.default = pkgs.mkShell { packages = with pkgs; [ ]; };
|
||||
|
||||
formatter = treefmt.config.build.wrapper;
|
||||
checks.formatting = treefmt.config.build.check self;
|
||||
formatter.${system} = treefmt.config.build.wrapper;
|
||||
checks.formatting.${system} = treefmt.config.build.check inputs.self;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@@ -9,9 +9,5 @@
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
global = {
|
||||
excludes = [ ".envrc" ];
|
||||
};
|
||||
};
|
||||
settings.global.excludes = [ ".envrc" ];
|
||||
}
|
||||
|
64
treefmt.nix
64
treefmt.nix
@@ -13,38 +13,34 @@
|
||||
gofmt.enable = true;
|
||||
};
|
||||
|
||||
settings = {
|
||||
global = {
|
||||
excludes = [
|
||||
# Binary Files
|
||||
"*.jpg"
|
||||
"*.png"
|
||||
"*.svg"
|
||||
# Machine-generated
|
||||
"*/secrets.yaml"
|
||||
"*/secrets/*.pub"
|
||||
# Theme Templates
|
||||
"*/theme.css"
|
||||
"*/theme.conf"
|
||||
"*/theme.theme"
|
||||
"*/theme.sass"
|
||||
"*/*.kvconfig"
|
||||
# Git
|
||||
"*/.gitignore"
|
||||
".gitattributes"
|
||||
".envrc"
|
||||
# One-offs
|
||||
"hosts/*/users/*/uid"
|
||||
"*/.stignore"
|
||||
"*/spicetify/config/prefs*"
|
||||
"*.zsh"
|
||||
# Manifest Files
|
||||
"*/package.json"
|
||||
"*/go.mod"
|
||||
"*/bun.lockb"
|
||||
# Broken formatters
|
||||
"*.lua"
|
||||
];
|
||||
};
|
||||
};
|
||||
settings.global.excludes = [
|
||||
# Binary Files
|
||||
"*.jpg"
|
||||
"*.png"
|
||||
"*.svg"
|
||||
# Machine-generated
|
||||
"*/secrets.yaml"
|
||||
"*/secrets/*.pub"
|
||||
# Theme Templates
|
||||
"*/theme.css"
|
||||
"*/theme.conf"
|
||||
"*/theme.theme"
|
||||
"*/theme.sass"
|
||||
"*/*.kvconfig"
|
||||
# Git
|
||||
"*/.gitignore"
|
||||
".gitattributes"
|
||||
".envrc"
|
||||
# One-offs
|
||||
"hosts/*/users/*/uid"
|
||||
"*/.stignore"
|
||||
"*/spicetify/config/prefs*"
|
||||
"*.zsh"
|
||||
# Manifest Files
|
||||
"*/package.json"
|
||||
"*/go.mod"
|
||||
"*/bun.lockb"
|
||||
# Broken formatters
|
||||
"*.lua"
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user