[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
justfile

View File

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

View File

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

View File

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

View File

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

View File

@ -5,83 +5,89 @@
enable = true;
executable = false;
text = ''
{
[{
"exclusive": false,
"position": "bottom",
"position": "top",
"height": 22,
"spacing": 16,
"fixed-center": false,
"modules-left": [
"user",
"cpu",
"memory",
"network",
"disk#root",
"disk#home",
"river/mode",
],
"modules-left": [
"user"
],
"modules-right": [
"tray",
"clock"
],
"user": {
"format": " {work_d}:{work_H}:{work_M}:{work_S} uptime",
"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
"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
}
},
{
"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} = {
extraGroups = [ "davfs2" "libvirtd" "transmission" ];
packages = with pkgs; [
mixxx
polychromatic
python311Packages.eyeD3
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
john
jq
just
killall
lavat
lynis
mdp
mediainfo

View File

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

View File

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

View File

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

View File

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