Initial Commit

This commit is contained in:
2024-10-02 00:54:05 -05:00
commit 46ebfc5cb6
45 changed files with 4120 additions and 0 deletions

209
packages/external/flake.lock generated vendored Normal file
View File

@@ -0,0 +1,209 @@
{
"nodes": {
"digital": {
"flake": false,
"locked": {
"lastModified": 1725393562,
"narHash": "sha256-xukWBh9LuxlfHcmlScEY49j/M+rhJoEaoWPXT4bWfSM=",
"type": "tarball",
"url": "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip"
},
"original": {
"type": "tarball",
"url": "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"lobster": {
"inputs": {
"nixpkgs": "nixpkgs",
"systems": "systems"
},
"locked": {
"lastModified": 1726728133,
"narHash": "sha256-6UNJxOcFKZCE20yVdeXi3hhsNdo82o0WdI52bjw/Zx0=",
"owner": "justchokingaround",
"repo": "lobster",
"rev": "3cfac574621d0ffc3c44df053fb8df94b4c2480a",
"type": "github"
},
"original": {
"owner": "justchokingaround",
"repo": "lobster",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1703961334,
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1727264057,
"narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "759537f06e6999e141588ff1c9be7f3a5c060106",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1724819573,
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 0,
"narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
"path": "/nix/store/mvz96grv31nxq69ldw5a5pn2qh1s6ca6-source",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"digital": "digital",
"lobster": "lobster",
"nixpkgs": "nixpkgs_2",
"swww": "swww",
"waveforms": "waveforms"
}
},
"swww": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_3",
"utils": "utils"
},
"locked": {
"lastModified": 1726747651,
"narHash": "sha256-Yg7c0XUgn82aNftvzSXTKMtZT1gdskun710aO5Dnd9M=",
"owner": "LGFae",
"repo": "swww",
"rev": "ddb0d5dbc83960d0c834d2a4dcb7f541474cb854",
"type": "github"
},
"original": {
"owner": "LGFae",
"repo": "swww",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"waveforms": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1726518634,
"narHash": "sha256-VsEAoGNO21d6irv6TyFd/m75o/+XoHz9ggRp4Nx583Y=",
"owner": "liff",
"repo": "waveforms-flake",
"rev": "eeb5438261394f3d0e35b7e20b511d6b865400c8",
"type": "github"
},
"original": {
"owner": "liff",
"repo": "waveforms-flake",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

62
packages/external/flake.nix vendored Normal file
View File

@@ -0,0 +1,62 @@
{
description = "External Flakes";
inputs = {
lobster.url = "github:justchokingaround/lobster";
swww.url = "github:LGFae/swww";
waveforms.url = "github:liff/waveforms-flake";
digital = {
url = "https://github.com/hneemann/Digital/releases/latest/download/Digital.zip";
flake = false;
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
};
outputs = { self, ... }@inputs: let
system = "x86_64-linux";
_pkgs = import inputs.nixpkgs { inherit system; };
in rec {
packages.${system}.digital = _pkgs.stdenv.mkDerivation {
name = "digital";
src = inputs.digital;
buildPhase = ''
'';
installPhase = ''
mkdir -p $out/bin
echo "${_pkgs.zulu}/bin/java -jar $src/Digital.jar" > $out/bin/$name
chmod +x $out/bin/digital
'';
};
module = { config, lib, pkgs, ... }: {
imports = [
inputs.waveforms.nixosModule
];
};
hmModule = { config, lib, pkgs, ... }: {
home.packages = [
inputs.lobster.packages.${pkgs.system}.lobster
inputs.swww.packages.${pkgs.system}.swww
packages.${pkgs.system}.digital
];
};
};
}

1
packages/external/result vendored Symbolic link
View File

@@ -0,0 +1 @@
/nix/store/b7f8lzhzksy3rhhzma1r5iascqahhzzz-digital

122
packages/flake.nix Normal file
View File

@@ -0,0 +1,122 @@
{
description = "Nathan user packages";
inputs = {
nixpkgs-old.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-us.url = "github:nixos/nixpkgs/nixos-unstable";
scripts.url = "./scripts";
external.url = "./external";
};
outputs = { self, ... }@inputs: let
system = "x86_64-linux";
pkgs-old = import inputs.nixpkgs-old {
inherit system;
config.allowUnfree = true;
};
pkgs-us = import inputs.nixpkgs-us {
inherit system;
config.allowUnfree = true;
};
in {
module = { config, lib, pkgs, ... }: {
imports = [
inputs.external.module
];
};
hmModule = { config, lib, pkgs, ... }: {
imports = [
inputs.scripts.hmModule
inputs.external.hmModule
];
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; let
pypkgs = ps: with ps; [
numpy
pandas
torch
torchvision
torchaudio
transformers
datasets
pyaudio
faster-whisper
pyusb
];
in [
cava
gcc
android-tools
(pkgs.python311.withPackages pypkgs)
brightnessctl
libdbusmenu-gtk3
zulu
lmms
killall
youtube-music
#unfree {
geogebra
#}
blueberry
wl-clipboard
firefox-wayland
swaylock-effects
neofetch
pkgs-us.mpv
(ncmpcpp.override { visualizerSupport = true; clockSupport = true; })
playerctl
mpc-cli
xfce.thunar
vlc
zip
unzip
pavucontrol
yewtube
ytmdl
ffmpeg_5
lxqt.lxqt-policykit
rpi-imager
rsync
grim
slurp
tigervnc
keepassxc
httplz
#school?
#pkgs-us.digital
#3D modeling/printing
kicad
blender
freecad
cura
#productivity
libreoffice
super-productivity
#games
prismlauncher
];
};
};
}

110
packages/scripts/flake.nix Normal file
View File

@@ -0,0 +1,110 @@
{
description = "Nathan user scripts";
inputs = {
};
outputs = { self, ... }: {
module = { config, lib, pkgs, ... }: {};
hmModule = { config, lib, pkgs, ... }: {
home.packages = [
#scripts
(pkgs.writeShellScriptBin "_systemRebuild" ''
sudo nix flake lock /home/nathan/.nixos --update-input nathan --update-input root --update-input system
${pkgs.nh}/bin/nh os switch --ask /home/nathan/.nixos
echo //////Enter to close//////
read
'')
(pkgs.writeShellScriptBin "_homeRebuild" ''
sudo nix flake lock /home/nathan/.nixos --update-input nathan --update-input root
${pkgs.nh}/bin/nh home switch --ask /home/nathan/.nixos
echo //////Enter to close//////
read
'')
(pkgs.writeShellScriptBin "addCoverArtMP3" ''
if [[ $# != 2 ]]
then echo "usage: addCoverArtMP3 song.mp3 image.jpg"
exit
fi
mv $1 copyof$1
ffmpeg -i copyof$1 -i $2 -map_metadata 0 -map 0 -map 1 -acodec copy $1
'')
(pkgs.writeShellScriptBin "randWallpaper" ''
file=$(ls /home/nathan/Pictures/Wallpaper/ | shuf -n 1)
setWallpaper /home/nathan/Pictures/Wallpaper/$file
'')
(pkgs.writeShellScriptBin "setWallpaper" ''
img=''$(realpath ''${1:-~/.cache/bg})
if [[ ''${1:-~/.cache/bg} != ~/.cache/bg ]]; then
swww img $img --transition-step 10 --transition-fps 30 --transition-type center && changeColors $img $2
else
changeColors $img $2
fi
'')
(pkgs.writeShellScriptBin "changeColors" ''
if [[ $(ls ~/.cache/ | grep bga) != bga ]]; then
echo 100 > ~/.cache/bga
fi
alpha=''${2:-`cat ~/.cache/bga`}
img=''$(realpath ''${1:-~/.cache/bg})
if [[ $alpha -lt 0 ]]; then
$alpha=0
fi
if [[ $alpha -gt 100 ]]; then
$alpha=100
fi
wal -i $img -a $alpha --cols16 -n
echo $alpha > ~/.cache/bga
rm ~/.cache/bg
ln -s $img ~/.cache/bg
sleep 0.4
pywalfox update &
themecord > ~/.cache/_.txt && rm ~/.cache/_.txt
[[ $(pidof cava) != "" ]] && pkill -USR1 cava &
for i in $(ls /run/user/1000 | grep nvim); do nvr -s --servername /run/user/1000/$i --remote-send '<cmd>colorscheme pywal<CR>'; done
pkill -USR1 kitty
'')
(pkgs.writeShellScriptBin "onSystemStart" ''
ags &
swww-daemon &
pypr &
setWallpaper &
lxqt-policykit-agent &
nmcli device wifi connect EagleNet password '~?C#@ZiH' &
hyprctl setcursor Bibata-Modern-Classic 16 &
'')
(pkgs.writeShellScriptBin "colorPrefix" ''
exec -a "$0" "$@" &
sleep 0.4 && changeColors &
'')
];
};
};
}