Merge branch 'master' of github.com:JakeGinesin/nix-dots

This commit is contained in:
2025-05-02 20:25:12 -04:00
34 changed files with 904 additions and 422 deletions

View File

@@ -10,9 +10,10 @@ pgrep -x sxhkd > /dev/null || sxhkd &
# xrandr --output eDP-1 --mode 1920x1080 --primary
# xrandr --output HDMI-1 --mode 1920x1080 --same-as eDP-1 --scale 1x1
xrandr --output eDP-1 --scale 1x1 --auto
# xrandr --output eDP-1 --scale 1x1 --auto
xrandr --output LVDS-1 --mode 1366x768 --primary
bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
bspc monitor LVDS-1 -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
bspc config border_width 2
bspc config window_gap 2

View File

@@ -1,8 +1,17 @@
{
pkgs,
lib,
osConfig,
...
}: {
}: let
# osConfig carries config from configuration.nix
scale =
if osConfig.res == "1366x768"
then 0.80
else if osConfig.res == "2560x1440"
then 1.25
else 1.00;
in {
home.activation.copyStartpage = lib.mkAfter ''
mkdir -p ~/.firefox-startpage
cp -r ${./startpage}/* ~/.firefox-startpage/
@@ -118,10 +127,10 @@
# for tiling window managers expands to the size of the window
# https://support.mozilla.org/en-US/questions/1253302
"mousewheel.with_control.action" = "1";
"mousewheel.with_control.action" = 1;
# should change this based on your resolution
"layout.css.devPixelsPerPx" = 1.25;
"layout.css.devPixelsPerPx" = scale;
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
"full-screen-api.ignore-widgets" = true;

View File

@@ -3,6 +3,7 @@
pkgs,
...
}: {
services.ssh-agent.enable = true;
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;

View File

@@ -0,0 +1,7 @@
{
config,
pkgs,
...
}: {
home.file.".config/keepassxc/keepassxc.ini".source = ./keepassxc.ini;
}

View File

@@ -0,0 +1,21 @@
[General]
ConfigVersion=2
[Browser]
CustomProxyLocation=
[GUI]
ApplicationTheme=dark
ShowExpiredEntriesOnDatabaseUnlockOffsetDays=6
TrayIconAppearance=monochrome-light
[PasswordGenerator]
AdditionalChars=
ExcludedChars=
Length=31
LowerCase=true
Numbers=true
SpecialChars=true
UpperCase=true
WordCount=8
WordSeparator=!

View File

@@ -0,0 +1,12 @@
{
config,
pkgs,
lib,
...
}: {
home.activation.makeNfDir = lib.mkAfter ''
mkdir -p ~/journal
mkdir -p ~/journal/rest
chmod -R u+w ~/journal
'';
}

View File

@@ -9,4 +9,4 @@ view=icon
recurse=true
sort=alpha
icon_caps=false
dirs=/home/synchronous/.wallpapers;
dirs=$HOME/.wallpapers;

View File

@@ -30,6 +30,7 @@
rust-analyzer-unwrapped
black
nodejs_22
latexrun
# gh
];

View File

@@ -12,3 +12,51 @@ vim.api.nvim_create_autocmd("VimResized", {
end
end,
})
-- hide and unhide lualine when entering and leaving goyo
local lualine = require('lualine')
local grp = vim.api.nvim_create_augroup('goyo_lualine_toggle', { clear = true })
local function hide() lualine.hide{ place = {'statusline', 'winbar', 'tabline'} } end
local function unhide() lualine.hide{ place = {'statusline', 'winbar', 'tabline'}, unhide = true } end
vim.api.nvim_create_autocmd('User', {
group = grp,
pattern = 'GoyoEnter',
callback = function()
lualine.hide({ place = {'statusline', 'winbar', 'tabline'} })
end,
})
vim.api.nvim_create_autocmd('User', {
group = grp,
pattern = 'GoyoLeave',
callback = function()
lualine.hide({ place = {'statusline', 'winbar', 'tabline'}, unhide = true })
end,
})
vim.api.nvim_create_autocmd('VimEnter', {
group = grp,
once = true,
callback = function()
local w = vim.g.goyo_if
if w then
vim.schedule(hide)
end
end,
})
vim.api.nvim_create_autocmd('UIEnter', {
once = true,
group = grp,
callback = function()
local w = vim.g.goyo_if
if w then
vim.opt.showtabline = 0
vim.cmd('BarbarDisable')
end
end,
})

View File

@@ -19,9 +19,9 @@ line-size = 3
;locale = tr_TR.UTF-8
width = 99.7%
height = 25
offset-x = 4
offset-y = 3
; height = 25
; offset-x = 4
; offset-y = 3
padding-left = 2
padding-right = 2
module-margin-left = 3
@@ -29,14 +29,16 @@ module-margin-right = 0
tray-position = right
tray-detached = false
; font-0 = "NotoSans-Regular:size=11;2.5"
; font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5"
; font-2 = "Noto Sans Symbols:size=13;1"
background = ${colors.background}
foreground = ${colors.foreground}
; noto -> text font
; jetbrains -> icons
font-0 = "NotoSans-Regular:size=11;2.5"
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5"
font-2 = "Noto Sans Symbols:size=13;1"
; font-0 = B612:style=Regular:size=9;3
; font-0 = "NotoSans Nerd Font:size=9;3"

View File

@@ -2,6 +2,7 @@
config,
pkgs,
lib,
osConfig,
...
}: let
mypolybar = pkgs.polybar.override {
@@ -37,6 +38,43 @@
# ${ip} route | ${grep} default | ${awk} '{print $5}' > $out
# '';
hd = ''
[bar/mybar]
height = 20
font-0 = "NotoSans-Regular:size=9;2.5"
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=9;2.5"
font-2 = "Noto Sans Symbols:size=9;1"
offset-x = 2
offset-y = 2
'';
fhd = ''
[bar/mybar]
height = 20
font-0 = "NotoSans-Regular:size=11;2.5"
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5"
font-2 = "Noto Sans Symbols:size=11;1"
offset-x = 4
offset-y = 3
'';
qhd = ''
[bar/mybar]
height = 25
font-0 = "NotoSans-Regular:size=11;2.5"
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=11;2.5"
font-2 = "Noto Sans Symbols:size=13;1"
offset-x = 4
offset-y = 3
'';
mon =
if osConfig.res == "1366x768"
then hd
else if osConfig.res == "2560x1440"
then qhd
else fhd;
internets = ''
[module/network]
type = internal/network
@@ -61,7 +99,7 @@ in {
enable = true;
package = mypolybar;
config = ./config.ini;
extraConfig = bctl + internets;
extraConfig = bctl + internets + mon;
# my savior: https://www.reddit.com/r/NixOS/comments/v8ikwq/polybar_doesnt_start_at_launch/
script = ''
# echo "none"

View File

@@ -13,7 +13,6 @@
# ./nitrogen/defualt.nix
./rofi/default.nix
./polybar/default.nix
# wm stuff
./sxhkd/default.nix
./bspwm/default.nix
@@ -23,5 +22,7 @@
./firefox/default.nix
./git/default.nix
./zathura/default.nix
./keepassxc/default.nix
./nf/default.nix
];
}

View File

@@ -0,0 +1,91 @@
@import "/home/synchronous/.config/rofi/styles/colors.rasi"
configuration {
show-icons: false;
}
* {
pink: @base0C;
cyan: @base0F;
green: #9ece6a;
accent-color: @base06;
urgent-color: @base0A;
background-color: transparent;
text-color: @text;
margin: 0;
padding: 0;
}
window {
location: center;
anchor: center;
fullscreen: false;
y-offset: 0px;
enabled: true;
background-color: @background;
cursor: "default";
border: 1px;
border-color: #565657;
width: 500px;
}
inputbar {
enabled: true;
background-color: @prompt;
padding: 10px;
children: ["entry"];
}
entry {
enabled: true;
padding: 0.75em 0.75em;
cursor: text;
}
listview {
enabled: true;
columns: 1;
lines: 10;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
margin: 0.25em 0 0.25em;
cursor: "default";
}
prompt {
text-color: @accent-color;
}
textbox {
padding: 0.5em 1.5em;
background-color: @prompt;
}
element {
enabled: true;
margin: 0 0.25em;
padding: 0.5em 0.75em;
cursor: pointer;
orientation: vertical;
}
element-text {
highlight: @green;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
font: "Liga SFMono Nerd Font 14";
}
element-text selected {
text-color: @cyan;
}

View File

@@ -181,18 +181,18 @@ super + bracket{left,right}
# alacritty -e nvim /home/synchronous/Documents/Obsidian/Journal/Daily.md -c "execute 'normal G' | Goyo | autocmd VimResized * call GoyoWrapper()"
# open my notes file in nvim w/ a new alacritty window, then jump to end of file
super + {o}
open_daily
sh nf daily
# open my notes without goyo and with nvimteee
super + {shift} + {o}
alacritty -e nvim /home/synchronous/journal/Daily.md -c "execute 'normal G' | NvimTreeOpen /home/synchronous/journal"
sh nf daily
# search my notes using rofi and open the right one
super + {ctrl} + {o}
sh /home/synchronous/.scripts/vimwiki/search_notes.sh
sh nf search
super + {ctrl} + {p}
sh /home/synchronous/.scripts/papers/paper-search-cached.sh
# super + {ctrl} + {p}
# sh /home/synchronous/.scripts/papers/paper-search-cached.sh
super + {ctrl} + {l}
sh /home/synchronous/.scripts/papers/paper-search.sh
@@ -211,7 +211,8 @@ super + {alt} + {c}
find /home/synchronous/current-semester -follow -maxdepth 1 | cut -c36- | sed '/^[[:space:]]*$/d' | rofi -dmenu | read rsem; yq ".url" "/home/synchronous/current-semester/$rsem/info.yaml" | xargs firefox
super + {p}
sh /home/synchronous/.scripts/vimwiki/open_todo.sh
# sh /home/synchronous/.scripts/vimwiki/open_todo.sh
nf todo
super + {m}
sh /home/synchronous/.scripts/vimwiki/open-learning.sh

View File

@@ -2,6 +2,8 @@
pkgs,
lib,
system,
config,
osConfig,
...
}: {
home.packages = with pkgs; [zsh-powerlevel10k meslo-lgs-nf];
@@ -39,6 +41,13 @@
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
'';
initExtra = builtins.readFile ./zshrc;
# recall agenix secrets cannot be used at eval time, so we must do this trash
# like what the fuck? I spent 4 hours figuring this out. will i ever reach nix nirvana?
initExtra = ''
${builtins.readFile ./zshrc}
if [ -f "${osConfig.age.secrets.zsh_remote.path}" ]; then
source "${osConfig.age.secrets.zsh_remote.path}"
fi
'';
};
}

View File

@@ -172,7 +172,7 @@ alias ytdl-mp3="yt-dlp -x --audio-format mp3 --audio-quality 0 -o '/home/synchro
alias ntpsync="sudo ntpdate pool.ntp.org"
# alias fb="cd /home/synchronous/code/tob/fb"
alias nuid="echo 002141542"
# alias gb="sh /home/synchronous/.scripts/bluetooth/gb.sh"
alias gb="sh /etc/profiles/per-user/synchronous/bin/gb"
alias gbdc="bluetoothctl disconnect"
# alias sxhkdrc="vim /home/synchronous/.config/sxhkd/sxhkdrc"
# alias bspwmrc="vim /home/synchronous/.config/bspwm/bspwmrc"