add scripts

This commit is contained in:
sadan 2024-11-17 21:20:03 -05:00
parent 8cc2802a15
commit 5a0e0eb481
No known key found for this signature in database
7 changed files with 78 additions and 33 deletions

View file

@ -1,4 +1,10 @@
{ config }: rec{
{
config,
cpkg,
}:
let
in
{
lazygit = {
recursive = true;
source = ../dotfiles/lazygit;
@ -37,6 +43,10 @@
source = ../dotfiles/rofi;
target = "./.config/rofi";
};
scripts = {
source = "${cpkg.scripts}";
target = ".scripts";
};
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.

View file

@ -1,6 +1,10 @@
{ pkgs, config }:
{
pkgs,
config,
inputs,
cpkg,
}:
let
cpkg = import ../customPackages { inherit pkgs; };
pinned = import ./pinned.nix { inherit pkgs config; };
in
{
@ -137,6 +141,9 @@ in
lutris
];
scripts = [
(pkgs.writeShellScriptBin "hashi18n" ''
xsel -ob | node ${cpkg.scripts}/hash.js | tr -d '\n' | xsel -ib
'')
(pkgs.writeShellScriptBin "paste" ''
command -v xsel > /dev/null
if [[ $? -eq 0 ]]; then
@ -160,8 +167,7 @@ in
URL=''${URL/https:\/\//git@};
URL=''${URL/\//:};
git remote set-url $1 $URL;
''
)
'')
(pkgs.writeShellScriptBin "copy" ''
command -v xsel > /dev/null
if [[ $? -eq 0 ]]; then
@ -194,12 +200,6 @@ in
set -e
python3 -c "print($*)"
'')
(pkgs.writeShellScriptBin "ocr" ''
set -euo pipefail
TEMP=$(mktemp)
flameshot gui -s -r > $TEMP
(tesseract $TEMP --oem 1 -l eng | copy )|| copy "OCR RETUNRED NON-ZERO"
'')
];
wsl = with pkgs; [
wslu

View file

@ -1,4 +1,5 @@
{ config, pkgs }: rec {
{ config, pkgs, cpkg }:
rec {
dev = {
env = common.env // {
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";

View file

@ -1,9 +1,22 @@
{ config, pkgs, ... }:
{
config,
pkgs,
inputs,
...
}:
let
file = import ../../files.nix { inherit config; };
shell = import ../../shell.nix { inherit config pkgs; };
pkgTypes = import ../../pkgs.nix { inherit pkgs config; };
file = import ../../files.nix { inherit config cpkg; };
shell = import ../../shell.nix { inherit config pkgs cpkg; };
cpkg = import ../../../customPackages { inherit pkgs inputs; };
pkgTypes = import ../../pkgs.nix {
inherit
pkgs
config
inputs
cpkg
;
};
packages = pkgTypes.dev ++ pkgTypes.gui ++ pkgTypes.general ++ pkgTypes.scripts ++ pkgTypes.gaming;
in
{
@ -27,7 +40,6 @@ in
home.username = "meyer";
home.homeDirectory = "/home/meyer";
# The home.packages option allows you to install Nix packages into your
# environment.
home = {

View file

@ -1,10 +1,9 @@
{ pkgs }:
let
in
{ pkgs, inputs }:
rec {
# discord = nixpkgs.callPackage ./discord { };
discord = pkgs.callPackage ./discord/default.nix { };
vesktop = pkgs.callPackage ./vesktop/default.nix { inherit vencord; };
vencord = pkgs.callPackage ./vencord/package.nix { };
frog = pkgs.callPackage ./frog { };
scripts = inputs.scripts.flakePackage pkgs;
}

View file

@ -30,8 +30,8 @@ python3Packages.buildPythonApplication rec {
src = ( fetchFromGitHub {
owner = "sadan4";
repo = "frog";
rev = "4e43c19701032de6dc741c92ed505f8fe660fbbb";
hash = "sha256-olQofXrUF97NvY/lYBic/u50zuFvuOm4XrWUKn83xac=";
rev = "e4b48239238e1947e74b919fd85609b6500aca31";
hash = "sha256-0/ZFmcaMKM/GpS8Q35e0joHTq4D0IEKdsCBJ16P8JZs=";
});
format = "other";

View file

@ -14,6 +14,10 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
scripts = {
inputs.scripts.follows = "nixpkgs";
url = "github:sadan4/scripts";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
@ -37,11 +41,28 @@
desktopIso = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
({ pkgs, modulesPath,lib, ... }: {
(
{
pkgs,
modulesPath,
lib,
...
}:
{
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" "ext4" ];
})
boot.supportedFilesystems = lib.mkForce [
"btrfs"
"reiserfs"
"vfat"
"f2fs"
"xfs"
"ntfs"
"cifs"
"ext4"
];
}
)
];
};
nix-desktop-evo4b5 = nixpkgs.lib.nixosSystem {
@ -59,7 +80,9 @@
};
wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = {
inherit inputs;
};
modules = [
./boxes/wsl/configuration.nix
inputs.home-manager.nixosModules.default