Skip to content

Commit 7f059fc

Browse files
committed
swap prettier out for oxfmt
1 parent c759c89 commit 7f059fc

6 files changed

Lines changed: 32 additions & 26 deletions

File tree

examples/cfg.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{ pkgs ? import
22
(fetchTarball {
3-
name = "jpetrucciani-2025-09-19";
4-
url = "https://github.com/jpetrucciani/nix/archive/a98858e842d0dd04a98d081a20646e42826d1f5d.tar.gz";
5-
sha256 = "06skqwk3zcgbwc9wczbaa18dcrjq3izykvmizqadgwrql6cybk6a";
3+
name = "jpetrucciani-2026-02-24";
4+
url = "https://github.com/jpetrucciani/nix/archive/c759c89863772065f4c257c56b029d0c67ce0673.tar.gz";
5+
sha256 = "1wr033lxrcqsizbgmz2p2mhca8wz6c6wsfdmfzfrxx7wzf5r2dmf";
66
})
77
{ }
88
}:
@@ -22,7 +22,7 @@ let
2222
jq
2323
just
2424
moreutils
25-
nodePackages.prettier
25+
oxfmt
2626
scc
2727
yq-go
2828
(writeShellScriptBin "hms" ''

flake.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
inputs.treefmt-nix.follows = "treefmt-nix";
3939
};
4040
pog.url = "github:jpetrucciani/pog";
41-
treefmt-nix.url = "github:numtide/treefmt-nix";
41+
treefmt-nix.url = "github:jpetrucciani/treefmt-nix";
4242
vscode-server = {
4343
url = "github:nix-community/nixos-vscode-server";
4444
inputs.nixpkgs.follows = "nixpkgs";

home.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,10 @@ in
503503
target = "prettier.config.js";
504504
text = builtins.readFile ./prettier.config.js;
505505
};
506+
oxfmt_config = {
507+
target = ".oxfmtrc.json";
508+
text = builtins.toJSON pkgs._oxfmt;
509+
};
506510
${attrIf isLinux "gpgconf"} = {
507511
target = ".gnupg/gpg.conf";
508512
text = ''

mods/final.nix

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ let
1212
])
1313
final.custom;
1414

15+
_oxfmt = {
16+
printWidth = 120;
17+
arrowParens = "always";
18+
singleQuote = true;
19+
tabWidth = 2;
20+
useTabs = false;
21+
semi = true;
22+
bracketSpacing = true;
23+
bracketSameLine = false;
24+
proseWrap = "preserve";
25+
trailingComma = "all";
26+
ignorePatterns = [ "flake.lock" ];
27+
};
28+
1529
_treefmt =
1630
let
1731
defaults = {
@@ -31,21 +45,9 @@ let
3145
statix.enable = true;
3246

3347
# js/md/yaml/etc.
34-
prettier = {
48+
oxfmt = {
3549
enable = true;
36-
settings = {
37-
printWidth = 120;
38-
arrowParens = "always";
39-
singleQuote = true;
40-
tabWidth = 2;
41-
useTabs = false;
42-
semi = true;
43-
bracketSpacing = true;
44-
bracketSameLine = false;
45-
requirePragma = false;
46-
proseWrap = "preserve";
47-
trailingComma = "all";
48-
};
50+
settings = _oxfmt;
4951
};
5052

5153
# bash
@@ -183,7 +185,7 @@ in
183185
ignoreCollisions = true;
184186
};
185187

186-
inherit _treefmt;
188+
inherit _treefmt _oxfmt;
187189
jfmt = _treefmt;
188190

189191
_nix = final.nixVersions.nix_2_32;

mods/pog/nix.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ rec {
9595
node=""
9696
if [ "$with_node" = "1" ]; then
9797
toplevel="node = pkgs.nodejs_22;${"\n"}$toplevel"
98-
node="node = [node];npm = with node.pkgs; [prettier];"
98+
node="node = [node];npm = with node.pkgs; [];"
9999
gitignore="$gitignore${"\n"}# node${"\n"}${gitignore.node}"
100100
fi
101101
php=""

0 commit comments

Comments
 (0)