Squash merge dev into master

This commit is contained in:
alsaiduq-lab 2025-06-01 07:14:51 -06:00
parent a009895ea0
commit cc87e2cb60
28 changed files with 294 additions and 256 deletions

24
flake.lock generated
View file

@ -25,11 +25,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1748487945, "lastModified": 1748665073,
"narHash": "sha256-e9zc/rHdoH9i+sFFhhQiKoF6IuD+T2rB/nUyPaO7CCg=", "narHash": "sha256-RMhjnPKWtCoIIHiuR9QKD7xfsKb3agxzMfJY8V9MOew=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0d13ea58d565d3c1c1468ddae1f623316dc395d9", "rev": "282e1e029cb6ab4811114fc85110613d72771dea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -47,11 +47,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1748397391, "lastModified": 1748656608,
"narHash": "sha256-g2quQIkkDOHFMipUOBs7+D3xr490slZp9qiamOkPzO4=", "narHash": "sha256-VU+8/kZ57Y7XTmgMBpybGMxO/elvUn/4yMndZji2pY8=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "39bae253dc201cfe03ee53bd90ed813f89afa9cd", "rev": "b585487bb87faec1c7a09aada7cfe77dd7b3c5fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -62,11 +62,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1748302896, "lastModified": 1748437600,
"narHash": "sha256-ixMT0a8mM091vSswlTORZj93WQAJsRNmEvqLL+qwTFM=", "narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7848cd8c982f7740edf76ddb3b43d234cb80fc4d", "rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -102,11 +102,11 @@
"rpcs3_latest": { "rpcs3_latest": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1748477272, "lastModified": 1748720164,
"narHash": "sha256-PTjLS+vIo/K+Eggib4u6LzAidTFiHNh2ALAE3bpylA4=", "narHash": "sha256-MaQWMp4V92c1mszgqvrbcbAOaqhZLqj75i8950PwNLI=",
"owner": "RPCS3", "owner": "RPCS3",
"repo": "rpcs3", "repo": "rpcs3",
"rev": "a9df046f21d11b4e7758401bed47d2cad402c294", "rev": "c437fe9ff052f69c3d151a98e22cd77d3d9e013e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -24,10 +24,12 @@
... ...
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
customPkgs = import "${self}/pkgs" {
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
customFontPkgs = import "${self}/pkgs/fonts" {inherit pkgs;};
customPkgs = import "${self}/pkgs" {
inherit pkgs;
lib = nixpkgs.lib; lib = nixpkgs.lib;
inherit rpcs3_latest; inherit rpcs3_latest customFontPkgs;
}; };
in { in {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
@ -47,6 +49,8 @@
pugixml pugixml
SDL3 SDL3
rpcs3_latest rpcs3_latest
clear-sans
binary-font
; ;
}) })
]; ];

View file

@ -16,6 +16,8 @@
./modules/zellij.nix ./modules/zellij.nix
./modules/ffmpeg.nix ./modules/ffmpeg.nix
./modules/emulators.nix ./modules/emulators.nix
./modules/discord.nix
./modules/brave.nix
]; ];
home.username = "cobray"; home.username = "cobray";
@ -28,7 +30,6 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
coreutils coreutils
gnused gnused
gnugrep
findutils findutils
yazi yazi
htop htop

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
programs.brave = {
enable = true;
package = pkgs.brave;
};
}

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
home.packages = with pkgs; [
discord
vesktop
];
}

View file

@ -1,7 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
mgba mgba
desmume desmume
@ -9,7 +6,7 @@
pcsx2 pcsx2
ryujinx ryujinx
mupen64plus mupen64plus
dolphin-emu dolphin-emu # might remove. causes a long time to build
retroarch retroarch
mednafen mednafen
joycond joycond

View file

@ -1,14 +1,10 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
fish-rust fish-rust
starship
fzf fzf
bat bat
eza eza
fd fd
ripgrep ugrep
]; ];
} }

View file

