[nb] Commit

This commit is contained in:
Thai Noodles 2024-02-07 20:32:44 -08:00
parent 660285c743
commit c4d43d21c8
15 changed files with 266 additions and 156 deletions

1
.index
View File

@ -9,3 +9,4 @@ README.md
todos todos
justfile

View File

@ -22,11 +22,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1705677747, "lastModified": 1707092692,
"narHash": "sha256-eyM3okYtMgYDgmYukoUzrmuoY4xl4FUujnsv/P6I/zI=", "narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bbe7d8f876fbbe7c959c90ba2ae2852220573261", "rev": "faf912b086576fd1a15fca610166c98d47bc667e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -55,7 +55,7 @@
extraConfig = '' extraConfig = ''
syntax enable syntax enable
set wrap set wrap
set spell spelllang=en_us set nospell
set linebreak set linebreak
set number set number
set relativenumber set relativenumber

View File

@ -1,87 +1,92 @@
{ pkgs, config, user, ... }: { pkgs, config, user, ... }:
{ {
home.file = { home = {
".bash_login" = { sessionVariables = {
enable = true;
text = ''
[[ -f ~/.bashrc ]] && . ~/.bashrc
#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
# exec river
#fi
'';
}; };
".bash_logout" = { file = {
enable = true; ".bash_login" = {
text = '' enable = true;
if [ "$SHLVL" = 1 ]; then text = ''
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q [[ -f ~/.bashrc ]] && . ~/.bashrc
fi #if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
''; # exec river
}; #fi
".bashrc" = { '';
enable = true; };
text = '' ".bash_logout" = {
# Source global definitions enable = true;
if [ -f /etc/bashrc ]; then text = ''
. /etc/bashrc if [ "$SHLVL" = 1 ]; then
fi [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
set -o vi fi
unset HISTFILE '';
# Aliases };
alias mkfoo='. $HOME/.local/bin/mkfoo.sh' ".bashrc" = {
alias ed='ed -p "> "' enable = true;
# Functions text = ''
function get-ssh() { # Source global definitions
if [ ! -f $HOME/.ssh/id_ed25519.pub ]; then if [ -f /etc/bashrc ]; then
ssh-keygen -t ed25519 -C "${user.email}" . /etc/bashrc
fi fi
cat $HOME/.ssh/id_ed25519.pub set -o vi
} unset HISTFILE
function home() { # Aliases
cd alias mkfoo='. $HOME/.local/bin/mkfoo.sh'
clear alias ed='ed -p "> "'
} # Functions
function search() { function get-ssh() {
surfraw $(surfraw -elvi | fzf | awk '{print $1;}') if [ ! -f $HOME/.ssh/id_ed25519.pub ]; then
} ssh-keygen -t ed25519 -C "${user.email}"
function mkcd { fi
mkdir -p $1 cat $HOME/.ssh/id_ed25519.pub
cd $1 }
} function home() {
cd
# fe [FUZZY PATTERN] - Open the selected file with the default editor clear
# - Bypass fuzzy finder if there's only one match (--select-1) }
# - Exit if there's no match (--exit-0) function search() {
function fe() { surfraw $(surfraw -elvi | fzf | awk '{print $1;}')
IFS=' }
' function mkcd {
files=$(fzf --query="$1" --multi --select-1 --exit-0) mkdir -p $1
[ -n "$files" ] && "$EDITOR" "$files" cd $1
} }
# Environmental Variables # fe [FUZZY PATTERN] - Open the selected file with the default editor
# Uncomment the following line if you don't like systemctl's auto-paging feature: # - Bypass fuzzy finder if there's only one match (--select-1)
export SYSTEMD_PAGER= # - Exit if there's no match (--exit-0)
export PS1='\n\u@\h:\w (\j)\n$? \$ ' function fe() {
export BEMENU_OPTS="--fn 'Comic Mono 12'\ IFS='
--tb '#6272a4'\ '
--tf '#f8f8f2'\ files=$(fzf --query="$1" --multi --select-1 --exit-0)
--fb '#282a36'\ [ -n "$files" ] && "$EDITOR" "$files"
--ff '#f8f8f2'\ }
--nb '#282a36'\
--nf '#6272a4'\ # Environmental Variables
--hb '#44475a'\ # Uncomment the following line if you don't like systemctl's auto-paging feature:
--hf '#50fa7b'\ export SYSTEMD_PAGER=
--sb '#44475a'\ export PS1="\n\u@\h:\w (\j)\n$? \$ "
--sf '#50fa7b'\ export LIBSEAT_BACKEND=logind
--scb '#282a36'\ export BEMENU_OPTS="--fn 'Comic Mono 12'\
--scf '#ff79c6'\ --tb '#6272a4'\
--hp '10'\ --tf '#f8f8f2'\
--binding 'vim'\ --fb '#282a36'\
--vim-esc-exits\ --ff '#f8f8f2'\
--ignorecase\ --nb '#282a36'\
--no-overlap" --nf '#6272a4'\
''; --hb '#44475a'\
--hf '#50fa7b'\
--sb '#44475a'\
--sf '#50fa7b'\
--scb '#282a36'\
--scf '#ff79c6'\
--hp '10'\
--binding 'vim'\
--vim-esc-exits\
--ignorecase\
--no-overlap"
'';
};
}; };
}; };
} }

View File

@ -6,8 +6,9 @@
borderColor = "#BD93F9"; borderColor = "#BD93F9";
borderRadius = 5; borderRadius = 5;
borderSize = 2; borderSize = 2;
margin = "20";
textColor = "#F8F8F2"; textColor = "#F8F8F2";
anchor = "top-right"; anchor = "bottom-right";
layer = "overlay"; layer = "overlay";
maxVisible = 5; maxVisible = 5;
font = "Comic Mono 12"; font = "Comic Mono 12";

View File

@ -43,11 +43,9 @@
# Set status bar postition # Set status bar postition
set -g status-position top set -g status-position top
setw -g window-status-current-format "[#I:#W#F]"
setw -g window-status-format "#I:#W#F" setw -g window-status-format "#I:#W#F"
''; '';
plugins = with pkgs.tmuxPlugins; [ plugins = with pkgs.tmuxPlugins; [
dracula
urlview urlview
]; ];
}; };

