Compare commits

...

2 commits

Author SHA1 Message Date
ea42d407d7
Add treefmt-nix for formatting all the files 2025-06-06 12:46:51 +08:00
1a9a4243fe
Update flake inputs 2025-06-06 12:46:49 +08:00
6 changed files with 162 additions and 90 deletions

View file

@ -1,2 +1 @@
{
}
{}

127
flake.lock generated
View file

@ -121,11 +121,11 @@
]
},
"locked": {
"lastModified": 1727447169,
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=",
"lastModified": 1749105467,
"narHash": "sha256-hXh76y/wDl15almBcqvjryB50B0BaiXJKk20f314RoE=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76",
"rev": "6bc76b872374845ba9d645a2f012b764fecd765f",
"type": "github"
},
"original": {
@ -141,11 +141,11 @@
]
},
"locked": {
"lastModified": 1748832438,
"narHash": "sha256-/CtyLVfNaFP7PrOPrTEuGOJBIhcBKVQ91KiEbtXJi0A=",
"lastModified": 1749147380,
"narHash": "sha256-UvCI5f1qD9l1fCQkoG/kJI0yNjDQIiJaN7gkve8fmII=",
"owner": "nix-community",
"repo": "disko",
"rev": "58d6e5a83fff9982d57e0a0a994d4e5c0af441e4",
"rev": "d74db625a5cf3f46cf8fa545d6ef10bd3463ea07",
"type": "github"
},
"original": {
@ -173,11 +173,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
@ -378,11 +378,11 @@
]
},
"locked": {
"lastModified": 1748979197,
"narHash": "sha256-mKYwYcO9RmA2AcAFIXGDBOw5iv/fbjw6adWvMbnfIuk=",
"lastModified": 1749160002,
"narHash": "sha256-IM3xKjsKxhu7Y1WdgTltrLKiOJS8nW7D4SUDEMNr7CI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "34a13086148cbb3ae65a79f753eb451ce5cac3d3",
"rev": "68cc9eeb3875ae9682c04629f20738e1e79d72aa",
"type": "github"
},
"original": {
@ -443,11 +443,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1748977926,
"narHash": "sha256-4tERoqAxHSwcF86j1xxqXghxkJJkbqTrAoYXLPU//jg=",
"lastModified": 1749144707,
"narHash": "sha256-JcSmySCB3pOtzeWMaEksZgaiNedEDIC6qyBezkK+92Q=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "89ce8038a15e06fad526523982424b08083cec77",
"rev": "32d49ef427be377c82d32ce74ff3082c2c992199",
"type": "github"
},
"original": {
@ -476,11 +476,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1748971878,
"narHash": "sha256-sgK5dsqsRX2xfkwOy8Wsi8oAuDvAZ8z2aBgN3vk0QLw=",
"lastModified": 1749112952,
"narHash": "sha256-ajI1cXa2AgdZSELvlVaQZd0XMi4eM8H3Ys0Ek8a/roI=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "abac28a65c6c742114ef292221dd26e2a3a2f04b",
"rev": "242ebf294514cc22f4f9d83c0566c8ffe1cb8d8a",
"type": "github"
},
"original": {
@ -497,11 +497,11 @@
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1748948933,
"narHash": "sha256-Lc3YwAK/h+BdXWuiKV+dflWbYD3yObkrN/wugr8w+70=",
"lastModified": 1749121763,
"narHash": "sha256-TVFiyMBs+3KEzZVwf/n1zedUWzPrMPzud/2Jiho8dcE=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "a24e3123dab28fcc9b3e7b48f40e6e7ba12a6958",
"rev": "c89df80b72b4e1802fd91a35f4857868c953c1c0",
"type": "github"
},
"original": {
@ -512,11 +512,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1748942041,
"narHash": "sha256-HEu2gTct7nY0tAPRgBtqYepallryBKR1U8B4v2zEEqA=",
"lastModified": 1749056381,
"narHash": "sha256-QITcurR19KZlrCngBoCjsFF2BdYsiCG4UqmlrVcLb8Q=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "fc7c4714125cfaa19b048e8aaf86b9c53e04d853",
"rev": "029bd66faa180e11262dd1bc2732254c33415f52",
"type": "github"
},
"original": {
@ -528,11 +528,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1748693115,
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
"lastModified": 1748929857,
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
"type": "github"
},
"original": {
@ -559,11 +559,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1748889542,
"narHash": "sha256-Hb4iMhIbjX45GcrgOp3b8xnyli+ysRPqAgZ/LZgyT5k=",
"lastModified": 1749086602,
"narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "10d7f8d34e5eb9c0f9a0485186c1ca691d2c5922",
"rev": "4792576cb003c994bd7cc1edada3129def20b27d",
"type": "github"
},
"original": {
@ -575,11 +575,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1748810746,
"narHash": "sha256-1na8blYvU1F6HLwx/aFjrhUqpqZ0SCsnqqW9n2vXvok=",
"lastModified": 1748995628,
"narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "78d9f40fd6941a1543ffc3ed358e19c69961d3c1",
"rev": "8eb3b6a2366a7095939cd22f0dc0e9991313294b",
"type": "github"
},
"original": {
@ -591,11 +591,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1748693115,
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
"lastModified": 1748929857,
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
"type": "github"
},
"original": {
@ -605,6 +605,22 @@
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1747958103,
"narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": [
@ -634,11 +650,11 @@
"nur-rycee": {
"flake": false,
"locked": {
"lastModified": 1748923398,
"narHash": "sha256-794RwyZJto9NoFlGYuhWKhkhkJ0KrH9Paw5w1DM2zA0=",
"lastModified": 1749143092,
"narHash": "sha256-IrVT37SUU8/B3X53rwEzDrx3djGLIfa8tmsyqVJxpR4=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "9eb346d6488b06f04809da4de2073666e25ede9d",
"rev": "d62d10f250ca6a37cbbe05a35a0e1e7ae3b4b5c2",
"type": "gitlab"
},
"original": {
@ -665,7 +681,8 @@
"nixpkgs": "nixpkgs_2",
"nur-rycee": "nur-rycee",
"sops-nix": "sops-nix",
"stylix": "stylix"
"stylix": "stylix",
"treefmt-nix": "treefmt-nix_2"
}
},
"rust-overlay": {
@ -697,11 +714,11 @@
]
},
"locked": {
"lastModified": 1748918260,
"narHash": "sha256-KhXNXQ5IDLvwwYfJ0pXDjwIuisZ2qM6F7fcXjIGZy/4=",
"lastModified": 1749091064,
"narHash": "sha256-TGtYjzRX0sueFhwYsnNNFF5TTKnpnloznpIghLzxeXo=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "c9736155bc1eb7c7cf3a925920850e61c07ab22a",
"rev": "12419593ce78f2e8e1e89a373c6515885e218acb",
"type": "github"
},
"original": {
@ -758,11 +775,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1748970111,
"narHash": "sha256-PmdrezN87CNzqTPnlC+YpLS7bZ0naeaD5d2eBFivXdY=",
"lastModified": 1749165619,
"narHash": "sha256-E1KgTswgmzBGv+8WijQRghlyIP6k+LPzj9j8bq9BlLU=",
"owner": "danth",
"repo": "stylix",
"rev": "82d9424fffa709e162364c1397f816d232e6e1d1",
"rev": "8456dfa7f60e6b4499b0498fc88e9b8b57d4d7d7",
"type": "github"
},
"original": {
@ -904,6 +921,24 @@
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1748243702,
"narHash": "sha256-9YzfeN8CB6SzNPyPm2XjRRqSixDopTapaRsnTpXUEY8=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "1f3f7b784643d488ba4bf315638b2b0a4c5fb007",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {

View file

@ -133,6 +133,12 @@
utils.follows = "flake-utils";
};
};
treefmt-nix = {
type = "github";
owner = "numtide";
repo = "treefmt-nix";
};
};
outputs = {
self,
@ -153,6 +159,7 @@
systems = flake-utils.lib.defaultSystems;
imports = [
inputs.home-manager.flakeModules.home-manager
inputs.treefmt-nix.flakeModule
nixos
home
deploy
@ -169,7 +176,6 @@
allowUnfree = true;
};
};
formatter = pkgs.alejandra;
packages = import ./pkgs (
args
// {
@ -185,6 +191,40 @@
nvfetcher
];
};
treefmt = {
programs = {
alejandra = {
enable = true;
excludes = ["pkgs/_sources/*.nix"];
};
biome = {
enable = true;
includes = ["*.json"];
excludes = ["pkgs/_sources/*.json"];
settings = {
javascript.formatter.enabled = false;
css.formatter.enabled = false;
};
};
dprint = {
enable = true;
includes = ["*.md" "*.toml" "*.yaml"];
excludes = ["secrets/*.yaml"];
settings = {
plugins = pkgs.dprint-plugins.getPluginList (plugins:
with plugins; [
dprint-plugin-toml
dprint-plugin-markdown
g-plane-pretty_yaml
]);
};
};
just = {
enable = true;
includes = [".justfile"];
};
};
};
};
flake = {
overlays = {

View file

@ -51,7 +51,6 @@ repo_root_style = "bold green"
use_os_path_sep = false
read_only = " 󰌾"
[aws]
symbol = " "
@ -210,4 +209,3 @@ symbol = " "
[zig]
symbol = " "

View file

@ -12,8 +12,8 @@ stale = false
[output]
deny = ["unmaintained"] # exit on error if unmaintained dependencies are found
format = "terminal" # "terminal" (human readable report) or "json"
quiet = false # Only print information on error
format = "terminal" # "terminal" (human readable report) or "json"
quiet = false # Only print information on error
show_tree = true
[target]

View file

@ -25,11 +25,11 @@
targets = [
# The triple can be any string, but only the target triples built in to
# rustc (as of 1.40) can be checked against actual config expressions
#"x86_64-unknown-linux-musl",
# "x86_64-unknown-linux-musl",
# You can also specify which target_features you promise are enabled for a
# particular target. target_features are currently not validated against
# the actual valid features supported by the target architecture.
#{ triple = "wasm32-unknown-unknown", features = ["atomics"] },
# { triple = "wasm32-unknown-unknown", features = ["atomics"] },
]
# When creating the dependency graph used as the source of truth when checks are
# executed, this field can be used to prune crates from the graph, removing them
@ -38,7 +38,7 @@ targets = [
# they are connected to another crate in the graph that hasn't been pruned,
# so it should be used with care. The identifiers are [Package ID Specifications]
# (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html)
#exclude = []
# exclude = []
# If true, metadata will be collected with `--all-features`. Note that this can't
# be toggled off if true, if you want to conditionally enable `--all-features` it
# is recommended to pass `--all-features` on the cmd line instead
@ -48,7 +48,7 @@ all-features = false
no-default-features = false
# If set, these feature will be enabled when collecting metadata. If `--features`
# is specified on the cmd line they will take precedence over this option.
#features = []
# features = []
# The output table provides options for how/if diagnostics are outputted
[output]
@ -64,22 +64,22 @@ feature-depth = 1
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
# The path where the advisory databases are cloned/fetched into
#db-path = "$CARGO_HOME/advisory-dbs"
# db-path = "$CARGO_HOME/advisory-dbs"
# The url(s) of the advisory databases to use
#db-urls = ["https://github.com/rustsec/advisory-db"]
# db-urls = ["https://github.com/rustsec/advisory-db"]
# A list of advisory IDs to ignore. Note that ignored advisories will still
# output a note when they are encountered.
ignore = [
#"RUSTSEC-0000-0000",
#{ id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" },
#"a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wish
#{ crate = "a-crate-that-is-yanked@0.1.1", reason = "you can specify why you are ignoring the yanked crate" },
# "RUSTSEC-0000-0000",
# { id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" },
# "a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wish
# { crate = "a-crate-that-is-yanked@0.1.1", reason = "you can specify why you are ignoring the yanked crate" },
]
# If this is true, then cargo deny will use the git executable to fetch advisory database.
# If this is false, then it uses a built-in git library.
# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support.
# See Git Authentication for more information about setting up git authentication.
#git-fetch-with-cli = true
# git-fetch-with-cli = true
# This section is considered when running `cargo deny check licenses`
# More documentation for the licenses section can be found here:
@ -90,9 +90,9 @@ ignore = [
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
allow = [
"MIT",
#"Apache-2.0",
#"Apache-2.0 WITH LLVM-exception",
"GPL-3.0"
# "Apache-2.0",
# "Apache-2.0 WITH LLVM-exception",
"GPL-3.0",
]
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
@ -104,26 +104,26 @@ confidence-threshold = 0.8
exceptions = [
# Each entry is the crate and version constraint, and its specific allow
# list
#{ allow = ["Zlib"], crate = "adler32" },
# { allow = ["Zlib"], crate = "adler32" },
]
# Some crates don't have (easily) machine readable licensing information,
# adding a clarification entry for it allows you to manually specify the
# licensing information
#[[licenses.clarify]]
# [[licenses.clarify]]
# The package spec the clarification applies to
#crate = "ring"
# crate = "ring"
# The SPDX expression for the license requirements of the crate
#expression = "MIT AND ISC AND OpenSSL"
# expression = "MIT AND ISC AND OpenSSL"
# One or more files in the crate's source used as the "source of truth" for
# the license expression. If the contents match, the clarification will be used
# when running the license check, otherwise the clarification will be ignored
# and the crate will be checked normally, which may produce warnings or errors
# depending on the rest of your configuration
#license-files = [
# license-files = [
# Each entry is a crate relative path, and the (opaque) hash of its contents
#{ path = "LICENSE", hash = 0xbd0eed23 }
#]
# { path = "LICENSE", hash = 0xbd0eed23 }
# ]
[licenses.private]
# If true, ignores workspace crates that aren't published, or are only
@ -135,7 +135,7 @@ ignore = false
# is only published to private registries, and ignore is true, the crate will
# not have its license(s) checked
registries = [
#"https://sekretz.com/registry
# "https://sekretz.com/registry
]
# This section is considered when running `cargo deny check bans`.
@ -162,27 +162,27 @@ workspace-default-features = "allow"
external-default-features = "allow"
# List of crates that are allowed. Use with care!
allow = [
#"ansi_term@0.11.0",
#{ crate = "ansi_term@0.11.0", reason = "you can specify a reason it is allowed" },
# "ansi_term@0.11.0",
# { crate = "ansi_term@0.11.0", reason = "you can specify a reason it is allowed" },
]
# List of crates to deny
deny = [
#"ansi_term@0.11.0",
#{ crate = "ansi_term@0.11.0", reason = "you can specify a reason it is banned" },
# "ansi_term@0.11.0",
# { crate = "ansi_term@0.11.0", reason = "you can specify a reason it is banned" },
# Wrapper crates can optionally be specified to allow the crate when it
# is a direct dependency of the otherwise banned crate
#{ crate = "ansi_term@0.11.0", wrappers = ["this-crate-directly-depends-on-ansi_term"] },
# { crate = "ansi_term@0.11.0", wrappers = ["this-crate-directly-depends-on-ansi_term"] },
]
# List of features to allow/deny
# Each entry the name of a crate and a version range. If version is
# not specified, all versions will be matched.
#[[bans.features]]
#crate = "reqwest"
# [[bans.features]]
# crate = "reqwest"
# Features to not allow
#deny = ["json"]
# deny = ["json"]
# Features to allow
#allow = [
# allow = [
# "rustls",
# "__rustls",
# "__tls",
@ -192,23 +192,23 @@ deny = [
# "rustls-tls-webpki-roots",
# "tokio-rustls",
# "webpki-roots",
#]
# ]
# If true, the allowed features must exactly match the enabled feature set. If
# this is set there is no point setting `deny`
#exact = true
# exact = true
# Certain crates/versions that will be skipped when doing duplicate detection.
skip = [
#"ansi_term@0.11.0",
#{ crate = "ansi_term@0.11.0", reason = "you can specify a reason why it can't be updated/removed" },
# "ansi_term@0.11.0",
# { crate = "ansi_term@0.11.0", reason = "you can specify a reason why it can't be updated/removed" },
]
# Similarly to `skip` allows you to skip certain crates during duplicate
# detection. Unlike skip, it also includes the entire tree of transitive
# dependencies starting at the specified crate, up to a certain depth, which is
# by default infinite.
skip-tree = [
#"ansi_term@0.11.0", # will be skipped along with _all_ of its direct and transitive dependencies
#{ crate = "ansi_term@0.11.0", depth = 20 },
# "ansi_term@0.11.0", # will be skipped along with _all_ of its direct and transitive dependencies
# { crate = "ansi_term@0.11.0", depth = 20 },
]
# This section is considered when running `cargo deny check sources`.