Compare commits

..

No commits in common. "f1e6dbb66fe7db60e01926a0ab068b7cd52c2c17" and "3614b353bb42ae006a7bcf4a4a0bd2bb12b6c85c" have entirely different histories.

19 changed files with 65 additions and 220 deletions

View file

@ -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"

View file

@ -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: <on|off>`
"(?s)(#|//)\\s*spellchecker: off.*?\\n\\s*(#|//)\\s*spellchecker: on",
]
extend-ignore-identifiers-re = ["als", "Paket", "ConfiguratioN", "StructurE"]
[default.extend-identifiers]

18
codebook.toml Normal file
View file

@ -0,0 +1,18 @@
words = [
"akun",
"configuratio",
"fuzzel",
"gdm",
"ghostty",
"kde",
"niri",
"nixo",
"nixos",
"nixpkgs",
"ovelrays",
"pkgs",
"sddm",
"specialisation",
"structur",
"tytonidae",
]

View file

@ -180,7 +180,6 @@
packages = with pkgs; [
nixd
typos
typos-lsp
just
nvfetcher
];

View file

@ -21,7 +21,7 @@ in {
example = pkgs.wluam;
default = pkgs.wluma;
description = ''
package of wluma
pakcage of wluma
'';
};
};

View file

@ -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 {

View file

@ -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 {};

View file

@ -8,7 +8,6 @@
runtime = callPackage ./runtime.nix {};
runtimeInputs = (
with pkgs; [
nixfmt-rfc-style
idris2Packages.idris2Lsp
lua-language-server
bash-language-server

View file

@ -11,7 +11,7 @@
src = grammar.src;
# sourceRoot = "source";
dontConfigure = true;
dontConfigue = true;
FLAGS = [
"-Isrc"

View file

@ -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;

View file

@ -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

View file

@ -1,3 +1,3 @@
watch_file rust-toolchain.toml nix/*.nix
watch_file rust-toolchain.toml
use flake

View file

@ -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

View file

@ -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": {

View file

@ -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

View file

@ -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)))

View file

@ -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)]);
}

View file

@ -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)))

View file

@ -1,4 +1,3 @@
[toolchain]
channel = "stable"
profile = "default"
components = ["rust-src"]