@ -1,15 +1,16 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
lazygit lazygit
git
git-lfs
gitAndTools.gh
gitAndTools.diff-so-fancy
]; ];
programs.git = { programs.git = {
enable = true; enable = true;
includes = [ includes = [
{ path = "./.secrets/.git-config"; } {path = "./.secrets/.git-config";}
]; ];
extraConfig = { extraConfig = {
credential.helper = "store --file ./.secrets/.git-credentials"; credential.helper = "store --file ./.secrets/.git-credentials";

View file

@ -6,18 +6,39 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim neovim
gnugrep gnugrep
fd
fzf
nodejs
gcc
git git
luajit luajit
luaPackages.luarocks luaPackages.luarocks
gopls
haskell-language-server
jdt-language-server
clang-tools
vscode-langservers-extracted
marksman
nil nil
lua-language-server taplo
yaml-language-server
sqls
alejandra
stylua
shfmt
yamlfmt
luaPackages.luacheck
yamllint
hadolint
shellcheck
cppcheck
rubocop
phpPackages.php-codesniffer
phpPackages.phpstan
checkstyle
tflint
sqlfluff
tree-sitter
luajitPackages.jsregexp
jq
curl curl
unzip unzip
alejandra
]; ];
home.sessionVariables = { home.sessionVariables = {

View file

@ -1,7 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
picom picom
]; ];

View file

@ -1,6 +1,3 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
home.packages = pkgs.polybar.all; home.packages = pkgs.polybar.all;
} }

View file

@ -5,7 +5,7 @@
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./local-packages.nix ./system-packages.nix
../modules/default.nix ../modules/default.nix
]; ];

View file

@ -1,153 +0,0 @@
# TODO: cleanout and repopulate individual packages better
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
brave # TODO: make a module to save browser stuff
vesktop
discord
obs-studio
spotify
flameshot
mpv
linuxHeaders
appimage-run
freetype.dev
zed-editor
pixman
udiskie
maim
git
git-lfs
gitAndTools.gh
gitAndTools.diff-so-fancy
lazygit
lazydocker
mercurial
nodejs
nodePackages.pnpm
nodePackages.typescript
yarn
bun
deno
obsidian
go
go-tools
gopls
rustc
rustup
cargo-edit
cargo-watch
cargo-outdated
cargo-audit
rust-analyzer
python3Packages.debugpy
gcc
stdenv.cc.cc.lib
gnumake
cmake
ninja
binutils
gdb
pkg-config
autoconf
automake
libtool
nasm
elixir
swift
zig
dbus.dev
pkg-config
ghc
cacert
cabal-install
stack
haskell-language-server
jdk17
maven
gradle
visualvm
jdt-language-server
clang-tools
vscode-langservers-extracted
nodePackages.eslint
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
rubocop
phpPackages.php-codesniffer
phpPackages.phpstan
checkstyle
tflint
sqlfluff
wget
curl
tree
mesa
libglvnd
socat
gnused
gawk
nmap
psmisc
ugrep
unzip
starship
htop
btop
nvtopPackages.full
fd
fzf
jq
bash
xorg.xdpyinfo
slop
dunst
pulseaudio
yt-dlp # might remove for source built version
httpie
wrk
cloudflared
hashcat
nix-prefetch-git
openssl
openssl.dev
libxml2
zlib
zlib.dev
postgresql
sqlite
redis
sqls
tree-sitter
luajitPackages.jsregexp
tailscale
cachix
portaudio
xorg.libX11
xorg.libXtst
xorg.libXi
xorg.xorgproto
texlive.combined.scheme-full
imagemagick
poppler_utils
ghostscript
];
}

80
hosts/system-packages.nix Normal file
View file

