commit
fa1b510413
37 changed files with 334 additions and 329 deletions
24
flake.lock
generated
24
flake.lock
generated
|
|
@ -25,11 +25,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742670145,
|
||||
"narHash": "sha256-xQ2F9f+ICAGBp/nNv3ddD2U4ZvzuLOci0u/5lyMXPvk=",
|
||||
"lastModified": 1743295846,
|
||||
"narHash": "sha256-hKKz07d4RV9gzxzE5Qu3RQWX8a7XpzRrP5timoxoGRQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "63e77d09a133ac641a0c204e7cfb0c97e133706d",
|
||||
"rev": "717030011980e9eb31eb8ce011261dd532bce92c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -44,11 +44,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742607855,
|
||||
"narHash": "sha256-lUF/tpSON29qNIqhECX/Ue4qVmI3FOvMaW4iUnK49C4=",
|
||||
"lastModified": 1743299372,
|
||||
"narHash": "sha256-vFuxkHPd+Xpi5Bx1VCyZwYl/BbF83C+KmlbPBNVJvNU=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "9818734e2117dac703767585d48b805fad3e7a5e",
|
||||
"rev": "2ab0a37308559926bddb0009dfcf16a2a5b34e2b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -59,11 +59,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1741865919,
|
||||
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
|
||||
"lastModified": 1743076231,
|
||||
"narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
|
||||
"rev": "6c5963357f3c1c840201eda129a99d455074db04",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -90,11 +90,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1742512142,
|
||||
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
|
||||
"lastModified": 1743231893,
|
||||
"narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
|
||||
"rev": "c570c1f5304493cafe133b8d843c7c1c4a10d3a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -1,10 +1,18 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
lazygit
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
includes = [
|
||||
{ path = "./.secrets/.git-config"; }
|
||||
];
|
||||
extraConfig = {
|
||||
credential.helper = "store --file ./.secrets/.git-credentials";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
neovim
|
||||
gnugrep
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
polybar
|
||||
];
|
||||
home.packages = pkgs.polybar.all;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running 'nixos-help').
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
|
|
|
|||
|
|
@ -1,21 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
customPkgs = import ../pkgs { inherit pkgs lib; };
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
customPkgs = import ../pkgs {inherit pkgs lib;};
|
||||
in {
|
||||
imports = [
|
||||
../modules/python.nix
|
||||
];
|
||||
|
||||
python.enable = true;
|
||||
|
||||
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
|
||||
vesktop
|
||||
git
|
||||
|
|
@ -42,6 +38,7 @@ in {
|
|||
gawk
|
||||
obs-studio
|
||||
lazygit
|
||||
lazydocker
|
||||
jdk17
|
||||
bun
|
||||
maven
|
||||
|
|
@ -51,13 +48,13 @@ in {
|
|||
htop
|
||||
btop
|
||||
nvtopPackages.full
|
||||
ripgrep
|
||||
fd
|
||||
fzf
|
||||
jq
|
||||
bash
|
||||
customPkgs.fish-rust
|
||||
go
|
||||
ollama
|
||||
sqls
|
||||
deno
|
||||
redis
|
||||
|
|
@ -96,8 +93,42 @@ in {
|
|||
wrk
|
||||
nodePackages.pnpm
|
||||
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";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
security.rtkit.enable = true;
|
||||
|
|
@ -12,13 +10,11 @@
|
|||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#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; [
|
||||
cava
|
||||
pulseaudio
|
||||
ffmpeg
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
hardware.bluetooth = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Bootloader
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
virtualisation.docker = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
clear-sans = pkgs.stdenv.mkDerivation {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,26 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: 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 {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.xkb = {
|
||||
|
|
@ -26,16 +42,20 @@ in {
|
|||
dunst
|
||||
polybar
|
||||
i3-auto-layout
|
||||
xsettingsd
|
||||
];
|
||||
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 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
|
||||
${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 cursor-theme "capitaine-cursors"
|
||||
cat > $HOME/.config/xsettingsd << EOF
|
||||
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 = {
|
||||
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 = {
|
||||
enable = true;
|
||||
theme = {
|
||||
|
|
@ -55,8 +75,8 @@ in {
|
|||
name = "Tokyonight-Dark";
|
||||
};
|
||||
iconTheme = {
|
||||
package = customPkgs.vivid-icons;
|
||||
name = "Vivid-Icons-Dark";
|
||||
package = pkgs.candy-icons;
|
||||
name = "candy-icons";
|
||||
};
|
||||
cursorTheme = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
|
|
@ -64,12 +84,36 @@ in {
|
|||
};
|
||||
extraConfig = ''
|
||||
[greeter]
|
||||
greeting = Welcome back, Traveller
|
||||
font-name=Clear Sans 10
|
||||
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.autoLogin = {
|
||||
enable = true;
|
||||
|
|
@ -78,13 +122,13 @@ in {
|
|||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk2";
|
||||
platformTheme = "qt5ct";
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"gtk-2.0/gtkrc".text = ''
|
||||
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-cursor-theme-name="capitaine-cursors"
|
||||
gtk-cursor-theme-size=24
|
||||
|
|
@ -93,66 +137,64 @@ in {
|
|||
[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-icon-theme-name="candy-icons"
|
||||
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-icon-theme-name="candy-icons"
|
||||
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; [
|
||||
arandr
|
||||
nitrogen
|
||||
xclip
|
||||
lxappearance
|
||||
gnome-themes-extra
|
||||
gsettings-desktop-schemas
|
||||
adwaita-qt
|
||||
arc-theme
|
||||
arc-icon-theme
|
||||
papirus-icon-theme
|
||||
numix-icon-theme-circle
|
||||
candy-icons
|
||||
capitaine-cursors
|
||||
tokyonight-gtk-theme
|
||||
nix-prefetch-git
|
||||
] ++ (with customPkgs; [
|
||||
vivid-icons
|
||||
]);
|
||||
xsettingsd
|
||||
hicolor-icon-theme
|
||||
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";
|
||||
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.i3-gaps}/bin/i3
|
||||
'';
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
||||
programs.dconf.enable = true;
|
||||
programs.dconf.profiles.user.databases = [{
|
||||
programs.dconf.profiles.user.databases = [
|
||||
{
|
||||
settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
icon-theme = "Vivid-Icons-Dark";
|
||||
icon-theme = "candy-icons";
|
||||
gtk-theme = "Tokyonight-Dark";
|
||||
cursor-theme = "capitaine-cursors";
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
networkmanager_dmenu
|
||||
networkmanagerapplet
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 57621 ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
|
|
|||
|
|
@ -1,24 +1,28 @@
|
|||
{ 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; [
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
customPkgs = pkgs.callPackage ../pkgs {inherit pkgs lib;};
|
||||
py = pkgs.python311Packages;
|
||||
pipConf = pkgs.writeText "pip.conf" ''
|
||||
[global]
|
||||
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
|
||||
python-pymatting
|
||||
python-opencv-headless
|
||||
python-rembg
|
||||
i3ipc
|
||||
pandas
|
||||
matplotlib
|
||||
scipy
|
||||
requests
|
||||
pip
|
||||
virtualenv
|
||||
ipython
|
||||
six
|
||||
|
|
@ -26,24 +30,35 @@ in {
|
|||
pynvml
|
||||
pyqtgraph
|
||||
pyqt6
|
||||
click
|
||||
typer
|
||||
rich
|
||||
pyyaml
|
||||
pytz
|
||||
pillow
|
||||
]))
|
||||
python3Packages.pip
|
||||
black
|
||||
ruff
|
||||
jedi
|
||||
libcst
|
||||
pip
|
||||
];
|
||||
};
|
||||
in {
|
||||
options.python = {
|
||||
enable = lib.mkEnableOption "System Python Environment";
|
||||
};
|
||||
config = lib.mkIf config.python.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pythonEnv
|
||||
isort
|
||||
uv
|
||||
stdenv.cc.cc.lib
|
||||
python311
|
||||
];
|
||||
environment.variables = {
|
||||
PIP_PREFIX = "$HOME/.local";
|
||||
PIP_CONFIG_FILE = "${pipConf}";
|
||||
PYTHONPATH = "$HOME/.local/lib/python3.11/site-packages";
|
||||
};
|
||||
environment.shellAliases = {
|
||||
python = "python3.11";
|
||||
};
|
||||
system.userActivationScripts.removeNumpy2 = ''
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
programs.steam = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
time.timeZone = "America/Edmonton";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
fish-rust = pkgs.callPackage ../pkgs/fish-rust {};
|
||||
|
|
|
|||
|
|
@ -1,29 +1,35 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> {},
|
||||
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 {};
|
||||
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 {
|
||||
inherit lib;
|
||||
fetchPypi = pkgs.fetchPypi;
|
||||
python311Packages = customPythonPackages;
|
||||
python-pymatting = pkgs.callPackage ./python-pymatting {
|
||||
inherit lib;
|
||||
fetchPypi = pkgs.fetchPypi;
|
||||
python311Packages = pkgs.python311Packages;
|
||||
python311Packages = customPythonPackages;
|
||||
};
|
||||
python-opencv-headless = pkgs.callPackage ./python-opencv-headless {
|
||||
inherit lib;
|
||||
|
|
@ -32,13 +38,13 @@
|
|||
pkg-config = pkgs.pkg-config;
|
||||
stdenv = pkgs.stdenv;
|
||||
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;
|
||||
stdenv = pkgs.stdenv;
|
||||
fetchFromGitHub = pkgs.fetchFromGitHub;
|
||||
python311Packages = customPythonPackages;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
50
pkgs/python-nginx-language-server/default.nix
Normal file
50
pkgs/python-nginx-language-server/default.nix
Normal 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"];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
{ lib
|
||||
, python311Packages
|
||||
, fetchPypi
|
||||
, stdenv
|
||||
, makeWrapper
|
||||
, cmake
|
||||
, pkg-config
|
||||
{
|
||||
lib,
|
||||
python311Packages,
|
||||
fetchPypi,
|
||||
stdenv,
|
||||
makeWrapper,
|
||||
cmake,
|
||||
pkg-config,
|
||||
}:
|
||||
|
||||
python311Packages.buildPythonPackage rec {
|
||||
pname = "opencv-python-headless";
|
||||
version = "4.11.0.86";
|
||||
|
|
@ -31,15 +31,15 @@ python311Packages.buildPythonPackage rec {
|
|||
];
|
||||
|
||||
propagatedBuildInputs = with python311Packages; [
|
||||
numpy
|
||||
setuptools
|
||||
numpy
|
||||
];
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "cv2" ];
|
||||
pythonImportsCheck = ["cv2"];
|
||||
|
||||
postFixup = ''
|
||||
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";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ "Cobray" ];
|
||||
maintainers = with maintainers; ["Cobray"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ python311Packages.buildPythonPackage rec {
|
|||
];
|
||||
|
||||
propagatedBuildInputs = with python311Packages; [
|
||||
numpy
|
||||
scipy
|
||||
pillow
|
||||
numba
|
||||
|
|
@ -35,6 +34,6 @@ python311Packages.buildPythonPackage rec {
|
|||
homepage = "https://github.com/pymatting/pymatting";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ "Cobray" ];
|
||||
maintainers = with maintainers; ["Cobray"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
{ lib
|
||||
, python311Packages
|
||||
, fetchPypi
|
||||
, python-pymatting
|
||||
, python-opencv-headless
|
||||
{
|
||||
lib,
|
||||
python311Packages,
|
||||
fetchPypi,
|
||||
python-pymatting,
|
||||
python-opencv-headless,
|
||||
}:
|
||||
python311Packages.buildPythonPackage rec {
|
||||
pname = "rembg";
|
||||
|
|
@ -16,8 +17,8 @@ python311Packages.buildPythonPackage rec {
|
|||
poetry-core
|
||||
setuptools
|
||||
];
|
||||
propagatedBuildInputs = with python311Packages; [
|
||||
numpy
|
||||
propagatedBuildInputs = with python311Packages;
|
||||
[
|
||||
onnxruntime
|
||||
pillow
|
||||
pooch
|
||||
|
|
@ -26,11 +27,12 @@ python311Packages.buildPythonPackage rec {
|
|||
tqdm
|
||||
aiohttp
|
||||
pytorch-bin
|
||||
] ++ [
|
||||
]
|
||||
++ [
|
||||
python-opencv-headless
|
||||
python-pymatting
|
||||
];
|
||||
pythonRemoveDeps = [ "opencv-python-headless" ];
|
||||
pythonRemoveDeps = ["opencv-python-headless"];
|
||||
dontPrecompilePages = true;
|
||||
doInstallCheck = false;
|
||||
doCheck = false;
|
||||
|
|
@ -39,6 +41,6 @@ python311Packages.buildPythonPackage rec {
|
|||
homepage = "https://github.com/danielgatis/rembg";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ "Cobray" ];
|
||||
maintainers = with maintainers; ["Cobray"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
};
|
||||
}
|
||||
|
|
@ -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"];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue