Merge pull request #1 from alsaiduq-lab/dev

Dev
This commit is contained in:
alsaiduq-lab 2025-03-23 12:06:05 -06:00 committed by GitHub
commit 14aca7026b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 2024 additions and 447 deletions

2
.gitignore vendored
View file

@ -4,6 +4,8 @@ backup/
result result
.env
*.nix.bak *.nix.bak
*.nix~ *.nix~
/nix/store/ /nix/store/

148
flake.lock generated
View file

@ -18,45 +18,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -64,11 +25,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741955947, "lastModified": 1742670145,
"narHash": "sha256-2lbURKclgKqBNm7hVRtWh0A7NrdsibD0EaWhahUVhhY=", "narHash": "sha256-xQ2F9f+ICAGBp/nNv3ddD2U4ZvzuLOci0u/5lyMXPvk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "4e12151c9e014e2449e0beca2c0e9534b96a26b4", "rev": "63e77d09a133ac641a0c204e7cfb0c97e133706d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -77,45 +38,17 @@
"type": "github" "type": "github"
} }
}, },
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729958008,
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.6",
"repo": "ixx",
"type": "github"
}
},
"nix-gaming": { "nix-gaming": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1742089599, "lastModified": 1742607855,
"narHash": "sha256-1yBAFE5yEGEjSWZ8BuPt9Yknq+cFwzW6Q86gs5rMkGI=", "narHash": "sha256-lUF/tpSON29qNIqhECX/Ue4qVmI3FOvMaW4iUnK49C4=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "bbf6f68ec16cead3c29d5ba33d5c52956dfaefdf", "rev": "9818734e2117dac703767585d48b805fad3e7a5e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -157,11 +90,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1741862977, "lastModified": 1742512142,
"narHash": "sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB+ikn74/xQoNrGQ=", "narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cdd2ef009676ac92b715ff26630164bb88fec4e0", "rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -171,72 +104,11 @@
"type": "github" "type": "github"
} }
}, },
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch"
},
"locked": {
"lastModified": 1741814789,
"narHash": "sha256-NbHsnnNwiYUcUaS4z8XK2tYpo3G8NXEKxaKkzMgMiLk=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "33097dcf776d1fad0ff3842096c4e3546312f251",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1738508923,
"narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=",
"owner": "NuschtOS",
"repo": "search",
"rev": "86e2038290859006e05ca7201425ea5b5de4aecb",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2"
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
} }
} }
}, },

View file

@ -7,19 +7,21 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-gaming = { nix-gaming = {
url = "github:fufexan/nix-gaming"; url = "github:fufexan/nix-gaming";
}; };
}; };
outputs = { self, nixpkgs, home-manager, nixvim, nix-gaming, ... }@inputs: outputs = {
let self,
nixpkgs,
home-manager,
nix-gaming,
...
} @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
customPkgsOverlay = final: prev: import ./pkgs { customPkgsOverlay = final: prev:
import ./pkgs {
pkgs = prev; pkgs = prev;
lib = prev.lib; lib = prev.lib;
}; };

View file

@ -1,12 +1,13 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
imports = [ imports = [
./modules/cava.nix
./modules/dunst.nix ./modules/dunst.nix
./modules/fish.nix ./modules/fish.nix
./modules/ghostty.nix ./modules/ghostty.nix
./modules/i3.nix
./modules/lazygit.nix ./modules/lazygit.nix
./modules/nvim.nix ./modules/nvim.nix
./modules/picom.nix ./modules/picom.nix
@ -27,10 +28,10 @@
gnused gnused
gnugrep gnugrep
findutils findutils
yazi
htop htop
btop btop
nvtopPackages.full nvtopPackages.full
arandr arandr
nitrogen
]; ];
} }

View file

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

View file

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

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
fish-rust fish-rust
starship starship
@ -10,5 +13,4 @@
fd fd
ripgrep ripgrep
]; ];
} }

View file

@ -1,7 +1,11 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
ghostty ghostty
fastfetch
]; ];
} }

View file

@ -1,13 +0,0 @@
{ config, pkgs, lib, ... }:
{
home.packages = with pkgs; [
dmenu
i3status
i3lock
i3blocks
feh
yazi
udiskie
];
}