@ -0,0 +1,80 @@
# TODO: cleanout and repopulate individual packages better
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
obs-studio
spotify
flameshot
mpv
linuxHeaders
appimage-run
freetype.dev
zed-editor
pixman
udiskie
maim
mercurial
obsidian
go
go-tools
gopls
gcc
gnumake
cmake
ninja
binutils
gdb
pkg-config
autoconf
automake
libtool
nasm
elixir
swift
zig
dbus.dev
pkg-config
ghc
cacert
cabal-install
stack
jdk17
maven
gradle
visualvm
wget
curl
tree
mesa
libglvnd
socat
gawk
nmap
psmisc
unzip
fd
jq
bash
slop
yt-dlp # might remove for source built version
httpie
wrk
cloudflared
hashcat
nix-prefetch-git
openssl
openssl.dev
libxml2
zlib
zlib.dev
postgresql
sqlite
redis
sqls
luajitPackages.jsregexp
cachix
texlive.combined.scheme-full
imagemagick
poppler_utils
ghostscript
];
}

6
modules/cups.nix Normal file
View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
services.printing = {
enable = true;
drivers = with pkgs; [cups-filters];
};
}

View file

@ -6,7 +6,6 @@
./docker.nix ./docker.nix
./env.nix ./env.nix
./fonts.nix ./fonts.nix
./i3-xfce.nix
./net.nix ./net.nix
./nixos.nix ./nixos.nix
./nvidia.nix ./nvidia.nix
@ -18,16 +17,14 @@
./tailscale.nix ./tailscale.nix
./udiskie.nix ./udiskie.nix
./ld.nix ./ld.nix
./rust.nix
./x11.nix
./i3-xfce.nix
./ollama.nix
./cups.nix
]; ];
services.ollama = { npm.enable = true;
enable = true;
acceleration = "cuda";
loadModels = [];
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.

View file

@ -8,5 +8,6 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
docker docker
docker-compose docker-compose
lazydocker
]; ];
} }

View file

@ -1,17 +1,4 @@
{pkgs, ...}: let {pkgs, ...}: {
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
@ -19,26 +6,12 @@ in {
noto-fonts-cjk-serif noto-fonts-cjk-serif
noto-fonts-emoji noto-fonts-emoji
nerd-fonts._0xproto nerd-fonts._0xproto
nerd-fonts.fira-code nerd-fonts-noto
nerd-fonts.jetbrains-mono nerd-fonts-symbols-only
nerd-fonts.hack
nerd-fonts.noto
nerd-fonts.symbols-only
ipafont ipafont
kochi-substitute kochi-substitute
clear-sans clear-sans
(stdenv.mkDerivation { binary-font
name = "binary-clock-font";
src = fetchurl {
url = "https://github.com/jamessouth/polybar-binary-clock-fonts/raw/master/BinaryClockBoldMono.ttf";
sha256 = "0vxy23zr8r8faa5s7vy5bf8z2q7my39ghmd9ilk7aww9wqsrsjqx";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp $src $out/share/fonts/truetype/BinaryClockBoldMono.ttf
'';
})
]; ];
fontconfig = { fontconfig = {
enable = true; enable = true;

View file

@ -1,12 +0,0 @@
{ inputs, pkgs, lib, rpcs3_latest, ... }: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.cobray = import ../home-manager/cobray.nix {
inherit pkgs lib rpcs3_latest;
};
};
}

View file

@ -3,12 +3,14 @@
pkgs, pkgs,
lib, lib,
... ...
}: let }:
npmGlobalDir = "~/.npm-global"; # TODO:bandaid fix for now
let
npmGlobalDir = "/home/cobray/.npm-global";
npmConf = pkgs.writeText "npmrc" '' npmConf = pkgs.writeText "npmrc" ''
prefix=${npmGlobalDir} prefix=${npmGlobalDir}
cache=~/.npm cache=/home/cobray/.npm
init-module=~/.npm-init.js init-module=/home/cobray/.npm-init.js
''; '';
in { in {
options.npm = { options.npm = {
@ -19,6 +21,18 @@ in {
nodejs_22 nodejs_22
nodePackages.npm nodePackages.npm
electron electron
yarn
bun
deno
nodePackages.eslint
nodePackages.prettier
nodePackages.sql-formatter
nodePackages.markdownlint-cli
nodePackages.stylelint
nodePackages.htmlhint
nodePackages.jsonlint
nodePackages.pnpm
nodePackages.typescript
]; ];
environment.variables = { environment.variables = {
PATH = [ PATH = [

7
modules/ollama.nix Normal file
View file

@ -0,0 +1,7 @@
{
services.ollama = {
enable = true;
acceleration = "cuda";
loadModels = [];
};
}

View file

@ -17,9 +17,11 @@
wheel wheel
jupyterlab jupyterlab
datasets datasets
debugpy
])) ]))
isort isort
uv uv
python311 python311
ruff
]; ];
} }

