Compare commits

...

68 Commits

Author SHA1 Message Date
Random936
d50f9e34b4 Added yq, patchelf 2025-12-19 20:08:25 -05:00
Random936
ab8dd6c5af Installed nix-ld to fix dependencies with binaryninja 2025-12-19 19:58:30 -05:00
Random936
89b0c103bf Updated bash scripts 2025-12-14 12:20:37 -05:00
Random936
7aead0fdca Updated nextcloud from 31 to 32 2025-12-01 19:37:54 -05:00
Random936
c1f5cb4462 Updated bash-scripts 2025-12-01 19:27:10 -05:00
Random936
1456872a5d Added sampledb disk for faster storage 2025-12-01 09:58:57 -08:00
Random936
646422cf4c Removed nvidia drivers from AI server config 2025-12-01 12:54:36 -05:00
Random936
a3d669d039 Switched from 25.05 to 25.11 2025-12-01 12:52:31 -05:00
Random936
4d5673f96b Updated media config to fix networking issues with jellyseer 2025-11-29 22:13:07 -05:00
Random936
8ab23d4292 Made git config conditional based on home-manager version 2025-11-29 22:11:31 -05:00
Random936
45619db650 Updated state version for home manager config 2025-11-29 21:24:59 -05:00
Random936
fee45bf0e6 Added imhex to hacking packages; updated flake to fix imhex 2025-11-28 10:38:41 -05:00
Random936
b4dd9407d4 Removed some other darwin related config; switched to brave browser 2025-11-26 20:06:21 -05:00
Random936
94595a0833 Organized hacking packages into categories 2025-11-22 23:02:49 -05:00
Random936
4f945e2c56 Added nix-init to packages 2025-11-21 18:15:31 -05:00
Random936
6e1624b26c Fixed issue with protonmail-bridge path 2025-11-18 20:07:17 -05:00
Random936
8281843816 Added ability to move workspaces to i3 config 2025-11-18 19:35:39 -05:00
Random936
bcbf53f51a Added blueman-manager i3 keybinding 2025-11-16 19:16:29 -05:00
Random936
f070129636 Small updates to readme 2025-11-16 12:51:36 -05:00
Random936
e0d337d56e Removed darwin config; Added unstable systems to config 2025-11-16 11:58:30 -05:00
Random936
ad8b141bfc Updated flake.nix file functions 2025-11-16 11:34:40 -05:00
Random936
5f1438f056 Updated hardware config to use drive labels; added README content 2025-11-12 21:10:03 -05:00
Random936
b540cfd946 Removed game packages; removed binaryninja 2025-11-10 20:38:33 -05:00
Random936
f36f414f51 Added binary ninja personal to repo 2025-10-27 21:44:10 -04:00
Random936
b8459f1967 Added config for rtl-sdr; changed timezone 2025-10-26 10:33:24 -04:00
Random936
ff9fe3ef3f Added a few cargo packages to dev dependencies 2025-09-27 20:52:16 -07:00
Random936
340109e73b Updates for rust develpopment and added ledger back 2025-09-27 11:01:39 -07:00
Random936
325f31cb2a removed ouch since I don't use it 2025-09-09 20:51:06 -07:00
Random936
0db84f7146 Added dysk to bash utilities 2025-09-08 13:34:00 -07:00
Random936
3c9907db9a Removed sampledb HDD from nix config 2025-09-06 18:56:55 -07:00
Random936
05e7664925 Some fixes to logging config after file separation 2025-09-02 20:09:07 -07:00
Random936
6e3ff222ad Moved prometheus and suricata config to separate files 2025-09-02 19:24:01 -07:00
Random936
2973862f44 Changes to AI config 2025-08-28 19:48:28 -07:00
Random936
ef788ec9d1 Added hardware file for sampledb to repo 2025-08-26 21:07:11 -07:00
Random936
60be488679 Updating hardware file for r330-logging 2025-08-26 20:55:37 -07:00
Random936
76f380b38a Updated media hardware/config 2025-08-21 20:50:14 -07:00
Random936
8706141dee Updated flake 2025-08-20 19:19:03 -07:00
Random936
8746d38eef Updated emacs config for new dot-emacs repo 2025-08-04 20:50:09 -07:00
Random936
72d16c4e37 Added svelte support to emacs LSP config 2025-07-31 20:27:05 -07:00
Random936
a4bfdf4748 Updated polybar to include pulseaudio support 2025-07-27 15:35:55 -07:00
Random936
f667cc4c14 Updates to nix config to fix deprecation warnings 2025-07-21 11:02:59 -07:00
Random936
ffa9bc9e3f Removed graylog from logging config 2025-07-20 18:18:40 -07:00
Random936
5e9db649cb Updated flake to 25.05 2025-07-20 18:15:41 -07:00
Random936
f641bbb679 Fixed some atuin config; added cava to packages 2025-07-06 17:34:14 -07:00
Random936
85248a2fba Updated emacs config to use consult-git-grep instead of grep 2025-06-28 15:27:53 -04:00
Random936
018313e48b Added nodejs to emacs deps; updated gitignore 2025-06-08 14:12:26 -07:00
Random936
09cce4e9fd Added new hdd to sampledb 2025-05-08 20:02:49 -07:00
Random936
15beb5de79 Updated flake.lock 2025-05-04 15:00:29 -07:00
Random936
9253338555 Websocket support for open-webui 2025-05-04 14:58:50 -07:00
Random936
e0a8ac3e07 Refactored flake.nix; fixed comma 2025-05-02 13:49:46 -07:00
Random936
741e2ab222 Added comma.nix 2025-05-02 12:16:11 -07:00
Random936
e6b920dee2 Revert "Switched from firefox to librewolf"; fix typo
This reverts commit 8b4eeae6b0.
2025-05-01 21:45:43 -07:00
Random936
8b4eeae6b0 Switched from firefox to librewolf 2025-05-01 21:40:54 -07:00
Random936
1d6d7c9d07 Added start-day alias; updated i3 startup scripts 2025-04-30 18:06:38 -07:00
Random936
46836579f2 Added some more basic zsh aliases 2025-04-29 20:33:28 -07:00
Random936
e2f68e690d Updated i3 config to better load launch bash scripts 2025-04-28 17:05:25 -07:00
Random936
3e3e8034d4 Updated polybar to run on all monitors 2025-04-28 15:59:20 -07:00
Random936
6bf4a7deff Added timer package to linux utils 2025-04-27 21:57:41 -07:00
Random936
7f8a668cef Added google chrome to gui packages to access kinesis clique 2025-04-24 16:42:13 -07:00
Random936
8125fe2bd2 Logging changes: new hdd, removed ideapad instance, graylog 2025-04-15 11:51:07 -07:00
Random936
575ced3c41 Updated nextcloud from 30 to 31 2025-04-14 18:05:39 -07:00
Random936
f9417ef89c Removed picom as it was causing lag 2025-04-14 18:04:56 -07:00
Random936
62e7f73319 Updated sampledb-dev machine to have more HDD space 2025-04-11 20:50:21 -07:00
Random936
6816dc833f Added sdb-client alias 2025-04-11 19:48:46 -07:00
Random936
e74223ae07 Switched from brave browser back to firefox 2025-04-11 16:42:12 -07:00
Random936
c9ba9713a2 Fixed issue with emacs font following flake update 2025-04-11 11:17:06 -07:00
Random936
f83754fb8d Changes to config following flake update 2025-04-11 10:19:04 -07:00
Random936
143e43818a Updated flake.lock 2025-04-11 09:57:10 -07:00
43 changed files with 813 additions and 608 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
**/.*~undo-tree~
**/.DS_Store
/result
/home/result

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "bash-scripts"]
path = bash-scripts
url = gitea@git.randomctf.com:random936/bash-scripts.git