View file

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

View file

@ -2,18 +2,47 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim neovim
ripgrep gnugrep
fd fd
fzf
nodejs nodejs
gcc gcc
git
luajit
luaPackages.luarocks
nil
lua-language-server
curl
unzip
alejandra
]; ];
xdg.configFile."nvim" = { home.sessionVariables = {
source = builtins.fetchGit { LUA_PATH = "${pkgs.luajit}/share/lua/5.1/?.lua;${pkgs.luajit}/share/lua/5.1/?/init.lua;;";
url = "https://github.com/alsaiduq-lab/dotfiles.git"; LUA_CPATH = "${pkgs.luajit}/lib/lua/5.1/?.so;;";
ref = "dev";
rev = "99e2cab828459373bc7524690668fdd209b3f517";
}; };
home.sessionPath = [
"$HOME/.local/share/nvim/mason/bin"
];
xdg.configFile."nvim" = let
nvimConfigPath = "${config.home.homeDirectory}/.config/nvim";
# nvimDotfiles = builtins.fetchGit {
# url = "https://github.com/alsaiduq-lab/nvim-dotfiles.git";
# ref = "master";
# rev = "71155b4a4b63d9974f1bc3b66303d6f7e5e06871";
# };
in {
source = pkgs.emptyDirectory;
recursive = true; recursive = true;
enable = !builtins.pathExists nvimConfigPath;
onChange = ''
echo "Neovim config at ${nvimConfigPath} was ${
if builtins.pathExists nvimConfigPath
then "skipped (already exists)"
else "installed"
}"
'';
}; };
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,13 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# 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, ... }:
{ {
config,
pkgs,
lib,
inputs,
...
}: {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix

View file

@ -14,7 +14,7 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/07f76e3c-2dcf-4cda-99bf-657f1dc5885f"; { device = "/dev/disk/by-uuid/b7877a82-a67d-4362-ad36-ac513d7c0fc6";
fsType = "ext4"; fsType = "ext4";
}; };

View file

