Update flake template

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-08-04 10:51:21 +02:00
parent 027ecdf887
commit 96da7fdb0c
3 changed files with 46 additions and 63 deletions

View File

@@ -1,42 +1,33 @@
{ {
inputs = { inputs = {
nixpkgs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
type = "github";
owner = "karaolidis";
repo = "nixpkgs";
ref = "integration";
};
flake-utils = { flake-utils.url = "github:numtide/flake-utils";
type = "github";
owner = "numtide";
repo = "flake-utils";
ref = "main";
};
treefmt-nix = { treefmt-nix = {
type = "github"; url = "github:numtide/treefmt-nix";
owner = "numtide";
repo = "treefmt-nix";
ref = "main";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = outputs =
{ self, nixpkgs, ... }@inputs: inputs:
inputs.flake-utils.lib.eachDefaultSystem ( (
system:
let 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; treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
in in
{ {
devShells.default = pkgs.mkShell { packages = with pkgs; [ ]; }; devShells.${system}.default = pkgs.mkShell { packages = with pkgs; [ ]; };
formatter = treefmt.config.build.wrapper; formatter.${system} = treefmt.config.build.wrapper;
checks.formatting = treefmt.config.build.check self; checks.formatting.${system} = treefmt.config.build.check inputs.self;
} }
); );
} }

View File

@@ -9,9 +9,5 @@
}; };
}; };
settings = { settings.global.excludes = [ ".envrc" ];
global = {
excludes = [ ".envrc" ];
};
};
} }

View File

@@ -13,38 +13,34 @@
gofmt.enable = true; gofmt.enable = true;
}; };
settings = { settings.global.excludes = [
global = { # Binary Files
excludes = [ "*.jpg"
# Binary Files "*.png"
"*.jpg" "*.svg"
"*.png" # Machine-generated
"*.svg" "*/secrets.yaml"
# Machine-generated "*/secrets/*.pub"
"*/secrets.yaml" # Theme Templates
"*/secrets/*.pub" "*/theme.css"
# Theme Templates "*/theme.conf"
"*/theme.css" "*/theme.theme"
"*/theme.conf" "*/theme.sass"
"*/theme.theme" "*/*.kvconfig"
"*/theme.sass" # Git
"*/*.kvconfig" "*/.gitignore"
# Git ".gitattributes"
"*/.gitignore" ".envrc"
".gitattributes" # One-offs
".envrc" "hosts/*/users/*/uid"
# One-offs "*/.stignore"
"hosts/*/users/*/uid" "*/spicetify/config/prefs*"
"*/.stignore" "*.zsh"
"*/spicetify/config/prefs*" # Manifest Files
"*.zsh" "*/package.json"
# Manifest Files "*/go.mod"
"*/package.json" "*/bun.lockb"
"*/go.mod" # Broken formatters
"*/bun.lockb" "*.lua"
# Broken formatters ];
"*.lua"
];
};
};
} }