View File

@@ -1,9 +1,58 @@
* Dotfiles Repo
* NixOS Setup for Omen Laptop
Installing the base configuration:
To install these dotfiles, you can use gnu stow. Running the following command will automatically create symlinks for every file in this repo.
#+begin_src bash
git clone https://github.com/Random936/dotfiles
cd dotfiles/
stow .
nix-shell -p vim git
git clone https://git.randomctf.com/random936/dotfiles
sudo nixos-rebuild switch --flake .#randomctf
#+end_src
Install home manager and related packages:
#+begin_src bash
sudo ./install-homemanager.sh 25.05
home-manager switch --extra-experimental-features "nix-command flakes" --flake .#random
#+end_src
** Rbw (Rust Bitwarden) Setup
Before continuing, you will need to login on the [[https://bitwarden.com][Bitwarden]] website to retrieve your API key. This can be found under: Settings > Security > Keys > View API Key.
#+begin_src bash
# Enter the values it asks for from the Bitwarden view API key window.
rbw register
rbw login
rbw unlock
#+end_src
** Mail Setup
Setting up ~pass~:
#+begin_src bash
gpg --full-generate-key
# Copy the value from the output above and use it in the command below.
pass init <GPG_ID>
#+end_src
Setting up ~protonmail-bridge~:
#+begin_src bash
systemctl stop --user protonmail-bridge.service
protonmail-bridge --cli
cert export ~/.config/protonmail/bridge-v3/
login # This might take a while.
info # To get login info. SMTP needs to be added to authinfo.
exit
systemctl start --user protonmail-bridge.service
# Add passwords for protonmail bridge.
pass add "protonmail-bridge" <PASS>
#+end_src
Setting up ~mu4e~:
#+begin_src bash
mu init --maildir=~/.mail --my-address=<email_address>
mbsync -a
#+end_src

1
bash-scripts Submodule

Submodule bash-scripts added at 9190f0dd6a

View File

@@ -13,30 +13,13 @@
users.users.mindforge = import ./user.nix;
# Setup drivers for NVIDIA GPU
services.xserver = {
enable = false;
videoDrivers = [ "nvidia" ];
};
hardware = {
nvidia = {
open = false;
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
nvidiaSettings = true;
};
graphics = {
enable = true;
enable32Bit = true;
};
};
services.ollama = {
enable = true;
acceleration = "cuda";
host = "0.0.0.0";
openFirewall = true;
environmentVariables = {
OLLAMA_CONTEXT_LENGTH = "8192";
};
};
# NGINX Reverse Proxy Setup
@@ -51,8 +34,19 @@
'';
locations."/".extraConfig = ''
proxy_buffering off;
proxy_pass http://localhost:8080/;
# Add WebSocket support (Necessary for version 0.5.0 and up)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
'';
};
};

View File

@@ -31,7 +31,7 @@ vars:
TEREDO_PORTS: 3544
SIP_PORTS: "[5060, 5061]"
default-log-dir: /home/logging/logs
default-log-dir: /mnt/logs/suricata
classification-file: /etc/suricata/classification.config
reference-config-file: /etc/suricata/reference.config
default-rule-path: /etc/suricata/rules
@@ -58,12 +58,14 @@ outputs:
- eve-log:
enabled: yes
filetype: regular
filename: eve.json
filename: eve-%Y-%m-%d.json
rotate-interval: day
types:
- alert:
tagged-packets: yes
- http:
extended: yes
dump-all-headers: both
- http2
- dns:
enabled: yes
@@ -94,7 +96,7 @@ outputs:
- smtp
- pcap-log:
enabled: yes
enabled: no
filename: log.pcap
limit: 1gb
max-files: 200

View File

@@ -1,80 +0,0 @@
{ config, pkgs, lib, ... }: {
nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
git
];
homebrew = {
enable = true;
onActivation.cleanup = "zap";
taps = [
"nikitabobko/tap"
"FelixKratz/formulae"
];
brews = [
"wireguard-tools"
"pinentry-mac"
"sketchybar"
"coreutils"
"watch"
"rbw"
];
casks = [
"font-hack-nerd-font"
"scroll-reverser"
"brave-browser"
"instantview"
"proton-mail"
"flameshot"
"aerospace"
"bitwarden"
"tailscale"
"wireshark"
"ghostty"
"discord"
"barrier"
"zoom"
"plex"
"vlc"
];
};
# Auto upgrade nix package and the daemon service.
nix.package = pkgs.nix;
# Extra activation scripts
system.activationScripts.extraActivation.text = ''
softwareupdate --install-rosetta --agree-to-license
'';
# Keyboard and Mouse
system.keyboard = {
enableKeyMapping = true;
remapCapsLockToEscape = true;
swapLeftCommandAndLeftAlt = true;
};
# MacOS Changes
system = {
startup.chime = false;
defaults = {
dock.autohide = true;
NSGlobalDomain = {
"com.apple.mouse.tapBehavior" = 1;
_HIHideMenuBar = true;
};
};
};
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true;
users.users.jadenmaxwell = {
name = "jadenmaxwell";
home = "/Users/jadenmaxwell";
};
system.stateVersion = 5;
}

View File

