refactor
This commit is contained in:
parent
de4de77a87
commit
b4cf61bc23
25 changed files with 287 additions and 100 deletions
18
flake.lock
generated
18
flake.lock
generated
|
|
@ -111,11 +111,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741916615,
|
"lastModified": 1742089599,
|
||||||
"narHash": "sha256-SU6Q/IBGJ9a7u6WrVjZ+ShoIjK3To/lD3U37DgfX1Tw=",
|
"narHash": "sha256-1yBAFE5yEGEjSWZ8BuPt9Yknq+cFwzW6Q86gs5rMkGI=",
|
||||||
"owner": "fufexan",
|
"owner": "fufexan",
|
||||||
"repo": "nix-gaming",
|
"repo": "nix-gaming",
|
||||||
"rev": "b2a32ef80ad0cc7f3dee928771791625ff9494c1",
|
"rev": "bbf6f68ec16cead3c29d5ba33d5c52956dfaefdf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -126,11 +126,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741310760,
|
"lastModified": 1741865919,
|
||||||
"narHash": "sha256-aizILFrPgq/W53Jw8i0a1h1GZAAKtlYOrG/A5r46gVM=",
|
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "de0fe301211c267807afd11b12613f5511ff7433",
|
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -180,11 +180,11 @@
|
||||||
"nuschtosSearch": "nuschtosSearch"
|
"nuschtosSearch": "nuschtosSearch"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741709061,
|
"lastModified": 1741814789,
|
||||||
"narHash": "sha256-G1YTksB0CnVhpU1gEmvO3ugPS5CAmUpm5UtTIUIPnEI=",
|
"narHash": "sha256-NbHsnnNwiYUcUaS4z8XK2tYpo3G8NXEKxaKkzMgMiLk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "3a3abf11700f76738d8ad9d15054ceaf182d2974",
|
"rev": "33097dcf776d1fad0ff3842096c4e3546312f251",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config = {
|
config.allowUnfree = true;
|
||||||
allowUnfree = true;
|
|
||||||
steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in {
|
in {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,52 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./modules/cava.nix
|
||||||
|
./modules/dunst.nix
|
||||||
|
./modules/fish.nix
|
||||||
|
./modules/ghostty.nix
|
||||||
|
./modules/i3.nix
|
||||||
|
./modules/lazygit.nix
|
||||||
|
./modules/nvim.nix
|
||||||
|
./modules/picom.nix
|
||||||
|
./modules/polybar.nix
|
||||||
|
./modules/rofi.nix
|
||||||
|
./modules/starship.nix
|
||||||
|
./modules/systemd.nix
|
||||||
|
./modules/zellij.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.username = "cobray";
|
home.username = "cobray";
|
||||||
home.homeDirectory = "/home/cobray";
|
home.homeDirectory = "/home/cobray";
|
||||||
home.enableNixpkgsReleaseCheck = false;
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
];
|
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
home.enableNixpkgsReleaseCheck = false;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
coreutils
|
||||||
|
gnused
|
||||||
|
gnugrep
|
||||||
|
findutils
|
||||||
|
htop
|
||||||
|
btop
|
||||||
|
nvtop
|
||||||
|
arandr
|
||||||
|
nitrogen
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"user-dirs.dirs".source = lib.mkIf (builtins.pathExists "${config.home.homeDirectory}/.config/user-dirs.dirs")
|
||||||
|
(config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/user-dirs.dirs");
|
||||||
|
"user-dirs.locale".source = lib.mkIf (builtins.pathExists "${config.home.homeDirectory}/.config/user-dirs.locale")
|
||||||
|
(config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/user-dirs.locale");
|
||||||
|
"mimeapps.list".source = lib.mkIf (builtins.pathExists "${config.home.homeDirectory}/.config/mimeapps.list")
|
||||||
|
(config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/mimeapps.list");
|
||||||
|
"systemd".source = lib.mkIf (builtins.pathExists "${config.home.homeDirectory}/.config/systemd")
|
||||||
|
(config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/systemd");
|
||||||
|
"systemd".recursive = true;
|
||||||
|
"environment.d".source = lib.mkIf (builtins.pathExists "${config.home.homeDirectory}/.config/environment.d")
|
||||||
|
(config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/environment.d");
|
||||||
|
"environment.d".recursive = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14
home-manager/modules/cava.nix
Normal file
14
home-manager/modules/cava.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
cava
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"cava" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/cava";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
home-manager/modules/dunst.nix
Normal file
13
home-manager/modules/dunst.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
dunst
|
||||||
|
];
|
||||||
|
xdg.configFile = {
|
||||||
|
"dunst" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/dunst";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
33
home-manager/modules/fish.nix
Normal file
33
home-manager/modules/fish.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
xdg.configFile = {
|
||||||
|
"fish/config.fish".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/fish/config.fish";
|
||||||
|
"fish/fish_plugins".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/fish/fish_plugins";
|
||||||
|
"fish/fish_variables".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/fish/fish_variables";
|
||||||
|
"fish/themes" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/fish/themes";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"fish/functions" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/fish/functions";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"fish/completions" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/fish/completions";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
"fish/conf.d" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/fish/conf.d";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
starship
|
||||||
|
fzf
|
||||||
|
bat
|
||||||
|
eza
|
||||||
|
fd
|
||||||
|
ripgrep
|
||||||
|
];
|
||||||
|
}
|
||||||
10
home-manager/modules/ghostty.nix
Normal file
10
home-manager/modules/ghostty.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
xdg.configFile = {
|
||||||
|
"ghostty" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/ghostty";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
home-manager/modules/i3.nix
Normal file
18
home-manager/modules/i3.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
dmenu
|
||||||
|
i3status
|
||||||
|
i3lock
|
||||||
|
i3blocks
|
||||||
|
feh
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"i3" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/i3";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
home-manager/modules/lazygit.nix
Normal file
14
home-manager/modules/lazygit.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
lazygit
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"lazygit" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/lazygit";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
home-manager/modules/nvim.nix
Normal file
19
home-manager/modules/nvim.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
ripgrep
|
||||||
|
fd
|
||||||
|
nodejs
|
||||||
|
gcc
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile."nvim" = {
|
||||||
|
source = builtins.fetchGit {
|
||||||
|
url = "https://github.com/alsaiduq-lab/dotfiles.git";
|
||||||
|
ref = "dev";
|
||||||
|
}
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
14
home-manager/modules/picom.nix
Normal file
14
home-manager/modules/picom.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
picom
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"picom" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/picom";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
home-manager/modules/polybar.nix
Normal file
14
home-manager/modules/polybar.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
polybar
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"polybar" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/polybar";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
home-manager/modules/rofi.nix
Normal file
14
home-manager/modules/rofi.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
rofi
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"rofi" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/rofi";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
home-manager/modules/starship.nix
Normal file
8
home-manager/modules/starship.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
starship
|
||||||
|
];
|
||||||
|
xdg.configFile."starship.toml".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/starship.toml";
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.autossh-redbot = {
|
systemd.services.autossh-redbot = {
|
||||||
description = "Persistent SSH Tunnel to Cloud Server";
|
description = "Persistent SSH Tunnel to server";
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
14
home-manager/modules/zellij.nix
Normal file
14
home-manager/modules/zellij.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
zellij
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"zellij" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/zellij";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
../modules/default.nix
|
../modules/default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "nixos";
|
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,7 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
python-rembg = pkgs.python310.pkgs.buildPythonPackage rec {
|
customPkgs = import ../pkgs { inherit pkgs lib; };
|
||||||
pname = "rembg";
|
|
||||||
version = "2.0.50";
|
|
||||||
src = pkgs.python310.pkgs.fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "0dgq291bj4w6jkcyz7lvp1vba2nczfnmxa2acl2sqib5p8cpzjvc";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = with pkgs.python310.pkgs; [
|
|
||||||
numpy
|
|
||||||
pillow
|
|
||||||
onnxruntime
|
|
||||||
opencv4
|
|
||||||
requests
|
|
||||||
];
|
|
||||||
doCheck = false;
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Tool to remove images background";
|
|
||||||
homepage = "https://github.com/danielgatis/rembg";
|
|
||||||
license = licenses.mit;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
|
|
@ -73,51 +54,15 @@ in
|
||||||
matplotlib
|
matplotlib
|
||||||
scipy
|
scipy
|
||||||
requests
|
requests
|
||||||
psutil
|
|
||||||
click
|
click
|
||||||
typer
|
typer
|
||||||
rich
|
rich
|
||||||
pyyaml
|
pyyaml
|
||||||
jq
|
|
||||||
pytz
|
pytz
|
||||||
onnxruntime
|
onnxruntime
|
||||||
opencv4
|
opencv4
|
||||||
pillow
|
pillow
|
||||||
python-rembg # custom rembg package
|
customPkgs.python-rembg
|
||||||
]))
|
|
||||||
# ML-oriented
|
|
||||||
(python311.withPackages (ps: with ps; [
|
|
||||||
virtualenv
|
|
||||||
ipython
|
|
||||||
jupyter
|
|
||||||
jupyterlab
|
|
||||||
numpy
|
|
||||||
pandas
|
|
||||||
matplotlib
|
|
||||||
scipy
|
|
||||||
scikit-learn
|
|
||||||
seaborn
|
|
||||||
plotly
|
|
||||||
pytorch-bin
|
|
||||||
torchvision-bin
|
|
||||||
torchaudio-bin
|
|
||||||
tensorboard
|
|
||||||
transformers
|
|
||||||
huggingface-hub
|
|
||||||
datasets
|
|
||||||
nltk
|
|
||||||
spacy
|
|
||||||
pillow
|
|
||||||
opencv4
|
|
||||||
xgboost
|
|
||||||
lightgbm
|
|
||||||
optuna
|
|
||||||
joblib
|
|
||||||
requests
|
|
||||||
streamlit
|
|
||||||
gradio
|
|
||||||
polars
|
|
||||||
duckdb
|
|
||||||
]))
|
]))
|
||||||
uv
|
uv
|
||||||
ruff
|
ruff
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
./steam.nix
|
./steam.nix
|
||||||
./timezone.nix
|
./timezone.nix
|
||||||
./user.nix
|
./user.nix
|
||||||
./systemd.nix
|
|
||||||
./man.nix
|
./man.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
VISUAL = "nvim";
|
VISUAL = "nvim";
|
||||||
TERM = "xterm-256color";
|
TERM = "ghostty";
|
||||||
GTK_THEME = "Adwaita:dark";
|
GTK_THEME = "Adwaita:dark";
|
||||||
CC = "${pkgs.gcc}/bin/gcc";
|
CC = "${pkgs.gcc}/bin/gcc";
|
||||||
PKG_CONFIG_PATH = lib.makeSearchPath "lib/pkgconfig" [
|
PKG_CONFIG_PATH = lib.makeSearchPath "lib/pkgconfig" [
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,4 @@ in
|
||||||
fd
|
fd
|
||||||
ripgrep
|
ripgrep
|
||||||
];
|
];
|
||||||
users.users.cobray.shell = lib.mkForce fish-rust;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
networking.wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
networking.wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
||||||
|
networking.hostName = "nixos";
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
|
||||||
|
|
@ -2,21 +2,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Fix Python package issues
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
python310Packages = prev.python310Packages.override {
|
|
||||||
overrides = pyFinal: pyPrev: {
|
|
||||||
terminado = pyPrev.terminado.overrideAttrs (old: {
|
|
||||||
doCheck = false;
|
|
||||||
doInstallCheck = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.nix-index.enable = true;
|
programs.nix-index.enable = true;
|
||||||
programs.command-not-found.enable = false;
|
programs.command-not-found.enable = false;
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
|
|
|
||||||
11
pkgs/default.nix
Normal file
11
pkgs/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs ? import <nixpkgs> {}, lib ? pkgs.lib }:
|
||||||
|
|
||||||
|
{
|
||||||
|
fish-rust = pkgs.callPackage ./fish-rust {};
|
||||||
|
pythonPackages = {
|
||||||
|
rembg = pkgs.callPackage ./python-packages/rembg.nix {
|
||||||
|
inherit (pkgs) lib stdenv fetchFromGitHub fetchPypi python310;
|
||||||
|
inherit (pkgs.python310.pkgs) numpy pillow opencv4 requests onnxruntime;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
30
pkgs/python-rembg/default.nix
Normal file
30
pkgs/python-rembg/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ lib, stdenv, fetchFromGitHub, fetchPypi, python310, numpy, pillow, opencv4, requests, onnxruntime }:
|
||||||
|
|
||||||
|
python310.pkgs.buildPythonPackage rec {
|
||||||
|
pname = "rembg";
|
||||||
|
version = "2.0.50";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "0dgq291bj4w6jkcyz7lvp1vba2nczfnmxa2acl2sqib5p8cpzjvc";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python310.pkgs; [
|
||||||
|
numpy
|
||||||
|
pillow
|
||||||
|
onnxruntime
|
||||||
|
opencv4
|
||||||
|
requests
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Tool to remove images background";
|
||||||
|
homepage = "https://github.com/danielgatis/rembg";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.all;
|
||||||
|
maintainers = [Cobray];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue