Squash merge redo into master

This commit is contained in:
alsaiduq-lab 2025-05-29 20:01:47 -06:00
parent d9fa7610df
commit 05fa2b59f2
15 changed files with 268 additions and 114 deletions

24
flake.lock generated
View file

@ -25,11 +25,11 @@
]
},
"locked": {
"lastModified": 1747556831,
"narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=",
"lastModified": 1748487945,
"narHash": "sha256-e9zc/rHdoH9i+sFFhhQiKoF6IuD+T2rB/nUyPaO7CCg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33",
"rev": "0d13ea58d565d3c1c1468ddae1f623316dc395d9",
"type": "github"
},
"original": {
@ -47,11 +47,11 @@
]
},
"locked": {
"lastModified": 1747965612,
"narHash": "sha256-koAXv7H+cZBMOZkOekO7AIan0e75/ptPqkiOkO3x9lM=",
"lastModified": 1748397391,
"narHash": "sha256-g2quQIkkDOHFMipUOBs7+D3xr490slZp9qiamOkPzO4=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "10e16d55b14d6d2f86d636d546be5130c0827933",
"rev": "39bae253dc201cfe03ee53bd90ed813f89afa9cd",
"type": "github"
},
"original": {
@ -62,11 +62,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1747953325,
"narHash": "sha256-y2ZtlIlNTuVJUZCqzZAhIw5rrKP4DOSklev6c8PyCkQ=",
"lastModified": 1748302896,
"narHash": "sha256-ixMT0a8mM091vSswlTORZj93WQAJsRNmEvqLL+qwTFM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "55d1f923c480dadce40f5231feb472e81b0bab48",
"rev": "7848cd8c982f7740edf76ddb3b43d234cb80fc4d",
"type": "github"
},
"original": {
@ -102,11 +102,11 @@
"rpcs3_latest": {
"flake": false,
"locked": {
"lastModified": 1748103898,
"narHash": "sha256-HlLFleqkEVs2StNBw1WG9lVuH5kNaZyYFpgMVOvQCMc=",
"lastModified": 1748477272,
"narHash": "sha256-PTjLS+vIo/K+Eggib4u6LzAidTFiHNh2ALAE3bpylA4=",
"owner": "RPCS3",
"repo": "rpcs3",
"rev": "3e674a896f9e70ee7112c89c0a2a07f0df4d2326",
"rev": "a9df046f21d11b4e7758401bed47d2cad402c294",
"type": "github"
},
"original": {

View file

@ -35,5 +35,6 @@
btop
nvtopPackages.full
arandr
inputs.nix-gaming.packages.${pkgs.system}.wine-discord-ipc-bridge
];
}

View file

@ -1,7 +1,145 @@
{
pkgs,
...
}: {
{pkgs, ...}: let
urgencyLowBackground = "#1a1b26";
urgencyLowForeground = "#c0caf5";
urgencyLowFrameColor = "#7aa2f7";
urgencyNormalBackground = "#24283b";
urgencyNormalForeground = "#c0caf5";
urgencyNormalFrameColor = "#7aa2f7";
urgencyCriticalBackground = "#f7768e";
urgencyCriticalForeground = "#1a1b26";
urgencyCriticalFrameColor = "#ff757f";
volumeHighlight = "#f5c2e7";
volumeFrameColor = "#eba0ac";
volumeBackground = "#45475a";
volumeForeground = "#f5e0dc";
brightnessHighlight = "#94e2d5";
brightnessFrameColor = "#74c7ec";
brightnessBackground = "#313244";
brightnessForeground = "#a6e3a1";
networkHighlight = "#f9e2af";
networkFrameColor = "#f38ba8";
networkBackground = "#1e1e2e";
networkForeground = "#fab387";
globalFrameColor = "#7aa2f7";
globalCornerRadius = 10;
globalMargin = 8;
globalPadding = 12;
globalBorderWidth = 2;
globalFont = "0xProto Nerd Font Bold 10";
globalIconPath = "/usr/share/icons/Candy/16x16/status/:/usr/share/icons/Candy/16x16/devices/:/usr/share/icons/Candy/16x16/apps/";
in {
services.dunst = {
enable = true;
settings = {
global = {
monitor = 0;
follow = "mouse";
width = "(300, 400)";
height = 300;
origin = "top-right";
offset = "15x50";
scale = 0;
notification_limit = 0;
progress_bar = true;
progress_bar_height = 10;
progress_bar_frame_width = 1;
progress_bar_min_width = 150;
progress_bar_max_width = 300;
transparency = 5;
padding = globalPadding;
horizontal_padding = globalPadding;
text_icon_padding = 12;
frame_width = globalBorderWidth;
frame_color = globalFrameColor;
separator_color = "frame";
separator_height = 2;
corner_radius = globalCornerRadius;
gap_size = globalMargin;
line_height = 0;
font = globalFont;
markup = "full";
format = "<b>%s</b>\n%b";
alignment = "left";
vertical_alignment = "center";
show_age_threshold = 60;
ellipsize = "middle";
ignore_newline = "no";
stack_duplicates = true;
hide_duplicate_count = false;
show_indicators = true;
enable_recursive_icon_lookup = true;
icon_position = "left";
min_icon_size = 32;
max_icon_size = 128;
icon_path = globalIconPath;
sticky_history = "yes";
history_length = 20;
mouse_left_click = "do_action, close_current";
mouse_middle_click = "close_all";
mouse_right_click = "close_current";
};
urgency_low = {
background = urgencyLowBackground;
foreground = urgencyLowForeground;
frame_color = urgencyLowFrameColor;
timeout = 5;
};
urgency_normal = {
background = urgencyNormalBackground;
foreground = urgencyNormalForeground;
frame_color = urgencyNormalFrameColor;
timeout = 5;
};
urgency_critical = {
background = urgencyCriticalBackground;
foreground = urgencyCriticalForeground;
frame_color = urgencyCriticalFrameColor;
timeout = 0;
};
volume = {
appname = "Volume";
summary = "*";
format = "<b>%s</b>\n%b";
highlight = volumeHighlight;
frame_color = volumeFrameColor;
background = volumeBackground;
foreground = volumeForeground;
};
brightness = {
appname = "Brightness";
summary = "*";
format = "<b>%s</b>\n%b";
highlight = brightnessHighlight;
frame_color = brightnessFrameColor;
background = brightnessBackground;
foreground = brightnessForeground;
};
network = {
appname = "Network";
summary = "*";
format = "<b>%s</b>\n%b";
highlight = networkHighlight;
frame_color = networkFrameColor;
background = networkBackground;
foreground = networkForeground;
};
};
};
home.packages = with pkgs; [
dunst
];

View file

@ -1,5 +1,25 @@
{pkgs, ...}: {
home.packages = with pkgs; [
ffmpeg_7-full
{pkgs, ...}: let
x11ffmpeg = pkgs.ffmpeg-full.overrideAttrs (old: {
buildInputs =
(old.buildInputs or [])
++ [
pkgs.xorg.libxcb
pkgs.xorg.libX11
pkgs.xorg.xcbutil
pkgs.xorg.xcbutilimage
pkgs.xorg.xcbutilkeysyms
pkgs.xorg.xcbutilwm
];
configureFlags =
(old.configureFlags or [])
++ [
"--enable-libxcb"
"--enable-libxcb-shm"
"--enable-libxcb-xfixes"
];
});
in {
home.packages = [
x11ffmpeg
];
}

View file

@ -1,8 +1,5 @@
# TODO: cleanout and repopulate individual packages better
{pkgs, ...}: {
python.enable = true;
npm.enable = true;
environment.systemPackages = with pkgs; [
brave # TODO: make a module to save browser stuff
vesktop

View file

@ -1,11 +1,19 @@
{pkgs, ...}: {
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.memtest86.enable = true;
boot.loader.systemd-boot.configurationLimit = 5;
boot.loader.timeout = 5;
# Create the traditional /bin directory with a symlink to bash for scripts
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 5;
};
efi.canTouchEfiVariables = true;
timeout = 5;
};
tmp = {
cleanOnBoot = true;
};
kernelPackages = pkgs.linuxPackages_xanmod_latest;
};
system.activationScripts.binbash = {
deps = [];
text = ''

View file

@ -17,6 +17,7 @@
./npm.nix
./tailscale.nix
./udiskie.nix
./ld.nix
];
services.ollama = {

View file

@ -34,7 +34,7 @@
];
LD_LIBRARY_PATH = lib.makeLibraryPath [
pkgs.libglvnd
pkgs.mesa.drivers
pkgs.mesa
pkgs.gcc-unwrapped.lib
pkgs.linuxPackages.nvidia_x11
pkgs.cudatoolkit

View file

@ -1,22 +1,29 @@
{pkgs, ...}: let
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"
];
wallpaperDir = "/home/cobray/wallpapers";
randomWallpaper = pkgs.writeShellScript "wallpaper.sh" ''
#!${pkgs.runtimeShell}
set -e
BG_DIR="/var/lib/lightdm-background"
BG_LINK="$BG_DIR/current-wallpaper.png"
BG_LINK="$BG_DIR/random-wallpaper.png"
LAST_WALLPAPER="$BG_DIR/.last-wallpaper"
WALLPAPER_DIR="${wallpaperDir}"
mkdir -p "$BG_DIR"
WALLPAPERS=( ${builtins.concatStringsSep " " (map (w: "\"${w}\"") wallpapers)} )
rm -f "$BG_LINK"
mapfile -t WALLPAPERS < <(${pkgs.findutils}/bin/find "$WALLPAPER_DIR" -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" \))
COUNT=''${#WALLPAPERS[@]}
if [[ "$COUNT" -eq 0 ]]; then exit 1; fi
RAND=$(shuf -i 0-$(($COUNT - 1)) -n 1)
if [[ "$COUNT" -eq 0 ]]; then
cp -f "${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/backgrounds/nixos/nixos-wallpaper.png" "$BG_LINK"
echo "${pkgs.nixos-artwork.wallpapers.simple-dark-gray}/share/backgrounds/nixos/nixos-wallpaper.png" > "$LAST_WALLPAPER"
chown lightdm:lightdm "$BG_LINK" "$LAST_WALLPAPER"
exit 0
fi
RAND=$(${pkgs.coreutils}/bin/shuf -i 0-$(($COUNT - 1)) -n 1)
SELECT=''${WALLPAPERS[$RAND]}
ln -sf "$SELECT" "$BG_LINK"
cp -f "$SELECT" "$BG_LINK"
echo "$SELECT" > "$LAST_WALLPAPER"
chown lightdm:lightdm "$BG_LINK" "$LAST_WALLPAPER"
'';
in {
services.xserver.enable = true;
@ -31,7 +38,7 @@ in {
extraPackages = with pkgs; [
dmenu
i3status
i3lock
i3lock-color
i3blocks
picom
feh
@ -42,6 +49,10 @@ in {
xsettingsd
];
extraSessionCommands = ''
if [ -f /var/lib/lightdm-background/.last-wallpaper ]; then
${pkgs.feh}/bin/feh --bg-fill "$(cat /var/lib/lightdm-background/.last-wallpaper)"
fi
export GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas"
${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"
@ -64,7 +75,7 @@ in {
services.xserver.displayManager.lightdm = {
enable = true;
background = "/var/lib/lightdm-background/current-wallpaper.png";
background = "/var/lib/lightdm-background/random-wallpaper.png";
greeters.gtk = {
enable = true;
theme = {
@ -91,17 +102,21 @@ in {
systemd.tmpfiles.rules = [
"d /var/lib/lightdm-background 0755 lightdm lightdm - -"
"L+ /var/lib/lightdm-background/current-wallpaper.png - - - - ${builtins.elemAt wallpapers 0}"
"d ${wallpaperDir} 0755 cobray users - -"
"f /var/log/random-wallpaper.log 0644 root root - -"
];
systemd.services.random-wallpaper = {
description = "Update wallpaper to a random image";
before = ["display-manager.service"];
wantedBy = ["display-manager.service"];
serviceConfig = {
Type = "oneshot";
ExecStart = "${randomWallpaper}";
User = "root";
};
};
systemd.timers.random-wallpaper = {
description = "Daily wallpaper refresh for LightDM";
wantedBy = ["timers.target"];
@ -134,18 +149,18 @@ in {
[Settings]
gtk-application-prefer-dark-theme=1
gtk-theme-name=Tokyonight-Dark
gtk-icon-theme-name="candy-icons"
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="candy-icons"
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
'';
};
@ -164,6 +179,9 @@ in {
adwaita-icon-theme
kdePackages.breeze-icons
gnome-themes-extra
findutils
coreutils
feh
];
environment.pathsToLink = [
@ -175,6 +193,9 @@ in {
{
name = "xfce+i3";
start = ''
if [ -f /var/lib/lightdm-background/.last-wallpaper ]; then
${pkgs.feh}/bin/feh --bg-fill "$(cat /var/lib/lightdm-background/.last-wallpaper)"
fi
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

5
modules/ld.nix Normal file
View file

@ -0,0 +1,5 @@
{
programs.nix-ld = {
enable = true;
};
}

View file

@ -1,6 +1,5 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
networkmanager_dmenu
networkmanagerapplet
];

View file

@ -2,14 +2,17 @@
nixpkgs.config.allowUnfree = true;
programs.nix-index.enable = true;
programs.command-not-found.enable = false;
nix.settings = {
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
substituters = [
"https://cache.nixos.org"
"https://nix-gaming.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
];
};
}

View file

@ -1,18 +1,7 @@
{
config,
pkgs,
lib,
...
}: let
py = pkgs.python311Packages;
gccLibPath = "${pkgs.gcc-unwrapped.lib}/lib";
nvidiaLibPath = "${pkgs.linuxPackages.nvidia_x11}/lib";
cudaLibPath = "${pkgs.cudatoolkit}/lib";
glvndLibPath = "${pkgs.libglvnd}/lib";
ldLibraryPath = "${gccLibPath}:${nvidiaLibPath}:${cudaLibPath}:${glvndLibPath}";
pythonEnv = pkgs.python311.buildEnv.override {
extraLibs = with py; [
numpy
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
(python311.withPackages (ps:
with ps; [
i3ipc
requests
ipython
@ -27,35 +16,10 @@
libcst
wheel
jupyterlab
];
extraOutputsToInstall = ["out"];
postBuild = ''
wrapProgram $out/bin/python \
--prefix LD_LIBRARY_PATH : "${ldLibraryPath}"
'';
};
custom-UV = pkgs.symlinkJoin {
name = "uv";
paths = [pkgs.uv];
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/uv \
--prefix LD_LIBRARY_PATH : "${ldLibraryPath}" \
--set PYTHONPATH ""
'';
};
in {
options.python = {
enable = lib.mkEnableOption "System Python Environment";
};
config = lib.mkIf config.python.enable {
environment.systemPackages = with pkgs; [
pythonEnv
datasets
]))
isort
custom-UV
git
stdenv.cc.cc.lib
uv
python311
];
};
}

View file

@ -1,8 +1,6 @@
{pkgs, ...}: {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
# apparently enabling this makes big picture boot up, does not work on nvidia however
# gamescopeSession.enable = true;
extraCompatPackages = [
@ -28,7 +26,6 @@
piper
portaudio
alsa-lib
stdenv.cc.cc.lib
libglvnd
];
}

View file

@ -37,7 +37,7 @@
src = pkgs.fetchgit {
url = "https://github.com/RPCS3/rpcs3.git";
rev = rpcs3_latest.rev;
sha256 = "sha256-0TDxSNMk9L4+ouxYzWFNi3XxPAyD43Xl32hz1T4lFIc=";
sha256 = "sha256-l7ewWWbFWaziBGrWUMdmSn79tq1Sumnqvjcqr1LYfhU=";
fetchSubmodules = true;
};
patches = [];