mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-01-18 03:03:29 -05:00
add scripts
This commit is contained in:
parent
8cc2802a15
commit
5a0e0eb481
7 changed files with 78 additions and 33 deletions
|
@ -1,4 +1,10 @@
|
||||||
{ config }: rec{
|
{
|
||||||
|
config,
|
||||||
|
cpkg,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
in
|
||||||
|
{
|
||||||
lazygit = {
|
lazygit = {
|
||||||
recursive = true;
|
recursive = true;
|
||||||
source = ../dotfiles/lazygit;
|
source = ../dotfiles/lazygit;
|
||||||
|
@ -37,6 +43,10 @@
|
||||||
source = ../dotfiles/rofi;
|
source = ../dotfiles/rofi;
|
||||||
target = "./.config/rofi";
|
target = "./.config/rofi";
|
||||||
};
|
};
|
||||||
|
scripts = {
|
||||||
|
source = "${cpkg.scripts}";
|
||||||
|
target = ".scripts";
|
||||||
|
};
|
||||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||||
# # symlink to the Nix store copy.
|
# # symlink to the Nix store copy.
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
{ pkgs, config }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
cpkg,
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cpkg = import ../customPackages { inherit pkgs; };
|
|
||||||
pinned = import ./pinned.nix { inherit pkgs config; };
|
pinned = import ./pinned.nix { inherit pkgs config; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
dev = with pkgs;[
|
dev = with pkgs; [
|
||||||
meson
|
meson
|
||||||
deno
|
deno
|
||||||
rustup
|
rustup
|
||||||
|
@ -46,7 +50,7 @@ in
|
||||||
]))
|
]))
|
||||||
nodejs_22
|
nodejs_22
|
||||||
];
|
];
|
||||||
gui = with pkgs;[
|
gui = with pkgs; [
|
||||||
cpkg.frog
|
cpkg.frog
|
||||||
legcord
|
legcord
|
||||||
obsidian
|
obsidian
|
||||||
|
@ -137,6 +141,9 @@ in
|
||||||
lutris
|
lutris
|
||||||
];
|
];
|
||||||
scripts = [
|
scripts = [
|
||||||
|
(pkgs.writeShellScriptBin "hashi18n" ''
|
||||||
|
xsel -ob | node ${cpkg.scripts}/hash.js | tr -d '\n' | xsel -ib
|
||||||
|
'')
|
||||||
(pkgs.writeShellScriptBin "paste" ''
|
(pkgs.writeShellScriptBin "paste" ''
|
||||||
command -v xsel > /dev/null
|
command -v xsel > /dev/null
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
|
@ -160,8 +167,7 @@ in
|
||||||
URL=''${URL/https:\/\//git@};
|
URL=''${URL/https:\/\//git@};
|
||||||
URL=''${URL/\//:};
|
URL=''${URL/\//:};
|
||||||
git remote set-url $1 $URL;
|
git remote set-url $1 $URL;
|
||||||
''
|
'')
|
||||||
)
|
|
||||||
(pkgs.writeShellScriptBin "copy" ''
|
(pkgs.writeShellScriptBin "copy" ''
|
||||||
command -v xsel > /dev/null
|
command -v xsel > /dev/null
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
|
@ -194,14 +200,8 @@ in
|
||||||
set -e
|
set -e
|
||||||
python3 -c "print($*)"
|
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;[
|
wsl = with pkgs; [
|
||||||
wslu
|
wslu
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ config, pkgs }: rec {
|
{ config, pkgs, cpkg }:
|
||||||
|
rec {
|
||||||
dev = {
|
dev = {
|
||||||
env = common.env // {
|
env = common.env // {
|
||||||
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
|
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
|
||||||
|
|
|
@ -1,9 +1,22 @@
|
||||||
{ config, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
file = import ../../files.nix { inherit config; };
|
file = import ../../files.nix { inherit config cpkg; };
|
||||||
shell = import ../../shell.nix { inherit config pkgs; };
|
shell = import ../../shell.nix { inherit config pkgs cpkg; };
|
||||||
pkgTypes = import ../../pkgs.nix { inherit pkgs config; };
|
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;
|
packages = pkgTypes.dev ++ pkgTypes.gui ++ pkgTypes.general ++ pkgTypes.scripts ++ pkgTypes.gaming;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -27,7 +40,6 @@ in
|
||||||
home.username = "meyer";
|
home.username = "meyer";
|
||||||
home.homeDirectory = "/home/meyer";
|
home.homeDirectory = "/home/meyer";
|
||||||
|
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home = {
|
home = {
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
{ pkgs }:
|
{ pkgs, inputs }:
|
||||||
let
|
rec {
|
||||||
in
|
|
||||||
rec{
|
|
||||||
# discord = nixpkgs.callPackage ./discord { };
|
# discord = nixpkgs.callPackage ./discord { };
|
||||||
discord = pkgs.callPackage ./discord/default.nix { };
|
discord = pkgs.callPackage ./discord/default.nix { };
|
||||||
vesktop = pkgs.callPackage ./vesktop/default.nix { inherit vencord; };
|
vesktop = pkgs.callPackage ./vesktop/default.nix { inherit vencord; };
|
||||||
vencord = pkgs.callPackage ./vencord/package.nix { };
|
vencord = pkgs.callPackage ./vencord/package.nix { };
|
||||||
frog = pkgs.callPackage ./frog {};
|
frog = pkgs.callPackage ./frog { };
|
||||||
|
scripts = inputs.scripts.flakePackage pkgs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,8 @@ python3Packages.buildPythonApplication rec {
|
||||||
src = ( fetchFromGitHub {
|
src = ( fetchFromGitHub {
|
||||||
owner = "sadan4";
|
owner = "sadan4";
|
||||||
repo = "frog";
|
repo = "frog";
|
||||||
rev = "4e43c19701032de6dc741c92ed505f8fe660fbbb";
|
rev = "e4b48239238e1947e74b919fd85609b6500aca31";
|
||||||
hash = "sha256-olQofXrUF97NvY/lYBic/u50zuFvuOm4XrWUKn83xac=";
|
hash = "sha256-0/ZFmcaMKM/GpS8Q35e0joHTq4D0IEKdsCBJ16P8JZs=";
|
||||||
});
|
});
|
||||||
format = "other";
|
format = "other";
|
||||||
|
|
||||||
|
|
35
flake.nix
35
flake.nix
|
@ -14,6 +14,10 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
scripts = {
|
||||||
|
inputs.scripts.follows = "nixpkgs";
|
||||||
|
url = "github:sadan4/scripts";
|
||||||
|
};
|
||||||
stylix = {
|
stylix = {
|
||||||
url = "github:danth/stylix";
|
url = "github:danth/stylix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -37,11 +41,28 @@
|
||||||
desktopIso = nixpkgs.lib.nixosSystem {
|
desktopIso = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
({ pkgs, modulesPath,lib, ... }: {
|
(
|
||||||
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
|
{
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
pkgs,
|
||||||
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" "ext4" ];
|
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"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nix-desktop-evo4b5 = nixpkgs.lib.nixosSystem {
|
nix-desktop-evo4b5 = nixpkgs.lib.nixosSystem {
|
||||||
|
@ -59,7 +80,9 @@
|
||||||
};
|
};
|
||||||
wsl = nixpkgs.lib.nixosSystem {
|
wsl = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./boxes/wsl/configuration.nix
|
./boxes/wsl/configuration.nix
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
|
|
Loading…
Reference in a new issue