fix and cleanup

This commit is contained in:
alsaiduq-lab 2025-03-16 04:58:11 -06:00
parent b4cf61bc23
commit f52aee3469
18 changed files with 45 additions and 133 deletions

View file

@ -30,23 +30,8 @@
findutils findutils
htop htop
btop btop
nvtop nvtopPackages.full
arandr arandr
nitrogen 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;
};
} }

View file

@ -4,11 +4,4 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
cava cava
]; ];
xdg.configFile = {
"cava" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/cava";
recursive = true;
};
};
} }

View file

@ -4,10 +4,4 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
dunst dunst
]; ];
xdg.configFile = {
"dunst" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/dunst";
recursive = true;
};
};
} }

View file

@ -1,27 +1,6 @@
{ config, pkgs, lib, ... }: { 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; [ home.packages = with pkgs; [
starship starship
fzf fzf
@ -30,4 +9,8 @@
fd fd
ripgrep ripgrep
]; ];
programs.fish = {
enable = true;
};
} }

View file

@ -1,10 +1,7 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
xdg.configFile = { home.packages = with pkgs; [
"ghostty" = { ghostty
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/ghostty"; ];
recursive = true;
};
};
} }

View file

@ -8,11 +8,4 @@
i3blocks i3blocks
feh feh
]; ];
xdg.configFile = {
"i3" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/i3";
recursive = true;
};
};
} }

View file

@ -4,11 +4,4 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
lazygit lazygit
]; ];
xdg.configFile = {
"lazygit" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/lazygit";
recursive = true;
};
};
} }

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim neovim
@ -13,7 +12,8 @@
source = builtins.fetchGit { source = builtins.fetchGit {
url = "https://github.com/alsaiduq-lab/dotfiles.git"; url = "https://github.com/alsaiduq-lab/dotfiles.git";
ref = "dev"; ref = "dev";
} rev = "99e2cab828459373bc7524690668fdd209b3f517";
};
recursive = true; recursive = true;
}; };
} }

View file

@ -4,11 +4,4 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
picom picom
]; ];
xdg.configFile = {
"picom" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/picom";
recursive = true;
};
};
} }

View file

@ -4,11 +4,4 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
polybar polybar
]; ];
xdg.configFile = {
"polybar" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/polybar";
recursive = true;
};
};
} }

View file

@ -4,11 +4,4 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
rofi rofi
]; ];
xdg.configFile = {
"rofi" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/rofi";
recursive = true;
};
};
} }

View file

@ -4,5 +4,4 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
starship starship
]; ];
xdg.configFile."starship.toml".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/starship.toml";
} }

View file

@ -1,21 +1,16 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ home.packages = with pkgs; [ autossh ];
autossh
];
systemd.services.autossh-redbot = { systemd.user.services.autossh-redbot = {
description = "Persistent SSH Tunnel to server"; unitConfig = {
after = [ "network-online.target" ]; Description = "Persistent SSH Tunnel to server";
wants = [ "network-online.target" ]; WantedBy = "default.target";
wantedBy = [ "multi-user.target" ]; };
serviceConfig = { serviceConfig = {
User = "cobray";
Group = "cobray";
Restart = "always"; Restart = "always";
RestartSec = 30; RestartSec = "30";
EnvironmentFile = "/home/cobray/.secrets/autossh-redbot.conf"; EnvironmentFile = "/home/cobray/nix/.secrets/autossh-redbot.conf";
Environment = [ Environment = [
"AUTOSSH_GATETIME=0" "AUTOSSH_GATETIME=0"
"AUTOSSH_POLL=60" "AUTOSSH_POLL=60"
@ -23,13 +18,13 @@
"AUTOSSH_PORT=0" "AUTOSSH_PORT=0"
]; ];
ExecStart = '' ExecStart = ''
${pkgs.autossh}/bin/autossh -M 0 -N \ /nix/store/abc123-autossh-1.4g/bin/autossh -M 0 -N \
-o "ServerAliveInterval 60" \ -o "ServerAliveInterval 60" \
-o "ServerAliveCountMax 3" \ -o "ServerAliveCountMax 3" \
-o "ExitOnForwardFailure=yes" \ -o "ExitOnForwardFailure=yes" \
-o "ConnectTimeout=10" \ -o "ConnectTimeout=10" \
-R "0.0.0.0:$REMOTE_PORT:localhost:$LOCAL_PORT" \ -R "0.0.0.0:2222:localhost:22" \
root@$REMOTE_HOST root@your-real-host.com
''; '';
}; };
}; };

View file

@ -4,11 +4,4 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
zellij zellij
]; ];
xdg.configFile = {
"zellij" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.config/zellij";
recursive = true;
};
};
} }

View file

@ -4,8 +4,6 @@ let
customPkgs = import ../pkgs { inherit pkgs lib; }; customPkgs = import ../pkgs { inherit pkgs lib; };
in in
{ {
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Applications # Applications
brave brave
@ -62,8 +60,7 @@ in
onnxruntime onnxruntime
opencv4 opencv4
pillow pillow
customPkgs.python-rembg ] ++ [ customPkgs.python-rembg ]))
]))
uv uv
ruff ruff
black black
@ -76,6 +73,7 @@ in
fzf fzf
jq jq
bash bash
customPkgs.fish-rust
go go
sqls sqls
deno deno

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, inputs, ... }: { config, pkgs, lib, inputs, ... }:
{ {
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
@ -10,7 +9,6 @@
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs; inherit inputs;
}; };
# Import the home-manager config for cobray user
users.cobray = import ../home-manager/cobray.nix; users.cobray = import ../home-manager/cobray.nix;
}; };
} }

View file

@ -2,10 +2,8 @@
{ {
fish-rust = pkgs.callPackage ./fish-rust {}; fish-rust = pkgs.callPackage ./fish-rust {};
pythonPackages = { python-rembg = pkgs.callPackage ./python-rembg {
rembg = pkgs.callPackage ./python-packages/rembg.nix { inherit (pkgs) lib fetchPypi;
inherit (pkgs) lib stdenv fetchFromGitHub fetchPypi python310; python310Packages = pkgs.python310.pkgs;
inherit (pkgs.python310.pkgs) numpy pillow opencv4 requests onnxruntime;
};
}; };
} }

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, fetchPypi, python310, numpy, pillow, opencv4, requests, onnxruntime }: { lib, python310Packages, fetchPypi }:
python310.pkgs.buildPythonPackage rec { python310Packages.buildPythonPackage rec {
pname = "rembg"; pname = "rembg";
version = "2.0.50"; version = "2.0.50";
format = "setuptools"; format = "setuptools";
@ -10,21 +10,35 @@ python310.pkgs.buildPythonPackage rec {
sha256 = "0dgq291bj4w6jkcyz7lvp1vba2nczfnmxa2acl2sqib5p8cpzjvc"; sha256 = "0dgq291bj4w6jkcyz7lvp1vba2nczfnmxa2acl2sqib5p8cpzjvc";
}; };
propagatedBuildInputs = with python310.pkgs; [ nativeBuildInputs = with python310Packages; [
setuptools
poetry-core
];
propagatedBuildInputs = with python310Packages; [
numpy numpy
pillow pillow
onnxruntime onnxruntime
opencv4 opencv4
requests requests
aiohttp
asynctest
click
filetype
pooch
pympler
scikit-image
scipy
tqdm
]; ];
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "Tool to remove images background"; description = "Tool to remove image backgrounds";
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 = [Cobray]; maintainers = with maintainers; [ "Cobray" ];
}; };
} }