View File

@ -5,83 +5,89 @@
enable = true; enable = true;
executable = false; executable = false;
text = '' text = ''
{ [{
"exclusive": false, "exclusive": false,
"position": "bottom", "position": "top",
"height": 22, "height": 22,
"spacing": 16, "spacing": 16,
"fixed-center": false, "fixed-center": false,
"modules-left": [ "modules-left": [
"user", "user"
"cpu", ],
"memory",
"network",
"disk#root",
"disk#home",
"river/mode",
],
"modules-right": [ "modules-right": [
"tray",
"clock" "clock"
], ],
"user": { "user": {
"format": " {work_d}:{work_H}:{work_M}:{work_S} uptime", "format": "{work_d}:{work_H}:{work_M}:{work_S}",
"interval": 1, "interval": 1
},
"cpu": {
"interval": 1,
"format": "cpu {load} {icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}{icon16}{icon17}{icon18}{icon19}{icon20}{icon21}{icon22}{icon23}",
"format-icons": [
"<span color='#69ff94'></span>", // green
"<span color='#2aa9ff'></span>", // blue
"<span color='#f8f8f2'></span>", // white
"<span color='#f8f8f2'></span>", // white
"<span color='#ffffa5'></span>", // yellow
"<span color='#ffffa5'></span>", // yellow
"<span color='#ff9977'></span>", // orange
"<span color='#dd532e'></span>" // red
]
},
"memory": {
"interval": 30,
"format": "mem {used:0.1f}G / {total:0.1f}G",
},
"network": {
"interval": 10,
"interface": "enp4s0",
"format": "{ifname} {bandwidthUpBits} up / {bandwidthDownBits} down",
"format-disconnected": "",
"tooltip-format": "{ipaddr}/{cidr} via {gwaddr}"
},
"disk#root": {
"interval": 60,
"format": "{free} free on {path}",
"path": "/"
},
"disk#home": {
"interval": 60,
"format": "{free} free on {path}",
"path": "/home"
},
"systemd-failed-units": {
"hide-on-ok": false, // Do not hide if there is zero failed units.
"format": " {nr_failed}",
"format-ok": "",
"system": true, // Monitor failed systemwide units.
"user": false // Ignore failed user units.
},
"river/mode": {
},
"tray": {
"icon-size": 18,
"spacing": 4
}, },
"clock": { "clock": {
"format": "{:%H:%M:%S}", "format": "{:%H:%M:%S}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}", "format-alt": "{:%Y-%m-%d}",
"interval": 1 "interval": 1
}
},
{
"exclusive": false,
"position": "bottom",
"height": 22,
"spacing": 16,
"fixed-center": false,
"modules-left": [
"river/mode"
],
"modules-right": [
"tray"
],
"tray": {
"icon-size": 18,
"spacing": 4,
"show-passive-items": true,
"reverse-direction": true
} }
}]
'';
};
"waybar/style.css" = {
enable = true;
executable = false;
text = ''
* {
background: transparent;
color: #F2F2F8;
}
#user {
background: #282A36;
border-style: solid;
border-bottom-right-radius: 5px;
border-width: 0 2 2 0;
border-color: #44475A;
padding: 0 8 0 8;
}
#clock {
background: #282A36;
border-style: solid;
border-bottom-left-radius: 5px;
border-width: 0 0 2 2;
border-color: #44475A;
padding: 0 8 0 8;
}
#mode {
background: #282A36;
border-style: solid;
border-top-right-radius: 5px;
border-width: 2 2 0 0;
border-color: #44475A;
padding: 0 8 0 8;
}
#tray {
background: #282A36;
border-style: solid;
border-top-left-radius: 5px;
border-width: 2 0 0 2;
border-color: #44475A;
padding: 0 4 0 8;
} }
''; '';
}; };

