start work on tui app and rework secrets system

This commit is contained in:
2026-02-15 01:12:38 +04:00
parent a89275f163
commit 2a8a30fc14
12 changed files with 2031 additions and 103 deletions

161
flake.nix
View File

@@ -4,86 +4,87 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
# crane.url = "github:ipetkov/crane";
# flake-utils.url = "github:numtide/flake-utils";
# rust-overlay = {
# url = "github:oxalica/rust-overlay";
# inputs.nixpkgs.follows = "nixpkgs";
# };
};
outputs =
{ flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
flake.flakeModules.default = ./nix/flakeModule.nix;
crane.url = "github:ipetkov/crane";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
# outputs =
# {
# nixpkgs,
# crane,
# flake-utils,
# rust-overlay,
# ...
# }:
# flake-utils.lib.eachDefaultSystem (
# system:
# let
# pkgs = import nixpkgs {
# inherit system;
# overlays = [
# (import rust-overlay)
# ];
# };
# inherit (pkgs) lib;
#
# craneLib = (crane.mkLib pkgs).overrideToolchain (
# p:
# p.rust-bin.nightly.latest.default.override {
# extensions = [
# "rustc-codegen-cranelift-preview"
# "rust-analyzer"
# "rust-src"
# ];
# }
# );
# src = craneLib.cleanCargoSource ./.;
# commonArgs = {
# inherit src;
# strictDeps = true;
# };
# cargoArtifacts = craneLib.buildDepsOnly commonArgs;
# individualCrateArgs = commonArgs // {
# inherit cargoArtifacts;
# inherit (craneLib.crateNameFromCargoToml { inherit src; }) version;
# };
#
# fileSetForCrate =
# crate:
# lib.fileset.toSource {
# root = ./.;
# fileset = lib.fileset.unions [
# ./Cargo.toml
# ./Cargo.lock
# ];
# };
# server = craneLib.buildPackage (
# individualCrateArgs
# // {
# }
# );
# in
# {
# devShells.default = craneLib.devShell {
# packages = with pkgs; [
# mold
# llvmPackages.clang
# llvmPackages.lld
# sea-orm-cli
# watchexec
# pnpm
# ];
# };
# }
# );
outputs =
{
flake-parts,
crane,
rust-overlay,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
flake.flakeModules.default = ./nix/flakeModule.nix;
perSystem =
{
pkgs,
lib,
system,
...
}:
let
craneLib = (crane.mkLib pkgs).overrideToolchain (
p:
p.rust-bin.nightly.latest.default.override {
extensions = [
"rustc-codegen-cranelift-preview"
"rust-analyzer"
"rust-src"
];
}
);
src = craneLib.cleanCargoSource ./.;
commonArgs = {
inherit src;
strictDeps = true;
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
individualCrateArgs = commonArgs // {
inherit cargoArtifacts;
inherit (craneLib.crateNameFromCargoToml { inherit src; }) version;
};
fileSetForCrate =
crate:
lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./Cargo.toml
./Cargo.lock
];
};
server = craneLib.buildPackage (
individualCrateArgs
// {
}
);
in
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.rust-overlay.overlays.default ];
};
devShells.default = craneLib.devShell {
packages = with pkgs; [
mold
llvmPackages.clang
llvmPackages.lld
sea-orm-cli
watchexec
pnpm
];
};
};
};
}