@@ -27,11 +27,10 @@
# Setup i3 window manager
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
rofi
polybar
alacritty
polybarFull
i3lock-fancy
xautolock
autorandr
@@ -58,13 +57,6 @@
enable32Bit = true;
};
# Install picom for transparency.
services.picom = {
enable = true;
backend = "glx";
vSync = "opengl-swc";
};
# Install Thunar
programs.thunar.enable = true;
services.gvfs.enable = true;

View File

@@ -1,6 +1,8 @@
{ lib, config, pkgs, inputs, ... }: {
imports = [
./logging/prometheus.nix
./logging/suricata.nix
../hardware/logging.nix
./headless.nix
(import ./networking.nix {
@@ -9,210 +11,47 @@
open_ports = [ 3000 9001 9003 ];
inherit lib;
})
];
networking.firewall.enable = false;
users.users.logging = import ./user.nix;
environment.systemPackages = with pkgs; [
suricata
];
services.grafana = {
enable = true;
settings.server = {
http_addr = "0.0.0.0";
http_addr = "127.0.0.1";
http_port = 3000;
domain = "logging.randomctf.local";
domain = "grafana.randomctf.local";
};
};
services.prometheus.exporters.blackbox = {
enable = true;
port = 9003;
configFile = assets/blackbox.yml;
};
services.prometheus = {
services.nginx = {
enable = true;
port = 9001;
globalConfig.scrape_interval = "10s";
scrapeConfigs = let
node_port = toString config.services.prometheus.exporters.node.port;
blackbox_relabel = [
{
source_labels = [ "__address__" ];
target_label = "__param_target";
}
{
target_label = "__address__";
replacement = "127.0.0.1:9003";
}
];
in [
{
job_name = "node";
static_configs = [
{
targets = [ "127.0.0.1:${node_port}" ];
labels.instance = "r330-logging";
}
{
targets = [ "192.168.100.40:${node_port}" ];
labels.instance = "r330-media";
}
{
targets = [ "192.168.100.42:${node_port}" ];
labels.instance = "sampledb-dev";
}
{
targets = [ "192.168.100.45:${node_port}" ];
labels.instance = "mindforge";
}
{
targets = [ "192.168.100.1:9100" ];
labels.instance = "GL-MT6000";
}
];
}
{
job_name = "blackbox_icmp";
metrics_path = "/probe";
params = { module = ["icmp"]; };
static_configs = [
{
targets = [ "127.0.0.1" ];
labels.instance = "r330-media";
}
{
targets = [ "192.168.100.1" ];
labels.instance = "GL-MT6000";
}
{
targets = [ "192.168.100.11" ];
labels.instance = "r330-idrac";
}
{
targets = [ "192.168.100.12" ];
labels.instance = "r730xd-idrac";
}
{
targets = [ "192.168.100.20" ];
labels.instance = "ideapad";
}
{
targets = [ "192.168.100.21" ];
labels.instance = "r330-proxmox";
}
{
targets = [ "192.168.100.22" ];
labels.instance = "r730xd-proxmox";
}
{
targets = [ "192.168.100.40" ];
labels.instance = "r330-media";
}
{
targets = [ "192.168.100.42" ];
labels.instance = "sampledb-dev";
}
{
targets = [ "192.168.100.42" ];
labels.instance = "sampledb-dev";
}
{
targets = [ "192.168.100.45" ];
labels.instance = "mindforge";
}
{
targets = [ "1.1.1.1" ];
labels.instance = "Cloudflare";
}
{
targets = [ "8.8.8.8" ];
labels.instance = "Google";
}
];
relabel_configs = blackbox_relabel;
}
{
job_name = "blackbox_http_2xx";
metrics_path = "/probe";
params = { module = ["http_2xx"]; };
static_configs = [
{
targets = [ "http://192.168.100.40:6011" ];
labels.instance = "Qbittorrent";
}
{
targets = [ "http://192.168.100.40:7878" ];
labels.instance = "Radarr";
}
{
targets = [ "http://192.168.100.40:8989" ];
labels.instance = "Sonarr";
}
{
targets = [ "http://192.168.100.40:9696" ];
labels.instance = "Prowlarr";
}
{
targets = [ "https://randomctf.com" ];
labels.instance = "RandomCTF.com";
}
{
targets = [ "https://git.randomctf.com" ];
labels.instance = "Gitea";
}
{
targets = [ "https://nextcloud.randomctf.com" ];
labels.instance = "Nextcloud";
}
];
relabel_configs = blackbox_relabel;
}
{
job_name = "blackbox_http_2xx_no_verify";
metrics_path = "/probe";
params = { module = ["http_2xx_tls_no_verify"]; };
static_configs = [
{
targets = [ "https://192.168.100.40:5006" ];
labels.instance = "Actual";
}
];
relabel_configs = blackbox_relabel;
}
];
};
virtualHosts = {
# Grafana
"grafana.randomctf.local" = {
extraConfig = ''
access_log /var/log/nginx/access.grafana.log;
'';
systemd.services.suricata = {
description = "Suricata IDS/IPS";
wantedBy = ["multi-user.target"];
serviceConfig = {
type = "simple";
User = "logging";
ExecStart = "${pkgs.suricata}/bin/suricata -c /etc/suricata.yaml -i enp6s19";
Restart = "on-failure";
CapabilityBoundingSet = "CAP_NET_RAW CAP_NET_ADMIN";
AmbientCapabilities = "CAP_NET_RAW CAP_NET_ADMIN";
locations."/".extraConfig = ''
proxy_set_header Host grafana.randomctf.local;
proxy_pass http://localhost:3000/;
'';
};
# Prometheus
"prometheus.randomctf.local" = {
extraConfig = ''
access_log /var/log/nginx/access.prometheus.log;
'';
locations."/".extraConfig = ''
proxy_pass http://localhost:9090/;
'';
};
};
};
environment.etc."suricata.yaml".source = ./assets/suricata.yaml;
environment.etc."suricata/classification.config".text = ''
'';
environment.etc."suricata/reference.config".text = ''
'';
environment.etc."suricata/threshold.config".text = ''
'';
environment.etc."suricata/rules/suricata.rules".text = ''
'';
}

View File

@@ -0,0 +1,156 @@
{ lib, config, pkgs, inputs, ... }: {
services.prometheus.exporters.blackbox = {
enable = true;
port = 9003;
configFile = ../assets/blackbox.yml;
};
services.prometheus = {
enable = true;
port = 9090;
globalConfig.scrape_interval = "10s";
scrapeConfigs = let
node_port = toString config.services.prometheus.exporters.node.port;
blackbox_relabel = [
{
source_labels = [ "__address__" ];
target_label = "__param_target";
}
{
target_label = "__address__";
replacement = "127.0.0.1:9003";
}
];
in [
{
job_name = "node";
static_configs = [
{
targets = [ "127.0.0.1:${node_port}" ];
labels.instance = "r330-logging";
}
{
targets = [ "192.168.100.40:${node_port}" ];
labels.instance = "r330-media";
}
{
targets = [ "192.168.100.42:${node_port}" ];
labels.instance = "sampledb-dev";
}
{
targets = [ "192.168.100.45:${node_port}" ];
labels.instance = "mindforge";
}
{
targets = [ "192.168.100.1:9100" ];
labels.instance = "GL-MT6000";
}
];
}
{
job_name = "blackbox_icmp";
metrics_path = "/probe";
params = { module = ["icmp"]; };
static_configs = [
{
targets = [ "127.0.0.1" ];
labels.instance = "r330-media";
}
{
targets = [ "192.168.100.1" ];
labels.instance = "GL-MT6000";
}
{
targets = [ "192.168.100.11" ];
labels.instance = "r330-idrac";
}
{
targets = [ "192.168.100.12" ];
labels.instance = "r730xd-idrac";
}
{
targets = [ "192.168.100.21" ];
labels.instance = "r330-proxmox";
}
{
targets = [ "192.168.100.22" ];
labels.instance = "r730xd-proxmox";
}
{
targets = [ "192.168.100.40" ];
labels.instance = "r330-media";
}
{
targets = [ "192.168.100.42" ];
labels.instance = "sampledb-dev";
}
{
targets = [ "192.168.100.42" ];
labels.instance = "sampledb-dev";
}
{
targets = [ "192.168.100.45" ];
labels.instance = "mindforge";
}
{
targets = [ "1.1.1.1" ];
labels.instance = "Cloudflare";
}
{
targets = [ "8.8.8.8" ];
labels.instance = "Google";
}
];
relabel_configs = blackbox_relabel;
}
{
job_name = "blackbox_http_2xx";
metrics_path = "/probe";
params = { module = ["http_2xx"]; };
static_configs = [
{
targets = [ "http://192.168.100.40:6011" ];
labels.instance = "Qbittorrent";
}
{
targets = [ "http://192.168.100.40:7878" ];
labels.instance = "Radarr";
}
{
targets = [ "http://192.168.100.40:8989" ];
labels.instance = "Sonarr";
}
{
targets = [ "http://192.168.100.40:9696" ];
labels.instance = "Prowlarr";
}
{
targets = [ "https://randomctf.com" ];
labels.instance = "RandomCTF.com";
}
{
targets = [ "https://git.randomctf.com" ];
labels.instance = "Gitea";
}
{
targets = [ "https://nextcloud.randomctf.com" ];
labels.instance = "Nextcloud";
}
];
relabel_configs = blackbox_relabel;
}
{
job_name = "blackbox_http_2xx_no_verify";
metrics_path = "/probe";
params = { module = ["http_2xx_tls_no_verify"]; };
static_configs = [
{
targets = [ "https://192.168.100.40:5006" ];
labels.instance = "Actual";
}
];
relabel_configs = blackbox_relabel;
}
];
};
}

View File

@@ -0,0 +1,34 @@
{ lib, config, pkgs, inputs, ... }: {
environment.systemPackages = with pkgs; [
suricata
];
systemd.services.suricata = {
description = "Suricata IDS/IPS";
wantedBy = ["multi-user.target"];
serviceConfig = {
type = "simple";
User = "logging";
ExecStartPre = "/run/current-system/sw/bin/ip link set enp6s19 up";
ExecStart = "${pkgs.suricata}/bin/suricata -c /etc/suricata.yaml -i enp6s19";
Restart = "on-failure";
CapabilityBoundingSet = "CAP_NET_RAW CAP_NET_ADMIN";
AmbientCapabilities = "CAP_NET_RAW CAP_NET_ADMIN";
};
};
environment.etc."suricata.yaml".source = ../assets/suricata.yaml;
environment.etc."suricata/classification.config".text = ''
'';
environment.etc."suricata/reference.config".text = ''
'';
environment.etc."suricata/threshold.config".text = ''
'';
environment.etc."suricata/rules/suricata.rules".text = ''
'';
}

View File

@@ -45,7 +45,7 @@
# Nextcloud Setup
services.nextcloud = {
enable = true;
package = pkgs.nextcloud30;
package = pkgs.nextcloud32;
configureRedis = true;
database.createLocally = true;
autoUpdateApps.enable = true;
@@ -66,6 +66,13 @@
};
};
services.cron = {
enable = true;
systemCronJobs = [
"*/10 * * * * nextcloud nextcloud-occ preview:pre-generate"
];
};
# Gitea
services.gitea = {
enable = true;
@@ -102,6 +109,7 @@
services.nginx = {
enable = true;
virtualHosts = {
# Landing Page (randomctf.com)
"randomctf.com" = {
enableACME = true;
@@ -126,24 +134,48 @@
'';
locations."/".extraConfig = ''
allow 192.168.0.0/16;
allow 10.0.0.0/8;
allow 172.16.0.0/12;
allow 127.0.0.1;
deny all;
proxy_buffering off;
proxy_pass http://localhost:8096/;
'';
};
# Kiwix
"kiwix.randomctf.com" = {
extraConfig = ''
access_log /var/log/nginx/access.kiwix.log;
'';
locations."/".extraConfig = ''
allow 192.168.0.0/16;
allow 10.0.0.0/8;
allow 172.16.0.0/12;
allow 127.0.0.1;
deny all;
proxy_buffering off;
proxy_pass http://localhost:8080/;
'';
};
# Gitea
"git.randomctf.com" = {
enableACME = true;
forceSSL = true;
enableACME = true;
forceSSL = true;
extraConfig = ''
access_log /var/log/nginx/access.git.log;
'';
extraConfig = ''
access_log /var/log/nginx/access.git.log;
'';
locations."/".extraConfig = ''
proxy_buffering off;
proxy_pass http://localhost:3300/;
'';
locations."/".extraConfig = ''
proxy_buffering off;
proxy_pass http://localhost:3300/;
'';
};
};
};

View File

@@ -52,18 +52,74 @@
# Ignore laptop lid closing when connected to power.
services.logind.lidSwitchExternalPower = "ignore";
# Enable VMWare Workstation
virtualisation.vmware.host.enable = true;
# Enable bluetooth
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# System Packages
environment.systemPackages = with pkgs; [
pinentry-gtk2
protonmail-bridge
pass
# For RTL-SDR
libusb1
rtl-sdr
gqrx
];
# For RTL-SDR
hardware.rtl-sdr.enable = true;
# Setup Pinentry
environment.systemPackages = with pkgs; [ pinentry-gtk2 ];
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-gtk2;
enableSSHSupport = true;
};
# Setup protonmail bridge
systemd.user.services.protonmail-bridge = {
description = "Protonmail Bridge";
after = [ "network.target" ];
wantedBy = [ "default.target" ];
path = with pkgs; [
pass
gnupg
pinentry-gtk2
];
serviceConfig = {
Restart = "always";
ExecStart = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
};
};
# Setup environment for binaries that require FHS compliance.
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc.lib
libglvnd
mesa
fontconfig
freetype
libxkbcommon
zlib
dbus
python3
xorg.libX11
xorg.libXext
xorg.libXrender
xorg.libXrandr
xorg.libXcursor
xorg.libXi
xorg.libxcb
xorg.xcbutilwm
xorg.xcbutil
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilrenderutil
xorg.xcbutilcursor
];
};
}

