Merge pull request #2 from alsaiduq-lab/dev

Dev
This commit is contained in:
alsaiduq-lab 2025-03-30 04:17:52 -06:00 committed by GitHub
commit fa1b510413
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 334 additions and 329 deletions

24
flake.lock generated
View file

@ -25,11 +25,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742670145, "lastModified": 1743295846,
"narHash": "sha256-xQ2F9f+ICAGBp/nNv3ddD2U4ZvzuLOci0u/5lyMXPvk=", "narHash": "sha256-hKKz07d4RV9gzxzE5Qu3RQWX8a7XpzRrP5timoxoGRQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "63e77d09a133ac641a0c204e7cfb0c97e133706d", "rev": "717030011980e9eb31eb8ce011261dd532bce92c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -44,11 +44,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1742607855, "lastModified": 1743299372,
"narHash": "sha256-lUF/tpSON29qNIqhECX/Ue4qVmI3FOvMaW4iUnK49C4=", "narHash": "sha256-vFuxkHPd+Xpi5Bx1VCyZwYl/BbF83C+KmlbPBNVJvNU=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "9818734e2117dac703767585d48b805fad3e7a5e", "rev": "2ab0a37308559926bddb0009dfcf16a2a5b34e2b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -59,11 +59,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1741865919, "lastModified": 1743076231,
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", "narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a", "rev": "6c5963357f3c1c840201eda129a99d455074db04",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -90,11 +90,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1742512142, "lastModified": 1743231893,
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=", "narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682", "rev": "c570c1f5304493cafe133b8d843c7c1c4a10d3a6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
imports = [ imports = [

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,10 +1,18 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
lazygit lazygit
]; ];
programs.git = {
enable = true;
includes = [
{ path = "./.secrets/.git-config"; }
];
extraConfig = {
credential.helper = "store --file ./.secrets/.git-credentials";
};
};
} }

View file