31
modules/rust.nix Normal file
View file

@ -0,0 +1,31 @@
{
config,
pkgs,
lib,
...
}: {
options.rust = {
enable = lib.mkEnableOption "System Rust Environment";
};
config = lib.mkIf config.rust.enable {
environment.systemPackages = with pkgs; [
rustc
rustup
cargo-edit
cargo-watch
cargo-outdated
cargo-audit
rust-analyzer
clippy
minijinja-cli
];
environment.variables = {
PATH = [
"${pkgs.rustc}/bin"
"${pkgs.cargo}/bin"
];
};
};
}

View file

@ -6,7 +6,7 @@ in {
isNormalUser = true; isNormalUser = true;
description = "Mon Aie"; description = "Mon Aie";
extraGroups = ["networkmanager" "wheel" "docker" "video"]; extraGroups = ["networkmanager" "wheel" "docker" "video"];
shell = fish-rust; shell = pkgs.bash;
}; };
security.sudo = { security.sudo = {

12
modules/x11.nix Normal file
View file

@ -0,0 +1,12 @@
# For xorgsisters only
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
xorg.xdpyinfo
slop
xorg.libX11
xorg.libXtst
xorg.libXi
xorg.xorgproto
xclip
];
}

View file

@ -0,0 +1,26 @@
{
pkgs,
lib,
...
}: {
binary-clock-font = pkgs.stden.mkDerivation {
pname = "binary-clock-font";
version = "1.0.0";
src = pkgs.fetchurl {
url = "https://github.com/jamessouth/polybar-binary-clock-fonts/raw/master/BinaryClockBoldMono.ttf";
sha256 = "0vxy23zr8r8faa5s7vy5bf8z2q7my39ghmd9ilk7aww9wqsrsjqx";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp $src $out/share/fonts/truetype/BinaryClockBoldMono.ttf
'';
meta = with lib; {
description = "A monospaced bold font for binary clocks";
homepage = "https://github.com/jamessouth/polybar-binary-clock-fonts";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [cobray];
};
};
}

View file

@ -0,0 +1,26 @@
{
pkgs,
lib,
...
}: {
clear-sans = pkgs.stdenv.mkDerivation {
pname = "clear-sans";
version = "1.0";
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
'';
meta = with lib; {
description = "Clear Sans font";
homepage = "https://github.com/intel/clear-sans";
license = licenses.apache;
maintainers = [cobray];
platforms = platforms.all;
};
};
}

View file

@ -2,6 +2,7 @@
pkgs, pkgs,
lib, lib,
rpcs3_latest, rpcs3_latest,
customFontPkgs,
}: let }: let
rpcs3Pkgs = pkgs.callPackage ./rpcs3 { rpcs3Pkgs = pkgs.callPackage ./rpcs3 {
inherit lib rpcs3_latest; inherit lib rpcs3_latest;
@ -9,4 +10,5 @@
in { in {
inherit (rpcs3Pkgs) pugixml SDL3 rpcs3 rpcs3_latest; inherit (rpcs3Pkgs) pugixml SDL3 rpcs3 rpcs3_latest;
fish-rust = pkgs.callPackage ./fish-rust {}; fish-rust = pkgs.callPackage ./fish-rust {};
inherit (customFontPkgs) clear-sans binary-font;
} }