refactor
This commit is contained in:
12
packages/common/default.nix
Normal file
12
packages/common/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
files = builtins.removeAttrs (builtins.readDir ./.) [ "default.nix" ];
|
||||
|
||||
# Import all other .nix files as modules
|
||||
moduleFiles = builtins.map (fname: ./. + "/${fname}") (builtins.attrNames files);
|
||||
in
|
||||
{
|
||||
# Import all the package modules
|
||||
imports = moduleFiles;
|
||||
}
|
||||
93
packages/common/packages.nix
Normal file
93
packages/common/packages.nix
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
pkgs,
|
||||
hostname,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# General packages
|
||||
git
|
||||
onefetch
|
||||
gnupg
|
||||
gh
|
||||
nixfmt-rfc-style
|
||||
nixd
|
||||
nil
|
||||
wget
|
||||
fastfetch
|
||||
_1password-cli
|
||||
|
||||
# Package management
|
||||
devbox
|
||||
|
||||
# Development SDKs/Toolkits
|
||||
gcc
|
||||
pkg-config
|
||||
gnumake
|
||||
stdenv.cc
|
||||
act # GitHub Actions CLI
|
||||
|
||||
# File and directory operations
|
||||
eza # Modern ls
|
||||
bat # Modern cat
|
||||
broot # Interactive directory navigator
|
||||
du-dust # Modern du
|
||||
duf # Modern df
|
||||
zip
|
||||
unzip
|
||||
glances # Advanced system monitoring tool
|
||||
procs # Modern ps
|
||||
hyperfine # Benchmarking tool
|
||||
|
||||
# Search and text processing
|
||||
ripgrep # Modern grep
|
||||
sd # Modern sed
|
||||
choose # Modern cut
|
||||
jq # JSON processor
|
||||
yq # YAML processor
|
||||
xan # CSV processor (xsv is no longer maintained)
|
||||
ncdu # Disk usage analyzer
|
||||
|
||||
# System monitoring and process management
|
||||
procs # Modern ps
|
||||
hyperfine # Benchmarking tool
|
||||
bandwhich # Network utilization tool
|
||||
doggo # Modern dig
|
||||
gping # Ping with graph
|
||||
htop # Interactive process viewer
|
||||
|
||||
# Development utilities
|
||||
delta # Better git diff
|
||||
difftastic # Structural diff tool
|
||||
fzf # Fuzzy finder
|
||||
tokei # Code statistics
|
||||
tealdeer # Modern tldr client
|
||||
lazygit # Terminal UI for git
|
||||
|
||||
# Shell and terminal
|
||||
starship # Cross-shell prompt
|
||||
blesh # Bash ble.sh
|
||||
zellij # Modern terminal multiplexer
|
||||
screen # Terminal multiplexer
|
||||
|
||||
# File viewers and processors
|
||||
hexyl # Modern hexdump
|
||||
chafa # Terminal image viewer
|
||||
glow # Markdown renderer
|
||||
|
||||
# Editors
|
||||
neovim
|
||||
## Neovim plugins
|
||||
vimPlugins.LazyVim
|
||||
|
||||
nano
|
||||
micro
|
||||
|
||||
# Lolz
|
||||
fortune
|
||||
cowsay
|
||||
cmatrix
|
||||
figlet
|
||||
lolcat
|
||||
];
|
||||
}
|
||||
49
packages/common/secrets.nix
Normal file
49
packages/common/secrets.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ config, hostname, ... }:
|
||||
{
|
||||
config.programs.onepassword-secrets = {
|
||||
enable = true;
|
||||
tokenFile = "${config.home.homeDirectory}/.op_sat";
|
||||
secrets = {
|
||||
mennos2025Pem = {
|
||||
reference = "op://Dotfiles/Fallback SSH Key/private key";
|
||||
path = ".ssh/mennos-2025.pem";
|
||||
mode = "0600";
|
||||
};
|
||||
mennos2025Pub = {
|
||||
reference = "op://Dotfiles/Fallback SSH Key/public key";
|
||||
path = ".ssh/mennos-2025.pub";
|
||||
mode = "0644";
|
||||
};
|
||||
workWgVPn = {
|
||||
reference = "op://Dotfiles/Work VPN/config";
|
||||
path = ".config/wireguard/work-vpn.conf";
|
||||
mode = "0600";
|
||||
};
|
||||
authorizedKeysForHost = {
|
||||
reference = "op://Dotfiles/Authorized Keys/${hostname}";
|
||||
path = ".ssh/authorized_keys";
|
||||
mode = "0644";
|
||||
};
|
||||
personalSshConf = {
|
||||
reference = "op://Dotfiles/SSH Configs/personal";
|
||||
path = ".ssh/config.d/personal.conf";
|
||||
mode = "0644";
|
||||
};
|
||||
workDevSshConf = {
|
||||
reference = "op://Dotfiles/SSH Configs/work-dev";
|
||||
path = ".ssh/config.d/work-dev.conf";
|
||||
mode = "0644";
|
||||
};
|
||||
workProdSshConf = {
|
||||
reference = "op://Dotfiles/SSH Configs/work-prod";
|
||||
path = ".ssh/config.d/work-prod.conf";
|
||||
mode = "0644";
|
||||
};
|
||||
tradawarePem = {
|
||||
reference = "op://Dotfiles/Tradaware TransIP PEM/pem";
|
||||
path = ".config/tradaware.pem";
|
||||
mode = "0600";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
12
packages/server/default.nix
Normal file
12
packages/server/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
files = builtins.removeAttrs (builtins.readDir ./.) [ "default.nix" ];
|
||||
|
||||
# Import all other .nix files as modules
|
||||
moduleFiles = builtins.map (fname: ./. + "/${fname}") (builtins.attrNames files);
|
||||
in
|
||||
{
|
||||
# Import all the package modules
|
||||
imports = moduleFiles;
|
||||
}
|
||||
6
packages/server/packages.nix
Normal file
6
packages/server/packages.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ddrescue
|
||||
];
|
||||
}
|
||||
15
packages/workstation/default.nix
Normal file
15
packages/workstation/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
files = builtins.removeAttrs (builtins.readDir ./.) [
|
||||
"default.nix"
|
||||
"fix-electron-apps.sh"
|
||||
];
|
||||
|
||||
# Import all other .nix files as modules
|
||||
moduleFiles = builtins.map (fname: ./. + "/${fname}") (builtins.attrNames files);
|
||||
in
|
||||
{
|
||||
# Import all the package modules
|
||||
imports = moduleFiles;
|
||||
}
|
||||
29
packages/workstation/fix-electron-apps.sh
Normal file
29
packages/workstation/fix-electron-apps.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "=============================================="
|
||||
echo "Electron chrome-sandbox permission fixer"
|
||||
echo "=============================================="
|
||||
echo "This script requires sudo permissions to fix"
|
||||
echo "Electron app permissions."
|
||||
echo ""
|
||||
|
||||
# Find all electron sandbox paths
|
||||
echo "Finding Electron chrome-sandbox instances..."
|
||||
SANDBOX_PATHS=$(find /nix/store -name chrome-sandbox -type f -executable 2>/dev/null)
|
||||
|
||||
if [ -n "$SANDBOX_PATHS" ]; then
|
||||
count=$(echo "$SANDBOX_PATHS" | wc -l)
|
||||
echo "Found $count chrome-sandbox instances"
|
||||
|
||||
# If we get here, we're running with sudo
|
||||
echo "$SANDBOX_PATHS" | while read -r SANDBOX_PATH; do
|
||||
if [ -e "$SANDBOX_PATH" ]; then
|
||||
echo "Setting permissions for $SANDBOX_PATH"
|
||||
sudo chown root:root "$SANDBOX_PATH" || echo "Failed to set owner for $SANDBOX_PATH"
|
||||
sudo chmod 4755 "$SANDBOX_PATH" || echo "Failed to set permissions for $SANDBOX_PATH"
|
||||
fi
|
||||
done
|
||||
echo "All permissions set successfully"
|
||||
else
|
||||
echo "Could not find any Electron chrome-sandbox paths"
|
||||
fi
|
||||
66
packages/workstation/packages.nix
Normal file
66
packages/workstation/packages.nix
Normal file
@@ -0,0 +1,66 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
# Create a script to fix electron apps
|
||||
fix-electron-apps = pkgs.writeScriptBin "fix-electron-apps" (
|
||||
builtins.readFile ./fix-electron-apps.sh
|
||||
);
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Custom scripts
|
||||
fix-electron-apps
|
||||
|
||||
# GUI Application
|
||||
## Utilities
|
||||
tea # A Gitea official CLI client
|
||||
pinta # Paint.NET alternative
|
||||
smile # Emoji picker
|
||||
deja-dup # Backup tool
|
||||
sqlitebrowser # SQLite database manager
|
||||
gparted # Used to nuke Windows off of my system
|
||||
rpi-imager # Raspberry Pi OS image writer
|
||||
pavucontrol # PulseAudio volume control
|
||||
qrencode # qr code generator
|
||||
grimblast # Screenshot tool
|
||||
gpredict # Satellite tracking
|
||||
scrcpy
|
||||
|
||||
## Multimedia
|
||||
plex-media-player
|
||||
vlc
|
||||
|
||||
## Astronomy
|
||||
stellarium
|
||||
|
||||
## Games
|
||||
### Open-source games
|
||||
openra
|
||||
mindustry
|
||||
|
||||
### Game utilities
|
||||
protonup-qt
|
||||
protontricks
|
||||
|
||||
### Virtualization
|
||||
virt-manager
|
||||
virt-viewer
|
||||
];
|
||||
|
||||
# Fix for all Electron apps' chrome-sandbox
|
||||
home.activation.fixElectronChromeSandbox = ''
|
||||
echo ""
|
||||
echo "=============================================="
|
||||
echo "IMPORTANT: Electron Applications Notice"
|
||||
echo "=============================================="
|
||||
echo "Some Electron applications (like Vesktop) may need"
|
||||
echo "special permissions to run correctly."
|
||||
echo ""
|
||||
echo "If you encounter issues with Electron apps, run:"
|
||||
echo " fix-electron-apps"
|
||||
echo ""
|
||||
echo "This command will properly set permissions on all"
|
||||
echo "Electron sandbox files in your system."
|
||||
echo "=============================================="
|
||||
echo ""
|
||||
'';
|
||||
}
|
||||
6
packages/workstation/php.nix
Normal file
6
packages/workstation/php.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
php83
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user