View File

@ -0,0 +1,77 @@
{ pkgs, config, ... }:
{
programs.waybar = {
enable = true;
settings = [{
topBar = {
exclusive = false;
position = "top";
height = 22;
spacing = 16;
modules-left = [ "user" ];
modules-right = [ "clock" ];
"user" = {
format = "{work_d}:{work_H}:{work_M}:{work_S}";
interval = 1;
};
"clock" = {
format = "{:%H:%M:%S}";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%Y-%m-%d}";
interval = 1;
};
};
bottomBar = {
exclusive = false;
position = "bottom";
height = 22;
spacing = 16;
fixed-center = false;
modules-left = [ "river/mode" ];
modules-right = [ "tray" ];
"tray" = {
icon-size = 18;
spacing = 4;
};
};
}];
style = ''
* {
background: transparent;
color: #F2F2F8;
}
#user {
background: #282A36;
border-style: solid;
border-bottom-right-radius: 5px;
border-width: 0 2 2 0;
border-color: #BD93F9;
padding: 0 8 0 8;
}
#clock {
background: #282A36;
border-style: solid;
border-bottom-left-radius: 5px;
border-width: 0 0 2 2;
border-color: #BD93F9;
padding: 0 8 0 8;
}
#mode {
background: #282A36;
border-style: solid;
border-top-right-radius: 5px;
border-width: 2 2 0 0;
border-color: #BD93F9;
padding: 0 8 0 8;
}
#tray {
background: #282A36;
border-style: solid;
border-top-left-radius: 5px;
border-width: 2 0 0 2;
border-color: #BD93F9;
padding: 0 4 0 8;
}
'';
};
}

View File

@ -79,8 +79,8 @@ in
users.users.${user.name} = { users.users.${user.name} = {
extraGroups = [ "davfs2" "libvirtd" "transmission" ]; extraGroups = [ "davfs2" "libvirtd" "transmission" ];
packages = with pkgs; [ packages = with pkgs; [
mixxx python311Packages.eyeD3
polychromatic tagutil
]; ];
}; };
} }

17
justfile Normal file
View File

@ -0,0 +1,17 @@
recipe-name:
grep "description" "./flake.nix"
default:
just --list
debug:
nixos-rebuild switch --flake . --use-remote-sudo --show-trace --verbose
test:
nixos-rebuild test --flake ".#$(hostname)" --use-remote-sudo
switch:
nixos-rebuild switch --flake ".#$(hostname)" --use-remote-sudo
update:
nixos-rebuild switch --flake --update-input nixpkgs ".#$(hostname)"

View File

@ -103,7 +103,9 @@
jo jo
john john
jq jq
just
killall killall
lavat
lynis lynis
mdp mdp
mediainfo mediainfo

View File

@ -7,6 +7,7 @@
#obsidian #obsidian
pandoc pandoc
pdftk pdftk
qcal
#sc-im #sc-im
thunderbird thunderbird
]; ];

View File

@ -6,6 +6,7 @@
}; };
users.users.${user.name}.packages = with pkgs; [ users.users.${user.name}.packages = with pkgs; [
burpsuite burpsuite
httpie
metasploit metasploit
nikto nikto
sherlock sherlock

View File

@ -44,6 +44,7 @@
}; };
users.users.${user.name}.packages = with pkgs; [ users.users.${user.name}.packages = with pkgs; [
ani-cli ani-cli
bitwarden
glib glib
gparted gparted
lagrange lagrange
@ -54,6 +55,7 @@
mupdf mupdf
#onionshare-gui #onionshare-gui
signal-desktop signal-desktop
simplex-chat-desktop
tor-browser-bundle-bin tor-browser-bundle-bin
#urlview #urlview
ytfzf ytfzf

View File

@ -22,6 +22,9 @@
]; ];
}; };
}; };
services = {
seatd.enable = true;
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bemenu bemenu
bemoji bemoji
@ -42,8 +45,4 @@
wl-clipboard wl-clipboard
wtype wtype
]; ];
programs.xwayland = {
enable = true;
};
};
} }