View File

@@ -7,7 +7,7 @@
nixpkgs.config.allowUnfree = true;
# General setup
time.timeZone = "America/Los_Angeles";
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";

View File

@@ -4,5 +4,5 @@
isNormalUser = true;
useDefaultShell = true;
description = "random";
extraGroups = [ "networkmanager" "wheel" "docker" ];
extraGroups = [ "networkmanager" "wheel" "docker" "dialout" "plugdev" ];
}

View File

@@ -40,7 +40,7 @@ tell application "Ghostty"
end tell
EOF'''
cmd-shift-e = 'exec-and-forget /etc/profiles/per-user/*/bin/emacs'
cmd-shift-f = 'exec-and-forget open -n -a "Brave"'
cmd-shift-f = 'exec-and-forget open -n -a "Firefox"'
cmd-shift-d = 'exec-and-forget open -n -a "Discord"'
# i3 wraps focus by default

View File

@@ -15,15 +15,14 @@ floating_modifier $mod
# Application hot keys
bindsym $mod+Return exec "alacritty"
bindsym $mod+Shift+f exec "brave"
bindsym $mod+Shift+b exec "blueman-manager"
bindsym $mod+Shift+d exec "vesktop"
bindsym $mod+Shift+e exec "emacsclient -c"
bindsym $mod+Shift+d exec "discord"
bindsym $mod+Shift+t exec "thunar"
bindsym $mod+Shift+s exec "flameshot gui"
bindsym $mod+Shift+f exec "brave"
bindsym $mod+Shift+m exec "proton-mail"
bindsym $mod+Shift+p exec "rofi-rbw"
# Lock screen with i3lock-fancy
bindsym $mod+Shift+s exec "flameshot gui"
bindsym $mod+Shift+t exec "thunar"
bindsym $mod+Shift+x exec "i3lock-fancy"
# kill focused window
@@ -45,6 +44,10 @@ bindsym $mod+Shift+k move up
bindsym $mod+Shift+j move down
bindsym $mod+Shift+l move right
# move entire workspace
bindsym $mod+Shift+period move workspace to output right
bindsym $mod+Shift+comma move workspace to output left
# split in horizontal orientation
bindsym $mod+semicolon split h
@@ -156,9 +159,8 @@ client.focused_inactive #333333 #222222 #888888 #292d2e #eeeeee
client.unfocused #333333 #222222 #888888 #292d2e #eeeeee
# Auto lock the screen after X minutes
exec "xautolock -detectsleep -time 3 -locker i3lock-fancy"
#exec "xautolock -detectsleep -time 30 -locker i3lock-fancy"
# Startup Applications
exec_always --no-startup-id "killall polybar; polybar" # status bar
exec --no-startup-id "$HOME/.screenlayout/launch.sh &" # setup screen layout and wallpapers
exec --no-startup-id "$HOME/.scripts/autostart_desktop.sh &" # run autostart desktop apps

View File

@@ -11,6 +11,7 @@ disabled = #707880
width = 100%
height = 24pt
radius = 6
monitor = ${env:MONITOR:}
; dpi = 96

View File

@@ -438,7 +438,7 @@ When installing Vertico, the documentation mentions a few other packages that ad
:after vertico
:config
(jm/leader-keys
"pg" 'consult-grep
"pg" 'consult-git-grep
"pf" 'consult-find))
#+end_src

View File

@@ -48,9 +48,10 @@ Shortcut to goto todays org-roam dailies document.
(defun jm/org-roam-capture-today ()
(interactive)
(jm/org-roam-goto-day 0 t))
(jm/org-roam-goto-day 0 t "t")
(delete-other-windows))
(defun jm/org-roam-goto-day (days &optional force-capture)
(defun jm/org-roam-goto-day (days &optional force-capture keys)
(let* ((base-time
(if (and (jm/dailies-file-p) (not (eq days 0)))
(date-to-time (file-name-base (buffer-file-name)))
@@ -61,7 +62,7 @@ Shortcut to goto todays org-roam dailies document.
(jm/org-roam-refresh-agenda-list)
(if (and (file-exists-p full-path) (not force-capture))
(find-file full-path)
(org-roam-dailies--capture rel-time))))
(org-roam-dailies--capture rel-time nil keys))))
(jm/leader-keys
"oy" '((lambda () (interactive) (jm/org-roam-goto-day -1)) :which-key "Open/create yesterday's daily notes file")

View File

@@ -80,8 +80,10 @@ This will include any language server packages and configuration.
#+begin_src emacs-lisp
(use-package web-mode
:defer t
:mode "\\.html\\'"
:hook (web-mode . lsp-deferred))
:mode ("\\.html\\'" "\\.svelte\\'")
:hook (web-mode . lsp-deferred)
:init
(setq web-mode-engines-alist '(("svelte" . "\\.svelte\\'"))))
#+end_src
** JavaScript/Typescript
@@ -245,3 +247,4 @@ Nix is the language used by NixOS and the Nix package manager.
:mode "\\.nix\\'"
:hook (nix-mode . lsp-deferred))
#+end_src

View File

@@ -2,7 +2,7 @@
function load_script() {
if [ -f "$1" ]; then
$1
bash "$1" &
fi
}
@@ -10,3 +10,4 @@ function load_script() {
load_script "$HOME/.screenlayout/wallpapers.sh"
load_script "$HOME/.screenlayout/layout.sh"
load_script "$HOME/.screenlayout/wallpapers.sh"
load_script "$HOME/.screenlayout/polybar.sh"

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
if which xrandr; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload example &
done
else
polybar --reload example &
fi

76
flake.lock generated
View File

@@ -1,53 +1,73 @@
{
"nodes": {
"home-manager": {
"home": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1739381933,
"narHash": "sha256-4gvobxITgcrNGfwsVG5a46QzQCX89btIYw23p0ilbcc=",
"lastModified": 1764536451,
"narHash": "sha256-BgtcUkBfItu9/yU14IgUaj4rYOanTOUZjUfBP20/ZB4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "15b59d4191b993ebdfcb1f61b834fced217882ba",
"rev": "3fdd076e08049a9c7a83149b270440d9787d2df5",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
},
"nix-darwin": {
"home-unstable": {
"inputs": {
"nixpkgs": [
"nix-unstable"
]
},
"locked": {
"lastModified": 1764304195,
"narHash": "sha256-bO7FN/bF6gG7TlZpKAZjO3VvfsLaPFkefeUfJJ7F/7w=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "86ff0ef506c209bb397849706e85cc3a913cb577",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1742013980,
"narHash": "sha256-34YbfwABU5nb0F5eaaJE3ujldaNDhmyxw7CWqhXJV08=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "9175b4bb5f127fb7b5784b14f7e01abff24c378f",
"lastModified": 1763870992,
"narHash": "sha256-NPyc76Wxmv/vAsXJ8F+/8fXECHYcv2YGSqdiSHp/F/A=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "d7423982c7a26586aa237d130b14c8b302c7a367",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixpkgs": {
"nix-unstable": {
"locked": {
"lastModified": 1739214665,
"narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=",
"lastModified": 1764242076,
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a",
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
"type": "github"
},
"original": {
@@ -57,10 +77,28 @@
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1764604385,
"narHash": "sha256-ssKbRa5FLDX/Kc0dQFUWFRt35UfdNDQD6GxvamdhGQY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "93488aad5d24df9131cbc0a25aa533dc866af473",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"home": "home",
"home-unstable": "home-unstable",
"nix-index-database": "nix-index-database",
"nix-unstable": "nix-unstable",
"nixpkgs": "nixpkgs"
}
}

194
flake.nix
View File

@@ -2,131 +2,91 @@
description = "Configuration flake for RandomCTF";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/master";
nixpkgs.url = "github:nixos/nixpkgs/release-25.11";
home = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
nix-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-unstable = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nix-unstable";
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nix-darwin, home-manager, ... } @ inputs: {
outputs = { self, nixpkgs, home, nix-unstable, home-unstable, nix-index-database, ... } @ inputs:
let
mkNixosConfig = hostname: modules: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
inherit modules;
};
# Nixos Configurations
mkHomeConfig = username: modules: home.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
system = "x86_64-linux";
};
nixosConfigurations.randomctf = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./config/shared.nix
./config/omen.nix
];
extraSpecialArgs = {
inherit inputs;
user = username;
};
inherit modules;
};
mkNixosUnstableConfig = hostname: modules: nix-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
inherit modules;
};
mkHomeUnstableConfig = username: modules: home-unstable.lib.homeManagerConfiguration {
pkgs = import nix-unstable {
system = "x86_64-linux";
};
extraSpecialArgs = {
inherit inputs;
user = username;
};
inherit modules;
};
in {
# Nixos Configurations
nixosConfigurations = {
randomctf = mkNixosUnstableConfig "randomctf" [ ./config/shared.nix ./config/omen.nix ];
r330-media = mkNixosConfig "r330-media" [ ./config/media.nix ];
sampledb-dev = mkNixosConfig "sampledb-dev" [ ./config/sampledb.nix ];
r330-logging = mkNixosConfig "r330-logging" [ ./config/logging.nix ];
mindforge = mkNixosConfig "mindforge" [ ./config/ai.nix ];
};
# Home-Manager Configurations
homeConfigurations = {
random = mkHomeUnstableConfig "random" [
./home/headful-nixos.nix
./home/modules/development.nix
./home/modules/gui-apps.nix
./home/modules/hacking.nix
];
sampledb = mkHomeConfig "sampledb" [
./home/headless-nixos.nix
./home/modules/development.nix
];
media = mkHomeConfig "media" [ ./home/headless-nixos.nix ];
logging = mkHomeConfig "logging" [ ./home/headless-nixos.nix ];
mindforge = mkHomeConfig "mindforge" [ ./home/headless-nixos.nix ];
};
};
nixosConfigurations."r330-media" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./config/media.nix
];
};
nixosConfigurations."sampledb-dev" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./config/sampledb.nix
];
};
nixosConfigurations."r330-logging" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./config/logging.nix
];
};
nixosConfigurations."mindforge" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./config/ai.nix
];
};
# Home-Manager Configurations
homeConfigurations.random = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs.user = "random";
modules = [
./home/headful-nixos.nix
./home/modules/development.nix
./home/modules/gui-apps.nix
./home/modules/hacking.nix
];
};
homeConfigurations.media = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs.user = "media";
modules = [
./home/headless-nixos.nix
];
};
homeConfigurations.sampledb = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs.user = "sampledb";
modules = [
./home/headless-nixos.nix
./home/modules/development.nix
];
};
homeConfigurations.logging = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs.user = "logging";
modules = [
./home/headless-nixos.nix
];
};
homeConfigurations.mindforge = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs.user = "mindforge";
modules = [
./home/headless-nixos.nix
];
};
# Darwin Configuration
darwinConfigurations."Jadens-MacBook-Air" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = { inherit inputs; };
modules = [
./config/darwin.nix
home-manager.darwinModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jadenmaxwell = import ./home/darwin.nix;
}
];
};
homeConfigurations.jadenmaxwell = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."aarch64-darwin";
modules = [
./home/darwin.nix
];
};
};
}

View File

@@ -14,16 +14,21 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d8ec7c7e-ce95-432c-932d-663dc261c623";
{ device = "/dev/disk/by-uuid/466b1e73-407e-48de-a2b8-f35f96bef1fd";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/1842-1672";
{ device = "/dev/disk/by-uuid/0079-63AB";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/mnt/logs" = {
device = "/dev/disk/by-uuid/8e8ee0ad-8d74-486f-b33a-ed1294cb3a63";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@@ -19,12 +19,12 @@
};
fileSystems."/mnt/media" =
{ device = "/dev/disk/by-uuid/b579c911-e74c-4f03-b918-a4e5a6b764ab";
{ device = "/dev/disk/by-uuid/e9df1e21-553e-43e2-bceb-8a5e274a95b7";
fsType = "ext4";
};
fileSystems."/mnt/files" =
{ device = "/dev/disk/by-uuid/f3a62e58-9556-47d7-b78b-3211f269f4ce";
{ device = "/dev/disk/by-uuid/efc25f40-0cad-404b-8113-526ad5a30539";
fsType = "ext4";
};

View File

@@ -19,16 +19,16 @@
options snd-hda-intel model=dell-headset-multi
'';
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f4f207c5-08d5-4848-920c-76e99280b04c";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-partlabel/root";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7F2D-4654";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/EFI";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];

View File

@@ -13,16 +13,26 @@
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8d1d0298-307f-4d9a-84f8-0434fafa0c55";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/8d1d0298-307f-4d9a-84f8-0434fafa0c55";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4821-12F7";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/sampledb" = {
device = "/dev/disk/by-uuid/7d70bfdb-510f-4f30-969f-d4ac59175719";
fsType = "ext4";
};
fileSystems."/mnt/archive" = {
device = "/dev/disk/by-uuid/66103455-9fcd-4b5b-9735-37b85a51019d";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4821-12F7";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];

View File

@@ -1,31 +0,0 @@
{ pkgs, ... }: {
home = {
username = "jadenmaxwell";
homeDirectory = "/Users/jadenmaxwell";
};
home.packages = with pkgs; [
gnupg
vesktop
];
imports = [
./shared.nix
./modules/utils.nix
./modules/development.nix
./modules/sketchybar.nix
./modules/aerospace.nix
./modules/neovim.nix
./modules/emacs.nix
./modules/zsh.nix
];
programs.ssh.extraConfig = ''
Host 192.168.100.*
SetEnv TERM=xterm-256color
'';
home.file = {
".config/ghostty/config".source = ../dotfiles/.config/ghostty/config;
};
}

View File

@@ -8,7 +8,6 @@
imports = [
./shared.nix
./modules/utils.nix
./modules/linux-only-utils.nix
./modules/networking.nix
./modules/neovim.nix
./modules/emacs.nix
@@ -30,6 +29,7 @@
".scripts/autostart_desktop.sh".source = ../dotfiles/.scripts/autostart_desktop.sh;
".screenlayout/launch.sh".source = ../dotfiles/.screenlayout/launch.sh;
".screenlayout/wallpapers.sh".source = ../dotfiles/.screenlayout/wallpapers.sh;
".screenlayout/polybar.sh".source = ../dotfiles/.screenlayout/polybar.sh;
".config/i3/config".source = ../dotfiles/.config/i3/config;
".config/rofi/config.rasi".source = ../dotfiles/.config/rofi/config.rasi;
".config/polybar/config.ini".source = ../dotfiles/.config/polybar/config.ini;

View File

@@ -1,4 +1,4 @@
{ pkgs, user, ... }: {
{ user, ... }: {
home = {
username = "${user}";
@@ -8,7 +8,6 @@
imports = [
./shared.nix
./modules/utils.nix
./modules/linux-only-utils.nix
./modules/networking.nix
./modules/neovim.nix
./modules/tmux.nix

View File

@@ -1,10 +1,24 @@
{ pkgs, ... }: {
{ home, pkgs, ... }: {
home.packages = with pkgs; [
# C/C++
clang
clang-tools
cargo
python3
gnumake
clang-tools
# Rust
rustc
cargo
cargo-edit
cargo-flamegraph
rust-analyzer
# Other
python3
ansible
];
# To prevent sysroot errors in rust-analyzer
home.sessionVariables = {
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
}

View File

@@ -1,24 +1,25 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
# Build deps
nodejs
cmake
libtool
# Additional packages for functionality
isync
ispell
texliveFull
mu
zip
unzip
isync
ispell
ledger
texliveFull
# Fonts
maple-mono
maple-mono.truetype
# LSP Servers
nil
ccls
rust-analyzer
yaml-language-server
python3Packages.python-lsp-server
nodePackages.typescript-language-server
@@ -28,7 +29,7 @@
programs = {
emacs = {
enable = true;
package = pkgs.emacs29;
package = pkgs.emacs30;
extraPackages = epkgs: with epkgs; [
mu4e
vterm
@@ -37,15 +38,4 @@
];
};
};
home.file = {
".emacs".source = ../../dotfiles/.emacs;
".emacs.d/config.org".source = ../../dotfiles/.emacs.d/config.org;
".emacs.d/terminal.org".source = ../../dotfiles/.emacs.d/terminal.org;
".emacs.d/functions.org".source = ../../dotfiles/.emacs.d/functions.org;
".emacs.d/email.org".source = ../../dotfiles/.emacs.d/email.org;
".emacs.d/org.org".source = ../../dotfiles/.emacs.d/org.org;
".emacs.d/lsp.org".source = ../../dotfiles/.emacs.d/lsp.org;
".mbsyncrc".source = ../../dotfiles/.mbsyncrc;
};
}

View File

@@ -4,10 +4,8 @@
vlc
dconf
brave
okular
vesktop
zoom-us
discord
twinkle
audacity
flameshot
@@ -17,6 +15,7 @@
virt-viewer
nextcloud-client
protonmail-desktop
kdePackages.okular
];
programs.obs-studio = {
@@ -46,7 +45,7 @@
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "brave-browser.desktop";
"text/html" = "brave.desktop";
"x-scheme-handler/http" = "brave-browser.desktop";
"x-scheme-handler/https" = "brave-browser.desktop";
"x-scheme-handler/about" = "brave-browser.desktop";

View File

@@ -1,41 +1,51 @@
{ lib, config, pkgs, ... }: {
# Hacking specific packages.
home.packages = (with pkgs; [
gdb
yara
home.packages = with pkgs; [
# Utilities
imhex
rlwrap
openssl
inetutils
# Enumeration
nmap
#john
ffuf
amass
nikto
samba
nuclei
rlwrap
sqlmap
wpscan
ghidra
pwndbg
strace
strace
openssl
remmina
pwntools
openldap
rustscan
inetutils
thc-hydra
exploitdb
responder
burpsuite
feroxbuster
# Vulnerability Scanning
nikto
nuclei
wpscan
sqlmap
exploitdb
# Windows Exploitation
samba
remmina
openldap
responder
evil-winrm
cifs-utils
feroxbuster
# Reverse Engineering
gdb
yara
strace
ghidra
exiftool
pwntools
flare-floss
# Wordlists
(wordlists.override {
lists = with pkgs; [
rockyou
seclists
];
})
]);
];
}

View File

@@ -1,6 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
ncdu
nvtopPackages.full
];
}

View File

@@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }: let
{ pkgs, lib, config, ... }: let
mypkgs = import ../../packages/all-packages.nix { inherit pkgs lib config; };
in {
home.packages = with pkgs; [ tmux ];
home.packages = with pkgs; [ tmux ];
home.file = {
".tmux/plugins/tpm".source = "${mypkgs.tpm}";
".tmux.conf".source = ../../dotfiles/.tmux.conf;

View File

@@ -1,31 +1,43 @@
{ pkgs, ... }: {
{ pkgs, inputs, ... }: {
home.packages = with pkgs; [
# Nix specific utilities
manix
direnv
rippkgs
nix-tree
nix-init
patchelf
# Utilities
jq
yq
bc
duf
cava
ncdu
file
dysk
wget
curl
btop
dive
dust
timer
p7zip
yt-dlp
ffmpeg
sshpass
httrack
ripgrep
openvpn
xclicker
pciutils
fastfetch
age
ouch
cryfs
dive
dust
nvtopPackages.full
# Encryption Tools
#age
#cryfs
];
programs.direnv = {
@@ -33,4 +45,8 @@
enableZshIntegration = true;
nix-direnv.enable = true;
};
# Install comma
imports = [ inputs.nix-index-database.homeModules.nix-index ];
programs.nix-index-database.comma.enable = true;
}

View File

@@ -18,6 +18,8 @@
enableZshIntegration = true;
settings = {
enter_accept = false;
filter_mode = "host";
filter_mode_shell_up_key_binding = "session";
};
};
zsh = {
@@ -30,8 +32,12 @@
shellAliases = {
cd = "z";
ls = "eza";
mvi = "mv -t ~/Nextcloud/INBOX";
sdb = "sdb-client";
open = "xdg-open";
reload = "source ~/.zshrc";
histogram = "awkuniq -c | sort -nr";
start-day = "emacsclient -c -n -e '(jm/org-roam-capture-today)'";
json-less = "jq -C . | less -R";
csv2json = "python -c 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))'";
@@ -47,17 +53,12 @@
mindforge = "ssh mindforge@mindforge.randomctf.local";
# Nix Specific aliases
update-darwin = "darwin-rebuild switch --flake ~/dotfiles";
update-config = "sudo nixos-rebuild switch --flake ~/dotfiles";
update-home = "home-manager switch --flake ~/dotfiles";
update-all = "update-config && update-home";
};
initExtraBeforeCompInit = ''
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
'';
initExtra = ''
initContent = ''
export PATH=$PATH:~/.cargo/bin
function .. { cd .. }
function ... { cd ../.. }
@@ -66,13 +67,11 @@
function ...... { cd ../../../../../.. }
function ....... { cd ../../../../../../.. }
if [[ "$(uname)" == "Darwin" ]]; then
source <(/opt/homebrew/bin/brew shellenv)
fi
if [[ -n "$SSH_CONNECTION" && "$TERM" == "ghostty" ]]; then
export TERM="xterm-256color"
fi
source ~/dotfiles/bash-scripts/aliases.sh
'';
plugins = [

View File

@@ -1,16 +1,22 @@
{ lib, config, pkgs, ... }: {
{ options, ... }: {
nixpkgs.config.allowUnfree = true;
fonts.fontconfig.enable = true;
programs = {
home-manager.enable = true;
git = {
git = if builtins.hasAttr "settings" options.programs.git then {
enable = true;
settings.user = {
name = "Random936";
email = "randomdude936@gmail.com";
};
} else {
enable = true;
userName = "Random936";
userEmail = "randomdude936@gmail.com";
};
};
home.stateVersion = "24.05";
home.stateVersion = "25.05";
}

View File

@@ -1,3 +1,4 @@
{ pkgs, lib, config, ... }: rec {
tpm = pkgs.callPackage ./tpm {};
binaryninja = pkgs.callPackage ./binaryninja {};
}

View File

@@ -0,0 +1,99 @@
{
autoPatchelfHook,
copyDesktopItems,
dbus,
fetchurl,
fontconfig,
freetype,
lib,
libGLU,
libxkbcommon,
makeDesktopItem,
stdenv,
unzip,
wayland,
xcbutilimage,
xcbutilkeysyms,
xcbutilrenderutil,
xcbutilwm,
openssl,
qt6,
}:
stdenv.mkDerivation rec {
pname = "binaryninja";
version = "5.1.8104";
src = ./binaryninja_linux_stable_personal.zip;
icon = fetchurl {
url = "https://raw.githubusercontent.com/Vector35/binaryninja-api/448f40be71dffa86a6581c3696627ccc1bdf74f2/docs/img/logo.png";
hash = "sha256-TzGAAefTknnOBj70IHe64D6VwRKqIDpL4+o9kTw0Mn4=";
};
desktopItems = [
(makeDesktopItem {
name = "com.vector35.binaryninja";
desktopName = "Binary Ninja Personal";
comment = "A Reverse Engineering Platform";
exec = "binaryninja";
icon = "binaryninja";
mimeTypes = [
"application/x-binaryninja"
"x-scheme-handler/binaryninja"
];
categories = [ "Utility" ];
})
];
nativeBuildInputs = [
unzip
autoPatchelfHook
copyDesktopItems
qt6.wrapQtAppsHook
];
buildInputs = [
dbus
fontconfig
freetype
libGLU
libxkbcommon
stdenv.cc.cc.lib
wayland
xcbutilimage
xcbutilkeysyms
xcbutilrenderutil
xcbutilwm
openssl
qt6.qtbase
qt6.qtdeclarative
qt6.qtshadertools
qt6.qtsvg
];
installPhase = ''
runHook preInstall
mkdir -p $out/
cp -R . $out/
mkdir $out/bin
ln -s $out/binaryninja $out/bin/binaryninja
install -Dm644 ${icon} $out/share/icons/hicolor/256x256/apps/binaryninja.png
runHook postInstall
'';
meta = {
changelog = "https://binary.ninja/changelog/#${lib.replaceStrings [ "." ] [ "-" ] version}";
description = "Interactive decompiler, disassembler, debugger";
homepage = "https://binary.ninja/";
license = {
fullName = "Binary Ninja Personal Software License";
url = "https://docs.binary.ninja/about/license.html#non-commercial-student-license-named";
free = false;
};
mainProgram = "binaryninja";
platforms = [ "x86_64-linux" ];
};
}