diff --git a/.helix/languages.toml b/.helix/languages.toml deleted file mode 100644 index 0d90ee8..0000000 --- a/.helix/languages.toml +++ /dev/null @@ -1,18 +0,0 @@ -[[language]] -name = "nix" -language-servers = ["nixd", "typos-lsp"] - -[[language]] -name = "markdown" -language-servers = ["marksman", "markdown-oxide", "typos-lsp"] - -[[language]] -name = "toml" -language-servers = ["taplo", "typos-lsp"] - -[[language]] -name = "git-ignore" -language-servers = ["typos-lsp"] - -[language-server.typos-lsp] -command = "typos-lsp" diff --git a/.typos.toml b/.typos.toml deleted file mode 100644 index e296d3d..0000000 --- a/.typos.toml +++ /dev/null @@ -1,21 +0,0 @@ -[files] -ignore-global = true -ignore-parent = true -ignore-hidden = false -ignore-files = true -ignore-vcs = true -extend-exclude = ["secrets/", ".git/", "public-key.txt"] - -[default] -check-filename = true -check-file = true -unicode = true -extend-ignore-re = [ - # Line ignore with trailling `(#|//) spellchecker: disable-line` - "(?Rm)^.*(#|//)\\s*spellchecker: disable-line$", - # Line block with `# spellchecker: ` - "(?s)(#|//)\\s*spellchecker: off.*?\\n\\s*(#|//)\\s*spellchecker: on", -] -extend-ignore-identifiers-re = ["als", "Paket", "ConfiguratioN", "StructurE"] - -[default.extend-identifiers] diff --git a/codebook.toml b/codebook.toml new file mode 100644 index 0000000..8a78c62 --- /dev/null +++ b/codebook.toml @@ -0,0 +1,18 @@ +words = [ + "akun", + "configuratio", + "fuzzel", + "gdm", + "ghostty", + "kde", + "niri", + "nixo", + "nixos", + "nixpkgs", + "ovelrays", + "pkgs", + "sddm", + "specialisation", + "structur", + "tytonidae", +] diff --git a/flake.nix b/flake.nix index a663bd3..436b222 100644 --- a/flake.nix +++ b/flake.nix @@ -180,7 +180,6 @@ packages = with pkgs; [ nixd typos - typos-lsp just nvfetcher ]; diff --git a/home/modules/programs/wluma.nix b/home/modules/programs/wluma.nix index 061d3e7..9c3d06a 100644 --- a/home/modules/programs/wluma.nix +++ b/home/modules/programs/wluma.nix @@ -21,7 +21,7 @@ in { example = pkgs.wluam; default = pkgs.wluma; description = '' - package of wluma + pakcage of wluma ''; }; }; diff --git a/nixos/modules/programs/juicity/template.nix b/nixos/modules/programs/juicity/template.nix index 7117358..50ae4fe 100644 --- a/nixos/modules/programs/juicity/template.nix +++ b/nixos/modules/programs/juicity/template.nix @@ -50,7 +50,7 @@ in { description = '' A file which JSON configurations for juicity client. See the {option}`settings` option for more information. - Note: this file will override {options}`settings` option, which is recommended. + Note: this file will override {options}`settings` option, which is recommanded. ''; }; allowedOpenFirewallPorts = lib.mkOption { @@ -95,7 +95,7 @@ in { description = '' A file which JSON configurations for juicity server. See the {option}`settings` option for more information. - Note: this file will override {options}`settings` option, which is recommended. + Note: this file will override {options}`settings` option, which is recommanded. ''; }; allowedOpenFirewallPorts = lib.mkOption { diff --git a/pkgs/default.nix b/pkgs/default.nix index c249653..0c66cbb 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,7 +4,7 @@ ... }: let srcs = pkgs.callPackage ./_sources/generated.nix {}; - callPackage = pkgs.lib.callPackageWith (pkgs // {inherit inputs srcs callPackage;}); + callPackage = fn: args: pkgs.lib.callPackageWith (pkgs // {inherit inputs srcs callPackage;}) fn args; in { pinentry-selector = callPackage ./pinentry-selector.nix {}; diff --git a/pkgs/helix/default.nix b/pkgs/helix/default.nix index 5af9619..8e85c52 100644 --- a/pkgs/helix/default.nix +++ b/pkgs/helix/default.nix @@ -8,7 +8,6 @@ runtime = callPackage ./runtime.nix {}; runtimeInputs = ( with pkgs; [ - nixfmt-rfc-style idris2Packages.idris2Lsp lua-language-server bash-language-server diff --git a/pkgs/helix/runtime.nix b/pkgs/helix/runtime.nix index ce0e5ec..70857b3 100644 --- a/pkgs/helix/runtime.nix +++ b/pkgs/helix/runtime.nix @@ -11,7 +11,7 @@ src = grammar.src; # sourceRoot = "source"; - dontConfigure = true; + dontConfigue = true; FLAGS = [ "-Isrc" diff --git a/templates/cxxWithXmake/flake.nix b/templates/cxxWithXmake/flake.nix index f7c2478..7ccaf94 100644 --- a/templates/cxxWithXmake/flake.nix +++ b/templates/cxxWithXmake/flake.nix @@ -18,38 +18,14 @@ }; in { formatter = pkgs.alejandra; - checks = { - inherit (self.packages.${system}) default; - }; devShells.default = pkgs.mkShell { - inputsFrom = [] ++ (builtins.attrValues self.checks.${system}); packages = with pkgs; [ clang-tools + + gcc + xmake ]; }; - packages = rec { - cxx-demo = pkgs.stdenv.mkDerivation { - pname = "cxx-demo"; - version = "unstable"; - src = ./.; - strictDeps = true; - nativeBuildInputs = with pkgs; [ - xmake - gnumake - ]; - preConfigure = '' - xmake config -m release - xmake project -k xmakefile - ''; - env = { - INSTALLDIR = "${placeholder "out"}"; - NIX_DEBUG = 1; - V = 1; - D = 1; - }; - }; - default = cxx-demo; - }; }); nixConfig = { keepOutputs = true; diff --git a/templates/rust/.cargo/audit.toml b/templates/rust/.cargo/audit.toml deleted file mode 100644 index fd7bf33..0000000 --- a/templates/rust/.cargo/audit.toml +++ /dev/null @@ -1,25 +0,0 @@ -[advisories] -ignore = [] # advisory IDs to ignore e.g. ["RUSTSEC-2019-0001", ...] -informational_warnings = [ - "unmaintained", -] # warn for categories of informational advisories -severity_threshold = "low" # CVSS severity ("none", "low", "medium", "high", "critical") - -[database] -url = "https://github.com/RustSec/advisory-db.git" -fetch = true -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 -show_tree = true - -[target] -arch = ["x86_64"] -os = ["linux", "windows"] - -[yanked] -enabled = true -update_index = true diff --git a/templates/rust/.envrc b/templates/rust/.envrc index 5e5ab08..7f9c986 100644 --- a/templates/rust/.envrc +++ b/templates/rust/.envrc @@ -1,3 +1,3 @@ -watch_file rust-toolchain.toml nix/*.nix +watch_file rust-toolchain.toml use flake diff --git a/templates/rust/.rustfmt.toml b/templates/rust/.rustfmt.toml deleted file mode 100644 index 7f8e98f..0000000 --- a/templates/rust/.rustfmt.toml +++ /dev/null @@ -1,17 +0,0 @@ -edition = "2024" -merge_derives = true -newline_style = "Unix" -reorder_imports = true -reorder_modules = true -use_field_init_shorthand = true -use_try_shorthand = true -# unstable_features = true -# format_code_in_doc_comments = true -# format_macro_bodies = true -# format_strings = true -# float_literal_trailing_zero = "IfNoPostfix" -# imports_granularity = "Crate" -# overflow_delimited_expr = true -# reorder_impl_items = true -# group_imports = "StdExternalCrate" -# wrap_comments = true diff --git a/templates/rust/flake.lock b/templates/rust/flake.lock index 2cee095..25d9947 100644 --- a/templates/rust/flake.lock +++ b/templates/rust/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1747937073, - "narHash": "sha256-52H8P6jAHEwRvg7rXr4Z7h1KHZivO8T1Z9tN6R0SWJg=", + "lastModified": 1746689539, + "narHash": "sha256-rVUs0CjpuO7FKVHecsuMaYiUr8iKscsgeo/b2XlnPmQ=", "owner": "rustsec", "repo": "advisory-db", - "rev": "bccf313a98c034573ac4170e6271749113343d97", + "rev": "796d034fbcb1c5bc83c0d0912dc31eb4e34458bf", "type": "github" }, "original": { @@ -18,11 +18,11 @@ }, "crane": { "locked": { - "lastModified": 1748047550, - "narHash": "sha256-t0qLLqb4C1rdtiY8IFRH5KIapTY/n3Lqt57AmxEv9mk=", + "lastModified": 1746291859, + "narHash": "sha256-DdWJLA+D5tcmrRSg5Y7tp/qWaD05ATI4Z7h22gd1h7Q=", "owner": "ipetkov", "repo": "crane", - "rev": "b718a78696060df6280196a6f992d04c87a16aef", + "rev": "dfd9a8dfd09db9aad544c4d3b6c47b12562544a5", "type": "github" }, "original": { @@ -51,11 +51,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1747958103, - "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", + "lastModified": 1746300365, + "narHash": "sha256-thYTdWqCRipwPRxWiTiH1vusLuAy0okjOyzRx4hLWh4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", + "rev": "f21e4546e3ede7ae34d12a84602a22246b31f7e0", "type": "github" }, "original": { @@ -81,11 +81,11 @@ ] }, "locked": { - "lastModified": 1748140821, - "narHash": "sha256-GZcjWLQtDifSYMd1ueLDmuVTcQQdD5mONIBTqABooOk=", + "lastModified": 1746326315, + "narHash": "sha256-IDqSls/r6yBfdOBRSMQ/noTUoigmsKnTQ7TqpsBtN4Y=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "476b2ba7dc99ddbf70b1f45357dbbdbdbdfb4422", + "rev": "dd280c436961ec5adccf0135efe5b66a23d84497", "type": "github" }, "original": { diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix index 1e02842..579eab8 100644 --- a/templates/rust/flake.nix +++ b/templates/rust/flake.nix @@ -31,17 +31,12 @@ inherit (pkgs) lib; pkgs = import nixpkgs { inherit system; - overlays = [ - (import rust-overlay) - (final: prev: { - lib = prev.lib // (import ./nix/lib.nix prev.lib); - }) - ]; + overlays = [(import rust-overlay)]; }; rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; srcFilters = path: type: - builtins.any (lib.flip lib.hasSuffix path) [ + builtins.any (suffix: lib.hasSuffix suffix path) [ ".sql" ".diff" ".md" @@ -55,24 +50,26 @@ }; basicArgs = { inherit src; + pname = "rust-demo"; strictDeps = true; }; - nativeBuildInputs = []; - buildInputs = []; - genInputs = lib.genInputsWith pkgs; + cargoArtifacts = craneLib.buildDepsOnly basicArgs; commonArgs = basicArgs // { - cargoArtifacts = self.packages.${system}.cargo-artifacts; - buildInputs = genInputs buildInputs; - nativeBuildInputs = genInputs nativeBuildInputs; + inherit cargoArtifacts; + nativeBuildInputs = with pkgs; []; + buildInputs = + (with pkgs; []) + ++ lib.optional pkgs.stdenv.buildPlatform.isDarwin (with pkgs; [ + darwin.apple_sdk.frameworks.Security + ]); + env = {}; }; in { formatter = pkgs.alejandra; checks = { - package = self.packages.${system}.default.overrideAttrs { - doCheck = true; - }; + inherit (self.packages.${system}) default; clippy = craneLib.cargoClippy (commonArgs // { cargoClippyExtraArgs = "--all-targets -- --deny warnings"; @@ -87,30 +84,31 @@ // { partitions = 1; partitionType = "count"; + nativeBuildInputs = []; cargoNextestExtraArgs = "--no-tests pass"; env = { CARGO_PROFILE = "dev"; }; }); }; - packages = let - callPackage = lib.callPackageWith (pkgs // {inherit craneLib callPackage;}); - packageArgs = { - inherit lib basicArgs buildInputs nativeBuildInputs; - }; - importWithArgs = with lib; flip import packageArgs; - in rec { - cargo-artifacts = callPackage (importWithArgs ./nix/cargo-artifacts.nix) {}; - rust-demo = callPackage (importWithArgs ./nix/package.nix) { - cargoArtifacts = cargo-artifacts; - }; + packages = rec { + rust-demo = craneLib.buildPackage (commonArgs + // { + inherit + (craneLib.crateNameFromCargoToml { + cargoToml = "${toString src}/Cargo.toml"; + }) + ; + doCheck = false; + nativeBuildInputs = []; + buildInputs = []; + }); default = rust-demo; }; apps.default = flake-utils.lib.mkApp { drv = self.packages."${system}".default; }; devShells.default = craneLib.devShell { - checks = self.checks.${system}; packages = with pkgs; [ rust-analyzer cargo-audit diff --git a/templates/rust/nix/cargo-artifacts.nix b/templates/rust/nix/cargo-artifacts.nix deleted file mode 100644 index df41cad..0000000 --- a/templates/rust/nix/cargo-artifacts.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - lib, - basicArgs, - buildInputs, - nativeBuildInputs, -}: let - f = { - craneLib, - lib, - ... - } @ args: let - genInputs = lib.genInputsWith args; - in - craneLib.buildDepsOnly (basicArgs - // { - buildInputs = genInputs buildInputs; - nativeBuildInputs = genInputs nativeBuildInputs; - }); -in - with lib; setFunctionArgs f ((functionArgs f) // (genFunctionArgs (buildInputs ++ nativeBuildInputs))) diff --git a/templates/rust/nix/lib.nix b/templates/rust/nix/lib.nix deleted file mode 100644 index f965403..0000000 --- a/templates/rust/nix/lib.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - flip, - pipe, - splitString, - head, - listToAttrs, - nameValuePair, - getAttrFromPath, - ... -}: { - genFunctionArgs = flip pipe [(map (flip pipe [(splitString ".") head (flip nameValuePair false)])) listToAttrs]; - genInputsWith = pkgs: map (flip pipe [(splitString ".") (flip getAttrFromPath pkgs)]); -} diff --git a/templates/rust/nix/package.nix b/templates/rust/nix/package.nix deleted file mode 100644 index 744cad2..0000000 --- a/templates/rust/nix/package.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - lib, - basicArgs, - buildInputs, - nativeBuildInputs, -}: let - f = { - craneLib, - lib, - cargoArtifacts, - ... - } @ args: let - genInputs = lib.genInputsWith args; - in - craneLib.buildPackage (basicArgs - // { - inherit - (craneLib.crateNameFromCargoToml { - cargoToml = "${toString basicArgs.src}/Cargo.toml"; - }) - pname - version - ; - inherit cargoArtifacts; - buildInputs = genInputs buildInputs; - nativeBuildInputs = genInputs nativeBuildInputs; - doCheck = false; - }); -in - with lib; setFunctionArgs f ((functionArgs f) // (genFunctionArgs (buildInputs ++ nativeBuildInputs))) diff --git a/templates/rust/rust-toolchain.toml b/templates/rust/rust-toolchain.toml index 698a98c..02cb8fc 100644 --- a/templates/rust/rust-toolchain.toml +++ b/templates/rust/rust-toolchain.toml @@ -1,4 +1,3 @@ [toolchain] channel = "stable" profile = "default" -components = ["rust-src"]