use treefmt for a lot more stuff
also make changes to comply with all the laws that come with those stuff
This commit is contained in:
parent
0513f19e52
commit
2d8b64ef26
10 changed files with 10 additions and 5443 deletions
|
@ -57,7 +57,7 @@
|
|||
in
|
||||
lib.foldl' lib.recursiveUpdate { } pkgVals;
|
||||
overlayPkgsFromFlake =
|
||||
flake: pkgNames: final: prev:
|
||||
flake: pkgNames: _final: prev:
|
||||
overridePkgsFromFlake prev flake pkgNames;
|
||||
overlays = [
|
||||
(overlayPkgsFromFlake inputs.nixpkgs-stable [
|
||||
|
@ -82,12 +82,15 @@
|
|||
programs.nixfmt.enable = true;
|
||||
programs.stylua.enable = true;
|
||||
programs.yamlfmt.enable = true;
|
||||
settings.formatter.yamlfmt.excludes = [ "secrets/*" ]; # sops does its own formatting
|
||||
programs.typos.enable = true;
|
||||
programs.shellcheck.enable = true;
|
||||
programs.deadnix.enable = true;
|
||||
|
||||
settings.global.excludes = [ "secrets/*" ];
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
|
||||
formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
checks = forEachSystem (pkgs: {
|
||||
formatting = treefmtEval.${pkgs.system}.config.build.check self;
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
focused_workspace=$(swaymsg -t get_workspaces | jq '.[] | select(.focused == true) | .num')
|
||||
|
||||
foot_window_count=$(swaymsg -t get_tree | jq --argjson workspace $focused_workspace '[recurse(.nodes[]?) | select(.type == "workspace" and .num == $workspace) | recurse(.nodes[]?) | select(.app_id == "foot")] | length')
|
||||
foot_window_count=$(swaymsg -t get_tree | jq --argjson workspace "$focused_workspace" '[recurse(.nodes[]?) | select(.type == "workspace" and .num == $workspace) | recurse(.nodes[]?) | select(.app_id == "foot")] | length')
|
||||
|
||||
next_session=$((focused_workspace * 10))
|
||||
|
||||
if [ $foot_window_count -gt 0 ]
|
||||
if [ "$foot_window_count" -gt 0 ]
|
||||
then
|
||||
next_session=$((next_session + foot_window_count))
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
|
|
@ -8,7 +8,6 @@ let
|
|||
thumbsLocation = "/opt/immich/thumbs";
|
||||
profileLocation = "/opt/immich/profile";
|
||||
dbDataLocation = "/opt/immich/postgres";
|
||||
modelCache = "/opt/immich-ml";
|
||||
in
|
||||
{
|
||||
virtualisation.oci-containers.containers = {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
database__connection__host = "ghost-db";
|
||||
database__connection__user = "root";
|
||||
database__connection__password = "example";
|
||||
database__connection__databse = "ghost";
|
||||
database__connection__database = "ghost";
|
||||
url = "https://cything.io";
|
||||
NODE_ENV = "production";
|
||||
};
|
||||
|
|
|
@ -2,10 +2,7 @@
|
|||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ in
|
|||
};
|
||||
sshKeyFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Path to the file containg the SSH identity key";
|
||||
description = "Path to the file containing the SSH identity key";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
5309
pkgs/Cargo.lock
generated
5309
pkgs/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,119 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
bzip2,
|
||||
zstd,
|
||||
stdenv,
|
||||
apple-sdk_15,
|
||||
darwinMinVersionHook,
|
||||
rocksdb,
|
||||
nix-update-script,
|
||||
testers,
|
||||
conduwuit,
|
||||
# upstream conduwuit enables jemalloc by default, so we follow suit
|
||||
enableJemalloc ? true,
|
||||
rust-jemalloc-sys,
|
||||
enableLiburing ? stdenv.hostPlatform.isLinux,
|
||||
liburing,
|
||||
nixosTests,
|
||||
}:
|
||||
let
|
||||
rust-jemalloc-sys' = rust-jemalloc-sys.override {
|
||||
unprefixed = !stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
rocksdb' = rocksdb.override {
|
||||
inherit enableLiburing;
|
||||
# rocksdb does not support prefixed jemalloc, which is required on darwin
|
||||
enableJemalloc = enableJemalloc && !stdenv.hostPlatform.isDarwin;
|
||||
jemalloc = rust-jemalloc-sys';
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "conduwuit";
|
||||
version = "0.4.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "girlbossceo";
|
||||
repo = "conduwuit";
|
||||
rev = "7f645ff0e9111cc6e05e3abc1abad7d0b1f6a5a9";
|
||||
hash = "sha256-GgpdkQzJH4uu396DurvaxqrvJe3F25wm2gMqT35z45A=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
allowBuiltinFetchGit = true;
|
||||
# outputHashes = {
|
||||
# "ruma-0.10.1" = lib.fakeHash;
|
||||
# "rust-librocksdb-sys-0.31.0+9.9.3" = lib.fakeHash;
|
||||
# "rustyline-async-0.4.3" = lib.fakeHash;
|
||||
# };
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
rustPlatform.bindgenHook
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
bzip2
|
||||
zstd
|
||||
]
|
||||
++ lib.optional enableJemalloc rust-jemalloc-sys'
|
||||
++ lib.optional enableLiburing liburing
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
apple-sdk_15
|
||||
# aws-lc-sys requires CryptoKit's CommonCrypto, which is available on macOS 10.15+
|
||||
(darwinMinVersionHook "10.15")
|
||||
];
|
||||
|
||||
env = {
|
||||
ZSTD_SYS_USE_PKG_CONFIG = true;
|
||||
ROCKSDB_INCLUDE_DIR = "${rocksdb'}/include";
|
||||
ROCKSDB_LIB_DIR = "${rocksdb'}/lib";
|
||||
};
|
||||
|
||||
buildNoDefaultFeatures = true;
|
||||
# See https://github.com/girlbossceo/conduwuit/blob/main/src/main/Cargo.toml
|
||||
# for available features.
|
||||
# We enable all default features except jemalloc and io_uring, which
|
||||
# we guard behind our own (default-enabled) flags.
|
||||
buildFeatures =
|
||||
[
|
||||
"brotli_compression"
|
||||
"element_hacks"
|
||||
"gzip_compression"
|
||||
"release_max_log_level"
|
||||
"sentry_telemetry"
|
||||
"systemd"
|
||||
"zstd_compression"
|
||||
]
|
||||
++ lib.optional enableJemalloc "jemalloc"
|
||||
++ lib.optional enableLiburing "io_uring";
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
tests =
|
||||
{
|
||||
version = testers.testVersion {
|
||||
inherit version;
|
||||
package = conduwuit;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs stdenv.hostPlatform.isLinux {
|
||||
inherit (nixosTests) conduwuit;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Matrix homeserver written in Rust, forked from conduit";
|
||||
homepage = "https://conduwuit.puppyirl.gay/";
|
||||
changelog = "https://github.com/girlbossceo/conduwuit/releases/tag/v${version}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ niklaskorz ];
|
||||
# Not a typo, conduwuit is a drop-in replacement for conduit.
|
||||
mainProgram = "conduit";
|
||||
};
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
pkgs: {
|
||||
}
|
Loading…
Add table
Reference in a new issue