@ -1,18 +1,24 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
customPkgs = import ../pkgs { inherit pkgs lib; }; customPkgs = import ../pkgs { inherit pkgs lib; };
in in {
{ imports = [
../modules/python.nix
];
python.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Applications (python311.withPackages (pyPkgs: with pyPkgs; [
brave requests
ghostty pip
virtualenv
ipython
]))
python3Packages.pip
black
ruff
brave # TODO: make a module to save browser stuff
vesktop vesktop
neovim
git git
fastfetch
# Development tools
nodejs nodejs
wget wget
curl curl
@ -20,8 +26,13 @@ in
gnumake gnumake
gcc gcc
socat socat
ffmpeg
gnused
gdb gdb
stdenv.cc.cc.lib
nix-prefetch-git
binutils binutils
hashcat
cmake cmake
ninja ninja
pkg-config pkg-config
@ -31,40 +42,12 @@ in
gawk gawk
obs-studio obs-studio
lazygit lazygit
# Java ecosystem
jdk17 jdk17
bun
maven maven
gradle gradle
visualvm visualvm
jdt-language-server jdt-language-server
(python310.withPackages (ps: with ps; [
virtualenv
ipython
i3ipc
xlib
six
psutil
pynvml
pyqtgraph
pyqt6
numpy
pandas
matplotlib
scipy
requests
click
typer
rich
pyyaml
pytz
onnxruntime
opencv4
pillow
] ++ [ customPkgs.python-rembg ]))
uv
ruff
black
mypy
htop htop
btop btop
nvtopPackages.full nvtopPackages.full
@ -79,9 +62,7 @@ in
deno deno
redis redis
cloudflared cloudflared
# Rust ecosystem
rustup rustup
rust-analyzer
cargo-edit cargo-edit
cargo-watch cargo-watch
cargo-outdated cargo-outdated
@ -91,19 +72,16 @@ in
pkg-config pkg-config
libxml2 libxml2
zlib zlib
# Haskell ecosystem
ghc ghc
cabal-install cabal-install
stack stack
haskell-language-server haskell-language-server
# Database tools
postgresql postgresql
sqlite sqlite
# Version control tools spotify
git-lfs git-lfs
gitAndTools.gh gitAndTools.gh
gitAndTools.diff-so-fancy gitAndTools.diff-so-fancy
# misc
ani-cli ani-cli
yt-dlp yt-dlp
nmap nmap
@ -112,5 +90,14 @@ in
unzip unzip
starship starship
flameshot flameshot
yarn
mpv
httpie
wrk
nodePackages.pnpm
zlib.dev
]; ];
environment.shellAliases = {
python = "python3.11";
};
} }

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
powerOnBoot = true; powerOnBoot = true;

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
# Bootloader # Bootloader
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
imports = [ imports = [
./audio.nix ./audio.nix
./bluetooth.nix ./bluetooth.nix
@ -16,7 +19,7 @@
./steam.nix ./steam.nix
./timezone.nix ./timezone.nix
./user.nix ./user.nix
./man.nix ./python.nix
]; ];
# Enable CUPS to print documents. # Enable CUPS to print documents.

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
enableOnBoot = true; enableOnBoot = true;

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
environment.shellInit = '' environment.shellInit = ''
if [ -d $HOME/.cargo/bin ]; then if [ -d $HOME/.cargo/bin ]; then
export PATH=$PATH:$HOME/.cargo/bin export PATH=$PATH:$HOME/.cargo/bin
@ -11,7 +14,7 @@
EDITOR = "nvim"; EDITOR = "nvim";
VISUAL = "nvim"; VISUAL = "nvim";
TERM = "ghostty"; TERM = "ghostty";
GTK_THEME = "Adwaita:dark"; GTK_THEME = lib.mkDefault "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" [
pkgs.openssl.dev pkgs.openssl.dev

View file

@ -1,6 +1,22 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: let
clear-sans = pkgs.stdenv.mkDerivation {
name = "clear-sans";
src = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/resir014/Clear-Sans-Webfont/97eec13/fonts/TTF/ClearSans-Regular.ttf";
sha256 = "0vzhy3l056gj5vkcs1kglr4mr0546fq093v78i4ri8xni7w1m0dv";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp $src $out/share/fonts/truetype/ClearSans-Regular.ttf
'';
};
in {
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
noto-fonts noto-fonts
@ -10,7 +26,7 @@
(nerdfonts.override {fonts = ["0xProto" "FiraCode" "JetBrainsMono" "Hack" "Noto" "NerdFontsSymbolsOnly"];}) (nerdfonts.override {fonts = ["0xProto" "FiraCode" "JetBrainsMono" "Hack" "Noto" "NerdFontsSymbolsOnly"];})
ipafont ipafont
kochi-substitute kochi-substitute
# Custom BinaryClock font clear-sans
(stdenv.mkDerivation { (stdenv.mkDerivation {
name = "binary-clock-font"; name = "binary-clock-font";
src = fetchurl { src = fetchurl {
@ -27,8 +43,8 @@
fontconfig = { fontconfig = {
enable = true; enable = true;
defaultFonts = { defaultFonts = {
monospace = [ "JetBrains Mono" "Noto Sans Mono CJK JP" ]; monospace = ["0xProto Nerd Font" "Noto Sans Mono CJK JP"];
sansSerif = [ "Noto Sans" "Noto Sans CJK JP" ]; sansSerif = ["Clear Sans" "Noto Sans CJK JP"];
serif = ["Noto Serif" "Noto Serif CJK JP"]; serif = ["Noto Serif" "Noto Serif CJK JP"];
emoji = ["Noto Color Emoji"]; emoji = ["Noto Color Emoji"];
}; };

View file

@ -1,5 +1,10 @@
{ config, pkgs, lib, inputs, ... }:
{ {
config,
pkgs,
lib,
inputs,
...
}: {
imports = [ imports = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
]; ];

View file

@ -1,8 +1,12 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: let
customPkgs = import ../pkgs {inherit pkgs lib;};
in {
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.xkb = { services.xserver.xkb = {
layout = "us"; layout = "us";
variant = ""; variant = "";
@ -24,8 +28,14 @@
i3-auto-layout i3-auto-layout
]; ];
extraSessionCommands = '' extraSessionCommands = ''
# Set random wallpaper ${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 &
${pkgs.feh}/bin/feh --randomize --bg-fill ~/wallpapers/* || ${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 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" || echo "Failed to set GTK theme" > /tmp/theme-debug.log
${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
${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface cursor-theme "capitaine-cursors" || echo "Failed to set cursor theme" > /tmp/theme-debug.log
''; '';
}; };
@ -34,52 +44,115 @@
noDesktop = true; noDesktop = true;
enableXfwm = false; enableXfwm = false;
}; };
services.xserver.displayManager.lightdm = { services.xserver.displayManager.lightdm = {
enable = true; enable = true;
background = "#000000"; background = "${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/backgrounds/nixos/nixos-wallpaper.png";
greeters.gtk = { greeters.gtk = {
enable = true; enable = true;
theme.name = "Adwaita-dark"; theme = {
iconTheme.name = "Papirus-Dark"; package = pkgs.tokyonight-gtk-theme;
name = "Tokyonight-Dark";
};
iconTheme = {
package = customPkgs.vivid-icons;
name = "Vivid-Icons-Dark";
};
cursorTheme = {
package = pkgs.capitaine-cursors;
name = "capitaine-cursors";
};
extraConfig = ''
[greeter]
font-name=Clear Sans 10
cursor-theme-name=capitaine-cursors
'';
}; };
}; };
services.displayManager.defaultSession = "xfce+i3"; services.displayManager.defaultSession = "xfce+i3";
services.displayManager.autoLogin = { services.displayManager.autoLogin = {
enable = true; enable = true;
user = "cobray"; user = "cobray";
}; };
environment.etc."xdg/autostart/i3-setup.desktop" = {
text = '' qt = {
[Desktop Entry] enable = true;
Type=Application platformTheme = "gtk2";
Name=i3 Setup
Exec=${pkgs.bash}/bin/bash -c "${pkgs.feh}/bin/feh --randomize --bg-fill ~/wallpapers/* || ${pkgs.feh}/bin/feh --bg-fill ${pkgs.nixos-artwork.wallpapers.nineish-dark-gray}/share/backgrounds/nixos/nineish-dark-gray.png"
Terminal=false
X-GNOME-Autostart-enabled=true
'';
mode = "0644";
}; };
qt.enable = true; environment.etc = {
qt.platformTheme = "gnome"; "gtk-2.0/gtkrc".text = ''
qt.style = "adwaita-dark"; gtk-theme-name="Tokyonight-Dark"
environment.etc."gtk-3.0/settings.ini".text = '' gtk-icon-theme-name="Vivid-Icons-Dark"
gtk-font-name="Clear Sans 10"
gtk-cursor-theme-name="capitaine-cursors"
gtk-cursor-theme-size=24
'';
"gtk-3.0/settings.ini".text = ''
[Settings] [Settings]
gtk-application-prefer-dark-theme=1 gtk-application-prefer-dark-theme=1
gtk-theme-name=Adwaita-dark gtk-theme-name=Tokyonight-Dark
gtk-icon-theme-name=Papirus-Dark gtk-icon-theme-name=Vivid-Icons-Dark
gtk-font-name=Sans 10 gtk-font-name=Clear Sans 10
gtk-cursor-theme-name=capitaine-cursors
gtk-cursor-theme-size=24
''; '';
"gtk-4.0/settings.ini".text = ''
[Settings]
gtk-application-prefer-dark-theme=1
gtk-theme-name=Tokyonight-Dark
gtk-icon-theme-name=Vivid-Icons-Dark
gtk-font-name=Clear Sans 10
gtk-cursor-theme-name=capitaine-cursors
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 nitrogen
xclip xclip
lxappearance lxappearance
gnome-themes-extra
gsettings-desktop-schemas
adwaita-qt
arc-theme arc-theme
arc-icon-theme arc-icon-theme
papirus-icon-theme papirus-icon-theme
numix-icon-theme-circle numix-icon-theme-circle
candy-icons candy-icons
]; capitaine-cursors
tokyonight-gtk-theme
nix-prefetch-git
] ++ (with customPkgs; [
vivid-icons
]);
services.xserver.desktopManager.session = [{
name = "xfce+i3";
start = ''
export XDG_DATA_DIRS="${pkgs.tokyonight-gtk-theme}/share:${customPkgs.vivid-icons}/share:$XDG_DATA_DIRS"
${pkgs.xfce.xfce4-session}/bin/xfce4-session --with-ck-launch &
${pkgs.i3-gaps}/bin/i3
'';
}];
programs.dconf.enable = true;
programs.dconf.profiles.user.databases = [{
settings = {
"org/gnome/desktop/interface" = {
icon-theme = "Vivid-Icons-Dark";
gtk-theme = "Tokyonight-Dark";
cursor-theme = "capitaine-cursors";
};
};
}];
} }

View file

@ -1,42 +0,0 @@
{ config, pkgs, lib, ... }:
{
documentation = {
enable = true;
dev.enable = true;
doc.enable = true;
info.enable = true;
man = {
enable = true;
generateCaches = true;
};
nixos.enable = true;
};
environment.pathsToLink = [ "/share/man" "/share/doc" ];
environment.systemPackages = with pkgs; [
man-pages
man-pages-posix
stdmanpages
docutils
python311Packages.docutils
python311Packages.docstr-coverage
python310Packages.docutils
python310Packages.docstr-coverage
texlivePackages.documentation
docbook5
docbook-xsl-ns
docbook-xsl-nons
doctoc
doctave
documentation-highlighter
];
environment.variables = {
MANPATH = [
"${config.system.path}/share/man"
"${pkgs.man-pages}/share/man"
"${pkgs.man-pages-posix}/share/man"
];
};
}

View file

@ -1,6 +1,16 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
environment.systemPackages = with pkgs; [
networkmanager_dmenu
];
networking.firewall.allowedTCPPorts = [ 57621 ];
networking.firewall.allowedUDPPorts = [ 5353 ];
networking.wireless.enable = false; # Enables wireless support via wpa_supplicant. networking.wireless.enable = false; # Enables wireless support via wpa_supplicant.
networking.hostName = "nixos"; networking.hostName = "nixos";
# Configure network proxy if necessary # Configure network proxy if necessary

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
programs.nix-index.enable = true; programs.nix-index.enable = true;
programs.command-not-found.enable = false; programs.command-not-found.enable = false;

View file

@ -1,11 +1,14 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = { hardware.nvidia = {
modesetting.enable = true; modesetting.enable = false;
powerManagement.enable = true; powerManagement.enable = false;
# Set to true for RTX 4000 series and newer GPUs # Set to true for RTX 4000 series and newer GPUs
open = true; open = true;
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.stable;
@ -13,6 +16,7 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#cudaPackages.cudatoolkit cudaPackages.cudatoolkit
glxinfo
]; ];
} }

49
modules/python.nix Normal file
View file

@ -0,0 +1,49 @@
{ config, pkgs, lib, ... }:
let
customPkgs = pkgs.callPackage ../pkgs { inherit pkgs lib; };
in {
options.python = {
enable = lib.mkEnableOption "System Python Environment";
};
config = lib.mkIf config.python.enable {
environment.systemPackages = with pkgs; [
(python311.withPackages (pyPkgs: with pyPkgs; [
numpy
python-pymatting
python-opencv-headless
python-rembg
i3ipc
pandas
matplotlib
scipy
requests
pip
virtualenv
ipython
six
psutil
pynvml
pyqtgraph
pyqt6
click
typer
rich
pyyaml
pytz
pillow
]))
python3Packages.pip
black
ruff
uv
];
environment.variables = {
PIP_PREFIX = "$HOME/.local";
PYTHONPATH = "$HOME/.local/lib/python3.11/site-packages";
};
environment.shellAliases = {
python = "python3.11";
};
};
}

View file

@ -1,6 +1,11 @@
{ config, pkgs, lib, inputs, system, ... }:
{ {
config,
pkgs,
lib,
inputs,
system,
...
}: {
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
time.timeZone = "America/Edmonton"; time.timeZone = "America/Edmonton";
i18n.defaultLocale = "en_CA.UTF-8"; i18n.defaultLocale = "en_CA.UTF-8";
} }

View file

@ -1,10 +1,11 @@
{ config, pkgs, lib, ... }:
let
fish-rust = pkgs.callPackage ../pkgs/fish-rust { };
in
{ {
config,
pkgs,
lib,
...
}: let
fish-rust = pkgs.callPackage ../pkgs/fish-rust {};
in {
# Define a user account. Don't forget to set a password with 'passwd'. # Define a user account. Don't forget to set a password with 'passwd'.
users.users.cobray = { users.users.cobray = {
isNormalUser = true; isNormalUser = true;

View file

@ -1,17 +1,44 @@
{ pkgs ? import <nixpkgs> {}, lib ? pkgs.lib }:
let
python-pymatting = pkgs.callPackage ./python-pymatting {
inherit (pkgs) lib fetchPypi;
python310Packages = pkgs.python310.pkgs;
};
in
{ {
pkgs ? import <nixpkgs> {},
lib ? pkgs.lib,
}: {
fish-rust = pkgs.callPackage ./fish-rust {}; fish-rust = pkgs.callPackage ./fish-rust {};
python-pymatting = python-pymatting; 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 (pkgs) lib fetchPypi; inherit lib;
python310Packages = pkgs.python310.pkgs; fetchPypi = pkgs.fetchPypi;
inherit python-pymatting; 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;
};
python311Packages = pkgs.python311Packages;
};
vivid-icons = pkgs.callPackage ./vivid-icons {
inherit lib;
stdenv = pkgs.stdenv;
fetchFromGitHub = pkgs.fetchFromGitHub;
}; };
} }

View file

@ -1,8 +1,14 @@
{ lib, rustPlatform, fetchgit, ncurses, python3Packages, gettext }: {
lib,
rustPlatform,
fetchgit,
ncurses,
python3Packages,
gettext,
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "fish"; pname = "fish";
version = "4.1-2025-03-16-rust"; version = "4.1-2025-03-16-rust-${builtins.substring 0 7 "642ec399ca17bbde973dc20461335396fe922e4c"}";
src = fetchgit { src = fetchgit {
url = "https://github.com/fish-shell/fish-shell.git"; url = "https://github.com/fish-shell/fish-shell.git";
@ -20,11 +26,7 @@ rustPlatform.buildRustPackage rec {
}; };
buildInputs = [ncurses gettext]; buildInputs = [ncurses gettext];
nativeBuildInputs = with python3Packages; [ nativeBuildInputs = with python3Packages; [sphinx sphinx_rtd_theme];
sphinx
sphinx_rtd_theme
gettext
];
preBuild = '' preBuild = ''
export FISH_BUILD_VERSION="${version}" export FISH_BUILD_VERSION="${version}"
@ -32,23 +34,11 @@ rustPlatform.buildRustPackage rec {
''; '';
postInstall = '' postInstall = ''
export HOME=$(mktemp -d)
mkdir -p $HOME/.local/share/fish/install
if [ ! -f $HOME/.config/fish/config.fish ]; then
$out/bin/fish --install
fi
mkdir -p $out/share/fish
cp -r $HOME/.local/share/fish/install/* $out/share/fish/ 2>/dev/null || true
mkdir -p $out/share/fish/tools mkdir -p $out/share/fish/tools
cp $src/share/tools/create_manpage_completions.py $out/share/fish/tools/ cp $src/share/tools/create_manpage_completions.py $out/share/fish/tools/
cp $src/share/tools/deroff.py $out/share/fish/tools/ cp $src/share/tools/deroff.py $out/share/fish/tools/
chmod +x $out/share/fish/tools/create_manpage_completions.py chmod +x $out/share/fish/tools/create_manpage_completions.py
chmod +x $out/share/fish/tools/deroff.py chmod +x $out/share/fish/tools/deroff.py
rm -rf $HOME
''; '';
doCheck = false; doCheck = false;
@ -59,6 +49,7 @@ rustPlatform.buildRustPackage rec {
license = licenses.gpl2; license = licenses.gpl2;
platforms = platforms.unix; platforms = platforms.unix;
mainProgram = "fish"; mainProgram = "fish";
maintainers = ["Cobray"];
}; };
passthru.shellPath = "/bin/fish"; passthru.shellPath = "/bin/fish";

View file

@ -0,0 +1,55 @@
{ lib
, python311Packages
, fetchPypi
, stdenv
, makeWrapper
, cmake
, pkg-config
}:
python311Packages.buildPythonPackage rec {
pname = "opencv-python-headless";
version = "4.11.0.86";
format = "setuptools";
src = fetchPypi {
pname = "opencv-python-headless";
inherit version;
format = "setuptools";
sha256 = "mW6ygspLQ+xqOXJBTeDiMx9dnNorQQkaSXOcGfuEN5g=";
};
nativeBuildInputs = with python311Packages; [
cmake
pkg-config
makeWrapper
scikit-build
];
buildInputs = with python311Packages; [
scikit-build
];
propagatedBuildInputs = with python311Packages; [
numpy
setuptools
];
dontUseCmakeConfigure = true;
doCheck = false;
pythonImportsCheck = [ "cv2" ];
postFixup = ''
wrapPythonProgramsIn "$out/lib/python3.11/site-packages" "${stdenv.cc.cc.lib}"
'';
meta = with lib; {
description = "Wrapper package for OpenCV python bindings (headless)";
homepage = "https://github.com/opencv/opencv-python";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ "Cobray" ];
};
}

View file

@ -1,22 +1,33 @@
{ lib, python310Packages, fetchPypi }: {
lib,
python310Packages.buildPythonPackage rec { python311Packages,
fetchPypi,
}:
python311Packages.buildPythonPackage rec {
pname = "pymatting"; pname = "pymatting";
version = "1.1.13"; version = "1.1.13";
format = "setuptools"; format = "pyproject";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-LNt8S++s3e9Netwt6ONKJy3mOdYIrlwKCGE9+kJTgQE="; # Updated hash hash = "sha256-LNt8S++s3e9Netwt6ONKJy3mOdYIrlwKCGE9+kJTgQE=";
}; };
propagatedBuildInputs = with python310Packages; [ nativeBuildInputs = with python311Packages; [
setuptools
poetry-core
];
propagatedBuildInputs = with python311Packages; [
numpy numpy
scipy scipy
pillow pillow
numba numba
]; ];
buildInputs = [
];
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
@ -24,5 +35,6 @@ python310Packages.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" ];
}; };
} }

View file

@ -1,40 +1,39 @@
{ lib, python310Packages, fetchPypi, python-pymatting }: { lib
, python311Packages
python310Packages.buildPythonPackage rec { , fetchPypi
, python-pymatting
, python-opencv-headless
}:
python311Packages.buildPythonPackage rec {
pname = "rembg"; pname = "rembg";
version = "2.0.50"; version = "2.0.50";
format = "setuptools"; format = "pyproject";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "0dgq291bj4w6jkcyz7lvp1vba2nczfnmxa2acl2sqib5p8cpzjvc"; sha256 = "bMt/GbplRawFZUqoXq37zAq1dribnu/ZlIYTuUIS+DU=";
}; };
nativeBuildInputs = with python311Packages; [
nativeBuildInputs = with python310Packages; [
setuptools
poetry-core poetry-core
setuptools
]; ];
propagatedBuildInputs = with python311Packages; [
propagatedBuildInputs = with python310Packages; [
numpy numpy
pillow
onnxruntime onnxruntime
opencv4 pillow
requests
aiohttp
asynctest
click
filetype
pooch pooch
pympler
python-pymatting
scikit-image scikit-image
scipy scipy
tqdm tqdm
aiohttp
pytorch-bin
] ++ [
python-opencv-headless
python-pymatting
]; ];
pythonRemoveDeps = [ "opencv-python-headless" ];
dontPrecompilePages = true;
doInstallCheck = false;
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "Tool to remove image backgrounds"; description = "Tool to remove image backgrounds";
homepage = "https://github.com/danielgatis/rembg"; homepage = "https://github.com/danielgatis/rembg";

1350
pkgs/template.nix Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,41 @@
{
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

@ -0,0 +1,54 @@
{
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"];
};
}