all kinds of different language scripts
This commit is contained in:
parent
5400f80b55
commit
2a76649221
49
flake.lock
49
flake.lock
|
@ -288,6 +288,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-schemas": {
|
||||
"locked": {
|
||||
"lastModified": 1697467827,
|
||||
"narHash": "sha256-j8SR19V1SRysyJwpOBF4TLuAvAjF5t+gMiboN4gYQDU=",
|
||||
"rev": "764932025c817d4e500a8d2a4d8c565563923d29",
|
||||
"revCount": 29,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.2/018b3da8-4cc3-7fbb-8ff7-1588413c53e2/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
|
@ -671,6 +685,20 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1717952948,
|
||||
"narHash": "sha256-mJi4/gjiwQlSaxjA6AusXBN/6rQRaPCycR7bd8fydnQ=",
|
||||
"rev": "2819fffa7fa42156680f0d282c60d81e8fb185b7",
|
||||
"revCount": 631440,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2405.631440%2Brev-2819fffa7fa42156680f0d282c60d81e8fb185b7/0190034c-678d-7039-b45c-fa38168f2500/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1669542132,
|
||||
"narHash": "sha256-DRlg++NJAwPh8io3ExBJdNW7Djs3plVI5jgYQ+iXAZQ=",
|
||||
|
@ -685,6 +713,24 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"quickemu": {
|
||||
"inputs": {
|
||||
"flake-schemas": "flake-schemas",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720106666,
|
||||
"narHash": "sha256-zzD9nRkbYWg1vAW8QclJfrTePq1Y0h6lcIay+bv56iY=",
|
||||
"rev": "ca8f81f7fbabaa00e21e5e94519f9cc1fd7dcf1f",
|
||||
"revCount": 2038,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/quickemu-project/quickemu/4.9.6/01907e69-af19-7432-9708-89c294672e35/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/quickemu-project/quickemu/4.9.6.tar.gz"
|
||||
}
|
||||
},
|
||||
"radicle": {
|
||||
"inputs": {
|
||||
"advisory-db": "advisory-db",
|
||||
|
@ -720,6 +766,7 @@
|
|||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"quickemu": "quickemu",
|
||||
"radicle": "radicle",
|
||||
"rust-overlay": "rust-overlay_3",
|
||||
"simple-nixos-mailserver": "simple-nixos-mailserver",
|
||||
|
@ -797,7 +844,7 @@
|
|||
"simple-nixos-mailserver": {
|
||||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs-22_11": "nixpkgs-22_11",
|
||||
"utils": "utils"
|
||||
},
|
||||
|
|
15
flake.nix
15
flake.nix
|
@ -13,6 +13,9 @@
|
|||
url = "github:danth/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
quickemu = {
|
||||
url = "https://flakehub.com/f/quickemu-project/quickemu/4.9.6.tar.gz";
|
||||
};
|
||||
# hyprland = {
|
||||
# type = "git";
|
||||
# url = "https://github.com/hyprwm/Hyprland";
|
||||
|
@ -67,6 +70,7 @@
|
|||
nixpkgs-stable,
|
||||
home-manager,
|
||||
# hyprland,
|
||||
quickemu,
|
||||
nixos-hardware,
|
||||
emacs,
|
||||
nix-bitcoin,
|
||||
|
@ -96,6 +100,17 @@
|
|||
lib = nixpkgs.lib;
|
||||
|
||||
in {
|
||||
devShell = pkgsForSystem.mkShell {
|
||||
name = "devy";
|
||||
nativeBuildInputs = [];
|
||||
buildInputs = with pkgsForSystem; [
|
||||
cargo
|
||||
rustc
|
||||
clippy
|
||||
rustfmt
|
||||
rust-analyzer
|
||||
];
|
||||
};
|
||||
nixosConfigurations = {
|
||||
syl = lib.nixosSystem {
|
||||
inherit system;
|
||||
|
|
|
@ -129,6 +129,7 @@ with lib;
|
|||
xdg-desktop-portal-kde
|
||||
lxappearance
|
||||
spotdl
|
||||
rustdesk
|
||||
# (kdenlive.override {
|
||||
# mlt = mlt.override {
|
||||
# ffmpeg = ffmpeg-full;
|
||||
|
|
19
scripts/rusty.rs
Executable file
19
scripts/rusty.rs
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env -S nix shell "github:nix-community/fenix?rev=092bd452904e749efa39907aa4a20a42678ac31e#minimal.toolchain" -c cargo -q -Zscript
|
||||
```cargo
|
||||
[dependencies]
|
||||
clap = { version = "4.2", features = ["derive"] }
|
||||
```
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[clap(version)]
|
||||
struct Args {
|
||||
#[clap(short, long, help = "Path to config")]
|
||||
config: Option<std::path::PathBuf>,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let args = Args::parse();
|
||||
println!("{:?}", args);
|
||||
}
|
13
scripts/script.rs
Executable file
13
scripts/script.rs
Executable file
|
@ -0,0 +1,13 @@
|
|||
use clap::Parser;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[clap(version)]
|
||||
struct Args {
|
||||
#[clap(short, long, help = "Path to config")]
|
||||
config: Option<PathBuf>,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let args = Args::parse();
|
||||
println!("{:?}", args);
|
||||
}
|
5
scripts/video-archive
Executable file
5
scripts/video-archive
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
set file $argv[1]
|
||||
set new-file
|
||||
echo $file
|
29
scripts/video-archive.lisp
Executable file
29
scripts/video-archive.lisp
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env -S sbcl --script
|
||||
(require "uiop")
|
||||
(load "/home/chris/.sbclrc")
|
||||
|
||||
(defvar file (car (uiop:command-line-arguments)))
|
||||
(uiop/pathname:unix-namestring file)
|
||||
(defvar new-file (concatenate 'string (string-trim ".mp4" file) "-compressed.mp4"))
|
||||
|
||||
(run-program "ffmpeg"
|
||||
`("-i"
|
||||
,file
|
||||
"-c:v" "libx264"
|
||||
"-crf" "27" "-x264-params"
|
||||
"cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all"
|
||||
|
||||
"-c:a" "aac" "-ar" "44100"
|
||||
"-b:a" "128k" "-map" "0"
|
||||
,new-file)
|
||||
:search "/run/current-system/sw/bin/"
|
||||
:output t)
|
||||
|
||||
|
||||
(defvar path (pathname file))
|
||||
(defvar old-path (pathname "~/vids/camprules202-compressed.mp4"))
|
||||
(uiop:println old-path)
|
||||
(defvar new-path (make-pathname :defaults old-path :directory (pathname-directory (pathname "/run/media/chris/Storage/videos/camp2024/w1d1/"))))
|
||||
(uiop:println new-path)
|
||||
(run-program "mv" `(,new-file ,(namestring new-path)) :search "/run/current-system/sw/bin/" :output t)
|
||||
|
13
scripts/video-archive.rs
Normal file
13
scripts/video-archive.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
use clap::Parser;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[clap(version)]
|
||||
struct Args {
|
||||
#[clap(short, long, help = "Video to convert")]
|
||||
video: Option<PathBuf>,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let args = Args::parse();
|
||||
println!("{:?}", args);
|
||||
}
|
Loading…
Reference in a new issue