NVIDIA drivers and some nfs stuff

This commit is contained in:
xbazzi 2025-07-13 18:05:45 -06:00
parent e35fc32701
commit 47a006cb6f
10 changed files with 160 additions and 66 deletions

73
flake.lock generated
View File

@ -143,11 +143,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743550720, "lastModified": 1751413152,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5", "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -218,11 +218,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1751824240, "lastModified": 1752449767,
"narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=", "narHash": "sha256-P8mQIrgIImASTlNkHPfKwGTmyZgku8EUt6cF52s3N/Y=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fd9e55f5fac45a26f6169310afca64d56b681935", "rev": "1a4d8ffd320c2393b72e7ebc5b647122d5703056",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -259,11 +259,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1751637120, "lastModified": 1751984180,
"narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=", "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3", "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -298,15 +298,14 @@
"nixpkgs": [ "nixpkgs": [
"stylix", "stylix",
"nixpkgs" "nixpkgs"
], ]
"treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1748730660, "lastModified": 1751906969,
"narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=", "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb", "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -392,11 +391,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1751840923, "lastModified": 1752449117,
"narHash": "sha256-4HZxn+PrWytrWVg5c5SEetv3m9/k7rngJq27zKuRIfo=", "narHash": "sha256-Cn24ySH/LN/Q/SsDhpOX4cTMYZa1JMOLNeNsoYqcZpY=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "5259682ce58d935f248297bf1c9793a5cee0787e", "rev": "d683e35fa5ec8bbfd45d52e4b53c7b91f7b38d06",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -456,11 +455,11 @@
"tinted-schemes": { "tinted-schemes": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1748180480, "lastModified": 1750770351,
"narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=", "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "schemes", "repo": "schemes",
"rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31", "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -472,11 +471,11 @@
"tinted-tmux": { "tinted-tmux": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1748740859, "lastModified": 1751159871,
"narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=", "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "tinted-tmux", "repo": "tinted-tmux",
"rev": "57d5f9683ff9a3b590643beeaf0364da819aedda", "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -488,11 +487,11 @@
"tinted-zed": { "tinted-zed": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1725758778, "lastModified": 1751158968,
"narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "base16-zed", "repo": "base16-zed",
"rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", "rev": "86a470d94204f7652b906ab0d378e4231a5b3384",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -500,28 +499,6 @@
"repo": "base16-zed", "repo": "base16-zed",
"type": "github" "type": "github"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"stylix",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -24,10 +24,42 @@
# Mouse works as expected # Mouse works as expected
set-option -g mouse on set-option -g mouse on
# easy-to-remember split pane commands # easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}" bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}"
# Set prefix to ctrl+a
set -g prefix C-a
# Remove old prefix
unbind C-b
# Send Ctrl+a to applications by pressing it twice
bind C-a send-prefix
# Vim bindings
set-option -g mode-keys vi
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Mouse mode ON
set -g mouse on
# Use vi keys
set-window-option -g mode-keys vi
set-option -g mode-keys vi
# Use system clipboard
bind-key -T copy-move-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel --clipboard --input"
''; '';
}; };

View File

@ -19,6 +19,7 @@
# #
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
TERM = "xterm-kitty";
}; };
home.sessionPath = [ home.sessionPath = [

View File

@ -9,7 +9,9 @@
autosuggestion.enable = true; autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
initExtra = '' initExtra = ''
export TERM=xterm-kitty
bindkey -e bindkey -e
function y() { function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp" yazi "$@" --cwd-file="$tmp"
@ -18,16 +20,19 @@
fi fi
rm -f -- "$tmp" rm -f -- "$tmp"
} }
function repos() { function repos() {
eza -ld ~/repos/* --color=never | \ eza -ld ~/repos/* --color=never | \
awk '{print $7}' | \ awk '{print $7}' | \
fzf --reverse | xargs -I{} code {} -n && exit fzf --reverse | xargs -I{} code {} -n && exit
} }
function home() { function home() {
eza -ld ~/* --color=never | \ eza -ld ~/* --color=never | \
awk '{print $7}' | \ awk '{print $7}' | \
fzf --reverse | xargs -I{} code {} -n && exit fzf --reverse | xargs -I{} code {} -n && exit
} }
function makerole() { function makerole() {
mkdir -p "roles/$1/tasks" mkdir -p "roles/$1/tasks"
mkdir -p "roles/$1/defaults" mkdir -p "roles/$1/defaults"
@ -36,7 +41,53 @@
touch "roles/$1/tasks/main.yml" touch "roles/$1/tasks/main.yml"
touch "roles/$1/defaults/main.yml" touch "roles/$1/defaults/main.yml"
} }
function ansible-edit() {
ROOT_DIR="$HOME/repos/ansible-on-prem/inventory"
FINAL_PATH=$(find $ROOT_DIR -name "*$1*.yml" -type f)
EDITOR='code --wait' \
ansible-vault edit "$FINAL_PATH" \
--vault-password-file "$HOME/.ansible-vault-key"
# case "$1" in
# group_vars)
# EDITOR='code --wait'\
# ansible-vault edit \
# /home/xbazzi/repos/ansible-on-prem/inventory/group_vars/all.yml
# ;;
# hosts)
# EDITOR='code --wait'\
# ansible-vault edit \
# /home/xbazzi/repos/ansible-on-prem/inventory/hosts.yml
# ;;
# pve1)
# EDITOR='code --wait'\
# ansible-vault edit \
# /home/xbazzi/repos/ansible-on-prem/inventory/host_vars/pve1.yml
# ;;
# pve2)
# EDITOR='code --wait'\
# ansible-vault edit \
# /home/xbazzi/repos/ansible-on-prem/inventory/host_vars/pve2.yml
# ;;
# pve3)
# EDITOR='code --wait'\
# ansible-vault edit \
# /home/xbazzi/repos/ansible-on-prem/inventory/host_vars/pve3.yml
# ;;
# prod3)
# EDITOR='code --wait'\
# ansible-vault edit \
# /home/xbazzi/repos/ansible-on-prem/inventory/host_vars/prod3.yml
# ;;
# *)
# echo "Usage: ansible-edit {group_vars|hosts|pve1|pve2|pve3}"\
# return 1
# ;;
# esac
}
''; '';
history.size = 10000; history.size = 10000;
history.ignoreAllDups = true; history.ignoreAllDups = true;
history.path = "$HOME/.zsh_history"; history.path = "$HOME/.zsh_history";
@ -47,6 +98,7 @@
flakePath = "~/nixos-config"; flakePath = "~/nixos-config";
in in
{ {
clipboard= "xclip -selection clipboard";
ll = "ls -l"; ll = "ls -l";
update = "sudo nixos-rebuild switch"; update = "sudo nixos-rebuild switch";
la = "ls -lAth"; la = "ls -lAth";
@ -57,6 +109,8 @@
homecfg = "nvim ~/nix/home.nix"; homecfg = "nvim ~/nix/home.nix";
vi = "vim "; vi = "vim ";
sudo = "sudo "; sudo = "sudo ";
edit-groupvars = "EDITOR='code --wait' ansible-vault edit /home/xbazzi/repos/ansible-on-prem/inventory/group_vars/all.yml";
edit-hosts = "EDITOR='code --wait' ansible-vault edit /home/xbazzi/repos/ansible-on-prem/inventory/hosts.yml";
}; };
# plugins = [ # plugins = [

View File

@ -80,7 +80,7 @@
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
# pulse.enable = true; pulse.enable = true;
# If you want to use JACK applications, uncomment this # If you want to use JACK applications, uncomment this
# jack.enable = true; # jack.enable = true;

View File

@ -13,7 +13,7 @@
./yazi.nix ./yazi.nix
./nvidia.nix ./nvidia.nix
./network.nix ./network.nix
./net-drives.nix ./nfs.nix
./packages.nix ./packages.nix
./services.nix ./services.nix
./vscode.nix ./vscode.nix

View File

@ -11,24 +11,22 @@
networking = { networking = {
hostName = "nixos"; hostName = "nixos";
wireless.enable = false; wireless.enable = false;
interfaces.enp6s0f1 = { interfaces.enp6s0f0 = {
ipv4.addresses = [{ ipv4.addresses = [{
address = "10.29.90.110"; address = "10.29.90.100";
prefixLength = 22; prefixLength = 22;
}]; }];
mtu = 9000; mtu = 9000;
}; };
nameservers = [ "10.29.90.1" ];
search = [ "lan.xbazzi.com" ];
defaultGateway = { defaultGateway = {
address = "10.29.90.1"; address = "10.29.90.1";
interface = "enp6s0f0"; interface = "enp6s0f0";
}; };
nameservers = [ "10.29.90.1" ];
search = [ "lan.xbazzi.com" ];
hosts = { hosts = {
"127.0.0.1" = [ "localhost" ]; "127.0.0.1" = [ "localhost" ];
"10.29.90.110" = [ "nixos" ]; "10.29.90.100" = [ "nixos" ];
}; };
}; };

View File

@ -1,11 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
# fileSystems."/mnt/media" = {
# device = "nas.lan.xbazzi.com:/mnt/ALEXANDRIA/media";
# fsType = "nfs";
# };
fileSystems."/mnt/os-images" = { fileSystems."/mnt/os-images" = {
device = "nas.lan.xbazzi.com:/mnt/ALEXANDRIA/os-images"; device = "nas.lan.xbazzi.com:/mnt/ALEXANDRIA/os-images";
@ -16,6 +11,15 @@
]; ];
}; };
fileSystems."/mnt/docker-shared" = {
device = "nas:/mnt/ALEXANDRIA/docker-shared";
fsType = "nfs";
options = [
"rw"
"vers=4"
];
};
fileSystems."/mnt/media" = { fileSystems."/mnt/media" = {
device = "nas.lan.xbazzi.com:/mnt/ALEXANDRIA/media"; device = "nas.lan.xbazzi.com:/mnt/ALEXANDRIA/media";
fsType = "nfs"; fsType = "nfs";

View File

@ -46,6 +46,7 @@
linuxPackages_latest.perf linuxPackages_latest.perf
minicom minicom
wireshark wireshark
trash-cli
]; ];
programs.nix-ld.enable = true; programs.nix-ld.enable = true;

View File

@ -11,8 +11,8 @@
IdentityFile ~/.ssh/lan_id_ed25519 IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes IdentitiesOnly yes
Host db1 Host db1-mgmt
HostName db1 HostName db1-mgmt
ForwardAgent yes ForwardAgent yes
User xbazzi User xbazzi
Port 22 Port 22
@ -20,6 +20,15 @@
IdentityFile ~/.ssh/lan_id_ed25519 IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes IdentitiesOnly yes
Host gitgud.foo
HostName prod1.lan.xbazzi.com
User git
Port 2222
PubkeyAuthentication yes
ForwardAgent yes
IdentitiesOnly yes
IdentityFile ~/.ssh/gt_id_ed25519
Host prod1 Host prod1
HostName prod1 HostName prod1
ForwardAgent yes ForwardAgent yes
@ -29,8 +38,26 @@
IdentityFile ~/.ssh/lan_id_ed25519 IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes IdentitiesOnly yes
Host prod3 Host prod3-mgmt
HostName prod3 HostName prod3-mgmt
ForwardAgent yes
Port 22
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod2-mgmt
HostName prod2-mgmt
ForwardAgent yes
Port 22
User xbazzi
PubkeyAuthentication yes
IdentityFile ~/.ssh/lan_id_ed25519
IdentitiesOnly yes
Host prod2
HostName prod2
ForwardAgent yes ForwardAgent yes
Port 22 Port 22
User xbazzi User xbazzi