@ -1,5 +1,8 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim neovim
gnugrep gnugrep

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,10 +1,6 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = pkgs.polybar.all;
polybar
];
} }

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -2,10 +2,6 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running 'nixos-help'). # and in the NixOS manual (accessible by running 'nixos-help').
{ {
config,
pkgs,
lib,
inputs,
... ...
}: { }: {
imports = [ imports = [

View file

@ -1,21 +1,17 @@
{ config, pkgs, lib, ... }: {
let pkgs,
customPkgs = import ../pkgs { inherit pkgs lib; }; lib,
...
}: let
customPkgs = import ../pkgs {inherit pkgs lib;};
in { in {
imports = [ imports = [
../modules/python.nix ../modules/python.nix
]; ];
python.enable = true; python.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(python311.withPackages (pyPkgs: with pyPkgs; [
requests
pip
virtualenv
ipython
]))
python3Packages.pip
black
ruff
brave # TODO: make a module to save browser stuff brave # TODO: make a module to save browser stuff
vesktop vesktop
git git
@ -42,6 +38,7 @@ in {
gawk gawk
obs-studio obs-studio
lazygit lazygit
lazydocker
jdk17 jdk17
bun bun
maven maven
@ -51,13 +48,13 @@ in {
htop htop
btop btop
nvtopPackages.full nvtopPackages.full
ripgrep
fd fd
fzf fzf
jq jq
bash bash
customPkgs.fish-rust customPkgs.fish-rust
go go
ollama
sqls sqls
deno deno
redis redis
@ -96,8 +93,42 @@ in {
wrk wrk
nodePackages.pnpm nodePackages.pnpm
zlib.dev zlib.dev
udiskie
rust-analyzer
clang-tools
vscode-langservers-extracted
nodePackages.eslint
gopls
lua-language-server
marksman
nil
ruff
taplo
yaml-language-server
alejandra
nodePackages.prettier
stylua
shfmt
nodePackages.sql-formatter
yamlfmt
luaPackages.luacheck
nodePackages.markdownlint-cli
nodePackages.stylelint
nodePackages.htmlhint
yamllint
nodePackages.jsonlint
hadolint
shellcheck
cppcheck
go-tools
rubocop
phpPackages.php-codesniffer
phpPackages.phpstan
checkstyle
tflint
sqlfluff
rustc
python3Packages.debugpy
customPkgs.python-ngx-lsp
]; ];
environment.shellAliases = {
python = "python3.11";
};
} }

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
security.rtkit.enable = true; security.rtkit.enable = true;
@ -12,13 +10,11 @@
pulse.enable = true; pulse.enable = true;
# If you want to use JACK applications, uncomment this # If you want to use JACK applications, uncomment this
#jack.enable = true; #jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cava cava
pulseaudio
ffmpeg
]; ];
} }

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
hardware.bluetooth = { hardware.bluetooth = {

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
# Bootloader # Bootloader

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
imports = [ imports = [

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
virtualisation.docker = { virtualisation.docker = {

View file

@ -1,5 +1,4 @@
{ {
config,
pkgs, pkgs,
lib, lib,
... ...

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: let }: let
clear-sans = pkgs.stdenv.mkDerivation { clear-sans = pkgs.stdenv.mkDerivation {

View file

@ -1,7 +1,4 @@
{ {
config,
pkgs,
lib,
inputs, inputs,
... ...
}: { }: {

View file

@ -1,10 +1,26 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: let }: let
customPkgs = import ../pkgs {inherit pkgs lib;}; wallpapers = [
"${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/backgrounds/nixos/nixos-wallpaper.png"
"${pkgs.nixos-artwork.wallpapers.gnome-dark}/share/backgrounds/gnome/gnome-dark.png"
"${pkgs.nixos-artwork.wallpapers.nineish-dark-gray}/share/backgrounds/nixos/nixos-wallpaper.png"
];
randomWallpaper = pkgs.writeShellScript "wallpaper.sh" ''
#!${pkgs.runtimeShell}
set -e
BG_DIR="/var/lib/lightdm-background"
BG_LINK="$BG_DIR/current-wallpaper.png"
mkdir -p "$BG_DIR"
WALLPAPERS=( ${builtins.concatStringsSep " " (map (w: "\"${w}\"") wallpapers)} )
COUNT=''${#WALLPAPERS[@]}
if [[ "$COUNT" -eq 0 ]]; then exit 1; fi
RAND=$(shuf -i 0-$(($COUNT - 1)) -n 1)
SELECT=''${WALLPAPERS[$RAND]}
ln -sf "$SELECT" "$BG_LINK"
'';
in { in {
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.xkb = { services.xserver.xkb = {
@ -26,16 +42,20 @@ in {
dunst dunst
polybar polybar
i3-auto-layout i3-auto-layout
xsettingsd
]; ];
extraSessionCommands = '' extraSessionCommands = ''
${pkgs.feh}/bin/feh --randomize --bg-fill ~/wallpapers/* 2>/dev/null || ${pkgs.feh}/bin/feh --bg-fill ${pkgs.nixos-artwork.wallpapers.nineish-dark-gray}/share/backgrounds/nixos/nineish-dark-gray.png &
export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas" export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas"
export XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:${pkgs.tokyonight-gtk-theme}/share:${customPkgs.vivid-icons}/share:$XDG_DATA_DIRS" ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface gtk-theme "Tokyonight-Dark"
${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface icon-theme "candy-icons"
${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface gtk-theme "Tokyonight-Dark" || echo "Failed to set GTK theme" > /tmp/theme-debug.log ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface cursor-theme "capitaine-cursors"
${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface icon-theme "Vivid-Icons-Dark" || ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface icon-theme "Papirus-Dark" || echo "Failed to set icon theme" > /tmp/theme-debug.log cat > $HOME/.config/xsettingsd << EOF
${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface cursor-theme "capitaine-cursors" || echo "Failed to set cursor theme" > /tmp/theme-debug.log Net/ThemeName "Tokyonight-Dark"
Net/IconThemeName "candy-icons"
Gtk/CursorThemeName "capitaine-cursors"
EOF
killall xsettingsd || true
${pkgs.xsettingsd}/bin/xsettingsd &
''; '';
}; };
@ -47,7 +67,7 @@ in {
services.xserver.displayManager.lightdm = { services.xserver.displayManager.lightdm = {
enable = true; enable = true;
background = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/backgrounds/nixos/nixos-wallpaper.png"; background = "/var/lib/lightdm-background/current-wallpaper.png";
greeters.gtk = { greeters.gtk = {
enable = true; enable = true;
theme = { theme = {
@ -55,8 +75,8 @@ in {
name = "Tokyonight-Dark"; name = "Tokyonight-Dark";
}; };
iconTheme = { iconTheme = {
package = customPkgs.vivid-icons; package = pkgs.candy-icons;
name = "Vivid-Icons-Dark"; name = "candy-icons";
}; };
cursorTheme = { cursorTheme = {
package = pkgs.capitaine-cursors; package = pkgs.capitaine-cursors;
@ -64,12 +84,36 @@ in {
}; };
extraConfig = '' extraConfig = ''
[greeter] [greeter]
greeting = Welcome back, Traveller
font-name=Clear Sans 10 font-name=Clear Sans 10
cursor-theme-name=capitaine-cursors cursor-theme-name=capitaine-cursors
icon-theme-name=candy-icons
''; '';
}; };
}; };
systemd.tmpfiles.rules = [
"d /var/lib/lightdm-background 0755 lightdm lightdm - -"
"L+ /var/lib/lightdm-background/current-wallpaper.png - - - - ${builtins.elemAt wallpapers 0}"
];
systemd.services.random-wallpaper = {
description = "Update wallpaper to a random image";
serviceConfig = {
Type = "oneshot";
ExecStart = "${randomWallpaper}";
User = "root";
};
};
systemd.timers.random-wallpaper = {
description = "Daily wallpaper refresh for LightDM";
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
};
services.displayManager.defaultSession = "xfce+i3"; services.displayManager.defaultSession = "xfce+i3";
services.displayManager.autoLogin = { services.displayManager.autoLogin = {
enable = true; enable = true;
@ -78,13 +122,13 @@ in {
qt = { qt = {
enable = true; enable = true;
platformTheme = "gtk2"; platformTheme = "qt5ct";
}; };
environment.etc = { environment.etc = {
"gtk-2.0/gtkrc".text = '' "gtk-2.0/gtkrc".text = ''
gtk-theme-name="Tokyonight-Dark" gtk-theme-name="Tokyonight-Dark"
gtk-icon-theme-name="Vivid-Icons-Dark" gtk-icon-theme-name="candy-icons"
gtk-font-name="Clear Sans 10" gtk-font-name="Clear Sans 10"
gtk-cursor-theme-name="capitaine-cursors" gtk-cursor-theme-name="capitaine-cursors"
gtk-cursor-theme-size=24 gtk-cursor-theme-size=24
@ -93,66 +137,64 @@ in {
[Settings] [Settings]
gtk-application-prefer-dark-theme=1 gtk-application-prefer-dark-theme=1
gtk-theme-name=Tokyonight-Dark gtk-theme-name=Tokyonight-Dark
gtk-icon-theme-name=Vivid-Icons-Dark gtk-icon-theme-name="candy-icons"
gtk-font-name=Clear Sans 10 gtk-font-name="Clear Sans 10"
gtk-cursor-theme-name=capitaine-cursors gtk-cursor-theme-name="capitaine-cursors"
gtk-cursor-theme-size=24 gtk-cursor-theme-size=24
''; '';
"gtk-4.0/settings.ini".text = '' "gtk-4.0/settings.ini".text = ''
[Settings] [Settings]
gtk-application-prefer-dark-theme=1 gtk-application-prefer-dark-theme=1
gtk-theme-name=Tokyonight-Dark gtk-theme-name=Tokyonight-Dark
gtk-icon-theme-name=Vivid-Icons-Dark gtk-icon-theme-name="candy-icons"
gtk-font-name=Clear Sans 10 gtk-font-name="Clear Sans 10"
gtk-cursor-theme-name=capitaine-cursors gtk-cursor-theme-name="capitaine-cursors"
gtk-cursor-theme-size=24 gtk-cursor-theme-size=24
''; '';
}; };
environment.variables = {
GTK_THEME = "Tokyonight-Dark";
ICON_THEME = "Vivid-Icons-Dark";
XCURSOR_THEME = "capitaine-cursors";
XCURSOR_SIZE = "24";
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
arandr arandr
nitrogen
xclip xclip
lxappearance lxappearance
gnome-themes-extra
gsettings-desktop-schemas gsettings-desktop-schemas
adwaita-qt adwaita-qt
arc-theme
arc-icon-theme
papirus-icon-theme
numix-icon-theme-circle
candy-icons candy-icons
capitaine-cursors capitaine-cursors
tokyonight-gtk-theme tokyonight-gtk-theme
nix-prefetch-git xsettingsd
] ++ (with customPkgs; [ hicolor-icon-theme
vivid-icons adwaita-icon-theme
]); breeze-icons
gnome-themes-extra
];
services.xserver.desktopManager.session = [{ environment.pathsToLink = [
"/share/icons"
"/share/pixmaps"
];
services.xserver.desktopManager.session = [
{
name = "xfce+i3"; name = "xfce+i3";
start = '' start = ''
export XDG_DATA_DIRS="${pkgs.tokyonight-gtk-theme}/share:${customPkgs.vivid-icons}/share:$XDG_DATA_DIRS" export XDG_DATA_DIRS="${pkgs.tokyonight-gtk-theme}/share:${pkgs.candy-icons}/share:${pkgs.hicolor-icon-theme}/share:${pkgs.adwaita-icon-theme}/share:$XDG_DATA_DIRS"
${pkgs.xfce.xfce4-session}/bin/xfce4-session --with-ck-launch & ${pkgs.xfce.xfce4-session}/bin/xfce4-session --with-ck-launch &
${pkgs.i3-gaps}/bin/i3 ${pkgs.i3-gaps}/bin/i3
''; '';
}]; }
];
programs.dconf.enable = true; programs.dconf.enable = true;
programs.dconf.profiles.user.databases = [{ programs.dconf.profiles.user.databases = [
{
settings = { settings = {
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
icon-theme = "Vivid-Icons-Dark"; icon-theme = "candy-icons";
gtk-theme = "Tokyonight-Dark"; gtk-theme = "Tokyonight-Dark";
cursor-theme = "capitaine-cursors"; cursor-theme = "capitaine-cursors";
}; };
}; };
}]; }
];
} }

View file

@ -1,11 +1,10 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: { }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
networkmanager_dmenu networkmanager_dmenu
networkmanagerapplet
]; ];
networking.firewall.allowedTCPPorts = [ 57621 ]; networking.firewall.allowedTCPPorts = [ 57621 ];

View file

@ -1,7 +1,4 @@
{ {
config,
pkgs,
lib,
... ...
}: { }: {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

View file

@ -1,7 +1,6 @@
{ {
config, config,
pkgs, pkgs,
lib,
... ...
}: { }: {
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];

View file

@ -1,24 +1,28 @@
{ config, pkgs, lib, ... }: {
config,
let pkgs,
customPkgs = pkgs.callPackage ../pkgs { inherit pkgs lib; }; lib,
in { ...
options.python = { }: let
enable = lib.mkEnableOption "System Python Environment"; customPkgs = pkgs.callPackage ../pkgs {inherit pkgs lib;};
}; py = pkgs.python311Packages;
config = lib.mkIf config.python.enable { pipConf = pkgs.writeText "pip.conf" ''
environment.systemPackages = with pkgs; [ [global]
(python311.withPackages (pyPkgs: with pyPkgs; [ no-cache-dir = false
[install]
ignore-installed = false
[packages]
numpy = "<2.0.0"
'';
pythonEnv = pkgs.python311.buildEnv.override {
extraLibs = with py; [
customPkgs.python-rembg
numpy numpy
python-pymatting
python-opencv-headless
python-rembg
i3ipc i3ipc
pandas pandas
matplotlib matplotlib
scipy scipy
requests requests
pip
virtualenv virtualenv
ipython ipython
six six
@ -26,24 +30,35 @@ in {
pynvml pynvml
pyqtgraph pyqtgraph
pyqt6 pyqt6
click
typer
rich
pyyaml pyyaml
pytz
pillow pillow
])) jedi
python3Packages.pip libcst
black pip
ruff ];
};
in {
options.python = {
enable = lib.mkEnableOption "System Python Environment";
};
config = lib.mkIf config.python.enable {
environment.systemPackages = with pkgs; [
pythonEnv
isort
uv uv
stdenv.cc.cc.lib
python311
]; ];
environment.variables = { environment.variables = {
PIP_PREFIX = "$HOME/.local"; PIP_PREFIX = "$HOME/.local";
PIP_CONFIG_FILE = "${pipConf}";
PYTHONPATH = "$HOME/.local/lib/python3.11/site-packages"; PYTHONPATH = "$HOME/.local/lib/python3.11/site-packages";
}; };
environment.shellAliases = { system.userActivationScripts.removeNumpy2 = ''
python = "python3.11"; if [ -d "$HOME/.local/lib/python3.11/site-packages/numpy" ]; then
}; echo "Removing NumPy from user packages to prevent conflicts..."
rm -rf "$HOME/.local/lib/python3.11/site-packages/numpy"*
fi
'';
}; };
} }

View file

@ -1,9 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
inputs,
system,
... ...
}: { }: {
programs.steam = { programs.steam = {

View file

@ -1,7 +1,4 @@
{ {
config,
pkgs,
lib,
... ...
}: { }: {
time.timeZone = "America/Edmonton"; time.timeZone = "America/Edmonton";

View file

@ -1,7 +1,5 @@
{ {
config,
pkgs, pkgs,
lib,
... ...
}: let }: let
fish-rust = pkgs.callPackage ../pkgs/fish-rust {}; fish-rust = pkgs.callPackage ../pkgs/fish-rust {};

View file

@ -1,29 +1,35 @@
{ {
pkgs ? import <nixpkgs> {}, pkgs ? import <nixpkgs> {},
lib ? pkgs.lib, lib ? pkgs.lib,
}: { }: let
numpy-1 = pkgs.python311Packages.numpy.overridePythonAttrs (oldAttrs: rec {
version = "1.26.4";
src = pkgs.fetchPypi {
pname = "numpy";
inherit version;
sha256 = "0410j6jfz1yzm5s0v0yrc1j0q6ih4322357and7arr0jxnlsn0ia";
};
});
customPython = pkgs.python311.override {
packageOverrides = self: super: {
numpy = numpy-1;
};
};
customPythonPackages = customPython.pkgs;
in {
inherit numpy-1 customPythonPackages;
fish-rust = pkgs.callPackage ./fish-rust {}; fish-rust = pkgs.callPackage ./fish-rust {};
python-pymatting = pkgs.callPackage ./python-pymatting {
inherit lib;
fetchPypi = pkgs.fetchPypi;
python311Packages = pkgs.python311Packages;
};
python-opencv-headless = pkgs.callPackage ./python-opencv-headless {
inherit lib;
fetchPypi = pkgs.fetchPypi;
cmake = pkgs.cmake;
pkg-config = pkgs.pkg-config;
stdenv = pkgs.stdenv;
makeWrapper = pkgs.makeWrapper;
python311Packages = pkgs.python311Packages;
};
python-rembg = pkgs.callPackage ./python-rembg { python-rembg = pkgs.callPackage ./python-rembg {
inherit lib; inherit lib;
fetchPypi = pkgs.fetchPypi; fetchPypi = pkgs.fetchPypi;
python311Packages = customPythonPackages;
python-pymatting = pkgs.callPackage ./python-pymatting { python-pymatting = pkgs.callPackage ./python-pymatting {
inherit lib; inherit lib;
fetchPypi = pkgs.fetchPypi; fetchPypi = pkgs.fetchPypi;
python311Packages = pkgs.python311Packages; python311Packages = customPythonPackages;
}; };
python-opencv-headless = pkgs.callPackage ./python-opencv-headless { python-opencv-headless = pkgs.callPackage ./python-opencv-headless {
inherit lib; inherit lib;
@ -32,13 +38,13 @@
pkg-config = pkgs.pkg-config; pkg-config = pkgs.pkg-config;
stdenv = pkgs.stdenv; stdenv = pkgs.stdenv;
makeWrapper = pkgs.makeWrapper; makeWrapper = pkgs.makeWrapper;
python311Packages = pkgs.python311Packages; python311Packages = customPythonPackages;
}; };
python311Packages = pkgs.python311Packages;
}; };
vivid-icons = pkgs.callPackage ./vivid-icons {
python-ngx-lsp = pkgs.callPackage ./python-nginx-language-server {
inherit lib; inherit lib;
stdenv = pkgs.stdenv;
fetchFromGitHub = pkgs.fetchFromGitHub; fetchFromGitHub = pkgs.fetchFromGitHub;
python311Packages = customPythonPackages;
}; };
} }

View file

@ -0,0 +1,50 @@
{
lib,
python311Packages,
fetchFromGitHub,
pkgs,
}: let
cusPydantic = python311Packages.buildPythonPackage {
pname = "pydantic";
version = "1.10.18";
format = "wheel";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/py3/p/pydantic/pydantic-1.10.18-py3-none-any.whl";
sha256 = "10iaggdy69wk6qkagqcnlsqchrsidvqhgh68r5p78lpw3yw8k886";
};
doCheck = false;
propagatedBuildInputs = with python311Packages; [
typing-extensions
];
};
in
python311Packages.buildPythonPackage rec {
pname = "nginx-language-server";
version = "0.8.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "pappasam";
repo = "nginx-language-server";
rev = "v${version}";
sha256 = "AXWrNt4f3jkAbidE1goDgFicu4sSBv08f/Igyh2bRII=";
};
nativeBuildInputs = with python311Packages; [
setuptools
poetry-core
];
propagatedBuildInputs = with python311Packages; [
pygls
cusPydantic
crossplane
lsprotocol
];
pythonImportsCheck = ["nginx_language_server"];
doCheck = false;
meta = with lib; {
description = "A language server for nginx";
homepage = "https://github.com/pappasam/nginx-language-server";
license = licenses.gpl3Only;
platforms = platforms.all;
maintainers = with maintainers; ["Cobray"];
};
}

View file

@ -1,12 +1,12 @@
{ lib {
, python311Packages lib,
, fetchPypi python311Packages,
, stdenv fetchPypi,
, makeWrapper stdenv,
, cmake makeWrapper,
, pkg-config cmake,
pkg-config,
}: }:
python311Packages.buildPythonPackage rec { python311Packages.buildPythonPackage rec {
pname = "opencv-python-headless"; pname = "opencv-python-headless";
version = "4.11.0.86"; version = "4.11.0.86";
@ -31,15 +31,15 @@ python311Packages.buildPythonPackage rec {
]; ];
propagatedBuildInputs = with python311Packages; [ propagatedBuildInputs = with python311Packages; [
numpy
setuptools setuptools
numpy
]; ];
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
doCheck = false; doCheck = false;
pythonImportsCheck = [ "cv2" ]; pythonImportsCheck = ["cv2"];
postFixup = '' postFixup = ''
wrapPythonProgramsIn "$out/lib/python3.11/site-packages" "${stdenv.cc.cc.lib}" wrapPythonProgramsIn "$out/lib/python3.11/site-packages" "${stdenv.cc.cc.lib}"
@ -50,6 +50,6 @@ python311Packages.buildPythonPackage rec {
homepage = "https://github.com/opencv/opencv-python"; homepage = "https://github.com/opencv/opencv-python";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ "Cobray" ]; maintainers = with maintainers; ["Cobray"];
}; };
} }

View file

@ -19,7 +19,6 @@ python311Packages.buildPythonPackage rec {
]; ];
propagatedBuildInputs = with python311Packages; [ propagatedBuildInputs = with python311Packages; [
numpy
scipy scipy
pillow pillow
numba numba
@ -35,6 +34,6 @@ python311Packages.buildPythonPackage rec {
homepage = "https://github.com/pymatting/pymatting"; homepage = "https://github.com/pymatting/pymatting";
license = licenses.mit; license = licenses.mit;
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ "Cobray" ]; maintainers = with maintainers; ["Cobray"];
}; };
} }

View file

@ -1,8 +1,9 @@
{ lib {
, python311Packages lib,
, fetchPypi python311Packages,
, python-pymatting fetchPypi,
, python-opencv-headless python-pymatting,
python-opencv-headless,
}: }:
python311Packages.buildPythonPackage rec { python311Packages.buildPythonPackage rec {
pname = "rembg"; pname = "rembg";
@ -16,8 +17,8 @@ python311Packages.buildPythonPackage rec {
poetry-core poetry-core
setuptools setuptools
]; ];
propagatedBuildInputs = with python311Packages; [ propagatedBuildInputs = with python311Packages;
numpy [
onnxruntime onnxruntime
pillow pillow
pooch pooch
@ -26,11 +27,12 @@ python311Packages.buildPythonPackage rec {
tqdm tqdm
aiohttp aiohttp
pytorch-bin pytorch-bin
] ++ [ ]
++ [
python-opencv-headless python-opencv-headless
python-pymatting python-pymatting
]; ];
pythonRemoveDeps = [ "opencv-python-headless" ]; pythonRemoveDeps = ["opencv-python-headless"];
dontPrecompilePages = true; dontPrecompilePages = true;
doInstallCheck = false; doInstallCheck = false;
doCheck = false; doCheck = false;
@ -39,6 +41,6 @@ python311Packages.buildPythonPackage rec {
homepage = "https://github.com/danielgatis/rembg"; homepage = "https://github.com/danielgatis/rembg";
license = licenses.mit; license = licenses.mit;
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ "Cobray" ]; maintainers = with maintainers; ["Cobray"];
}; };
} }

View file

@ -1,41 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
gtk-engine-murrine,
gnome-themes-extra,
bash,
sassc,
}:
stdenv.mkDerivation {
pname = "tokyo-night-gtk";
version = "main";
src = fetchFromGitHub {
owner = "Fausto-Korpsvart";
repo = "Tokyonight-GTK-Theme";
rev = "4dc45d60bf35f50ebd9ee41f16ab63783f80dd64";
sha256 = "0c7sp9n2pc70yy9msmbmcyhqbr63v1ssnsxk6vg10zwwc3wl19h0";
};
nativeBuildInputs = [bash sassc];
buildInputs = [gtk-engine-murrine gnome-themes-extra];
propagatedUserEnvPkgs = [gtk-engine-murrine];
buildPhase = ''
bash ./install.sh --dest $out/share/themes -n Tokyonight
bash ./install.sh --dest $out/share/themes -n Tokyonight --tweaks storm
bash ./install.sh --dest $out/share/themes -n Tokyonight --tweaks storm black
bash ./install.sh --dest $out/share/themes -n Tokyonight --tweaks storm black outline
'';
installPhase = "";
meta = with lib; {
description = "Tokyo Night GTK Theme";
homepage = "https://github.com/Fausto-Korpsvart/Tokyonight-GTK-Theme";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = ["Cobray"];
};
}

View file

@ -1,54 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
hicolor-icon-theme,
}:
stdenv.mkDerivation rec {
pname = "vivid-icons";
version = "unstable-${builtins.substring 0 7 "fe8b8f1bdd3784dc838c125bb9e1b2d713f40e67"}";
src = fetchFromGitHub {
owner = "L4ki";
repo = "Vivid-Plasma-Themes";
rev = "fe8b8f1bdd3784dc838c125bb9e1b2d713f40e67";
sha256 = "UlZkxeWb2n5TexaQymeyEqAjKwDfonTXO2OYjICHl+U=";
};
buildInputs = [hicolor-icon-theme];
installPhase = ''
mkdir -p $out/share/icons
for dir in Vivid-Icons-*; do
if [ -d "$dir" ]; then
theme_name=$(basename "$dir")
dest_dir="$out/share/icons/$theme_name"
cp -r "$dir" "$dest_dir"
echo "[Icon Theme]" > "$dest_dir/index.theme"
echo "Name=$theme_name" >> "$dest_dir/index.theme"
echo "Comment=$theme_name icons" >> "$dest_dir/index.theme"
echo "Inherits=hicolor" >> "$dest_dir/index.theme"
directories=""
for size_dir in "$dest_dir"/*; do
if [ -d "$size_dir" ]; then
size=$(basename "$size_dir")
if [[ "$size" =~ ^[0-9]+x[0-9]+$ ]]; then
directories="$directories''${directories:+,}$size"
echo "[$size]" >> "$dest_dir/index.theme"
echo "Size=''${size%%x*}" >> "$dest_dir/index.theme"
echo "Context=Actions" >> "$dest_dir/index.theme"
echo "Type=Fixed" >> "$dest_dir/index.theme"
fi
fi
done
echo "Directories=$directories" >> "$dest_dir/index.theme"
fi
done
echo "Installed themes:"
ls -la $out/share/icons/
'';
meta = with lib; {
description = "Vivid Icons Theme";
homepage = "https://github.com/L4ki/Vivid-Plasma-Themes";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; ["Cobray"];
};
}