Merge remote-tracking branch 'origin/nixos' into dev

This commit is contained in:
Daniel Flanagan 2020-11-05 21:29:53 -06:00
commit a9cd4c2bba
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
82 changed files with 594 additions and 1152 deletions

View file

@ -1,18 +0,0 @@
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;; jk<up><down><escape>
(require 'package)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/"))
(package-initialize)
;; Given all of this, just `package-refresh-contents`
(require 'evil)
(evil-mode 5)

View file

@ -1,52 +0,0 @@
#!/usr/bin/env sh
NUM_DESKTOPS="$(xrq bspwm.num_desktops || echo '10')"
REVERSE_DESKTOP_ORDERING="$(xrq bspwm.reverse_desktop_ordering)"
REVERSE_MONITOR_DESKTOPS="$(xrq bspwm.reverse_monitor_desktops)"
BSPWM_MONITORS=$(bspc query -M)
MONITOR_COUNT=$(echo "$BSPWM_MONITORS" | wc -w | awk '{ printf $1 }')
PER_MONITOR="$(xrq bspwm.num_desktops_per_monitor || echo $((NUM_DESKTOPS / MONITOR_COUNT)))"
DESKTOPS=$(seq "$NUM_DESKTOPS")
[ "$REVERSE_MONITOR_DESKTOPS" -eq 1 ] && BSPWM_MONITORS=$(echo "$BSPWM_MONITORS" | tac)
bspc config normal_border_color "$(xrq bspwm.normal_border_color)"
bspc config focused_border_color "$(xrq bspwm.focused_border_color)"
bspc config active_border_color "$(xrq bspwm.active_border_color)"
bspc config presel_feedback_color "$(xrq bspwm.presel_feedback_color)"
bspc config border_width "$(xrq bspwm.border_width)"
bspc config split_ratio "$(xrq bspwm.split_ratio)"
bspc config window_gap "$(xrq bspwm.window_gap)"
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config pointer_modifier "mod4"
bspc config remove_unplugged_monitors true
bspc config remove_disabled_monitors true
bspc rule -a "*" split_dir=right
i=1
total_screens=0
for mon in $BSPWM_MONITORS; do
max=$((i + PER_MONITOR - 1))
screens=""
for j in $(seq $i $max); do
[[ "$total_screens" -ge "$NUM_DESKTOPS" ]] || screens="${screens}${j} "
total_screens=$((total_screens+1))
echo $NUM_DESKTOPS $total_screens $screens
done
bspc monitor "$mon" -d $screens
i=$((max + 1))
done
if [ "$REVERSE_DESKTOP_ORDERING" -eq 1 ]; then
prev_mon=
for mon in ${BSPWM_MONITORS}; do
if [ ! -z $prev_mon ]; then
bspc monitor "$mon" --swap "$prev_mon"
fi
prev_mon="$mon"
done
fi
. maybe_source_env_file bspwm-after

View file

@ -1,20 +0,0 @@
#!/usr/bin/env sh
# . "$DOTFILES_PATH/apps/de/x/profile"
BAR_COMMAND="startbar"
BSPWM_STATE_FILE="$HOME/.bspwm_state"
[ -e "$BSPWM_STATE" ] && bspc wm -l "$BSPWM_STATE" && rm "$BSPWM_STATE"
. "$DOTFILES_PATH/apps/de/bspwm/config"
[ -f "$HOME/.fehbg" ] && "$HOME/.fehbg" &
[ "$(xrq bspwm.start_compton)" -eq 1 ] && has_command compton && compton &
[ "$(xrq bspwm.start_bar)" -eq 1 ] && has_command "${BAR_COMMAND}" && "${BAR_COMMAND}" &
has_command urxvtd && urxvtd &
has_command dunst && dunst &
has_command sxhkd && sxhkd -m -1 &
has_command unclutter && unclutter &
bspc wm -o

View file

@ -1,2 +0,0 @@
#!/bin/sh
feh --no-fehbg --bg-fill '/home/daniel/.home/../img/walls/530895_souredapple_clouds.png'

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
bspwm

View file

@ -1,59 +0,0 @@
shadow = true;
clearshadow = true;
shadow-radius = 20;
shadow-offset-x = -20;
shadow-offset-y = -15;
shadow-opacity = 0.5;
shadow-red = 0.0;
shadow-green = 0.0;
shadow-blue = 0.0;
shadow-ignore-shaped = false;
inactive-opacity = 1.0;
active-opacity = 1.0;
frame-opacity = 1.0;
inactive-opacity-override = false;
fading = false;
fade-in-step = 0.06;
fade-out-step = 0.06;
inactive-dim = 0.0;
focus-exclude = [ "n:e:rofi" ]
mark-wmwin-focused = true;
mark-ovredir-focused = false;
detect-rounded-corners = true;
detect-client-opacity = false;
backend = "glx";
vsync = true;
refresh-rate = 100;
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
glx-copy-from-front = false;
xrender-sync-fence = true;
use-damage = true;
dbe = false;
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];
blur-background = true;
blur-background-frame = true;
blur-background-fixed = true;
blur-kern = "3x3box";
blur-method = "kawase";
blur-strength = "50";
opacity-rule
wintypes :
{
tooltip : { fade = false; shadow = false; opacity = 1.0; };
dock : { fade = false; opacity = 1.0; };
dnd : { fade = false; shadow = false; opacity = 1.0; };
};

View file

@ -1,312 +0,0 @@
[global]
monitor = 0
follow = keyboard
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "900x5-20+20"
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 25
# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised
# to the font height and padding.
notification_height = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 2
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 8
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 2
# Defines color of the frame around the notification window.
frame_color = "#888888"
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# Transient notifications ignore this setting.
idle_threshold = 120
### Text ###
font = Iosevka 9
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 3
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "<b>%s</b> via %a %I %i -> "
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = yes
# When word_wrap is set to no, specify where to ellipsize long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# Merge multiple notifications with the same content
stack_duplicates = true
# Hide the count of merged notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = no
### Icons ###
# Align icons left/right/off
icon_position = right
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 16
# Paths to default icons.
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/32x32/devices/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/firefox-developer-edition -new-tab
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Notification
# Define the class of the windows spawned by dunst
class = Notification
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
# startup_notification = true
startup_notification = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = true
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
close = ctrl+space
# Close all notifications.
close_all = ctrl+shift+space
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1". Make sure this key actually exists on your keyboard layout,
# e.g. check output of 'xmodmap -pke'
history = ctrl+grave
# Context menu.
context = ctrl+mod1+space
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#222222"
foreground = "#aaaaaa"
timeout = 5
# Icon for notifications with low urgency, uncomment to enable
#icon = /path/to/icon
[urgency_normal]
background = "#222222"
foreground = "#ffffff"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#icon = /path/to/icon
[urgency_critical]
background = "#f92672"
foreground = "#111111"
frame_color = "#c90642"
timeout = 30
# Icon for notifications with critical urgency, uncomment to enable
#icon = /path/to/icon
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
# vim: ft=cfg

View file

@ -1,9 +0,0 @@
Section "InputClass"
Identifier "libinput touchpad"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on"
Option "NaturalScrolling" "true"
Option "DisableWhileTyping" "false"
EndSection

View file

@ -2,7 +2,7 @@ max-visible=5
default-timeout=30000
background-color=#111111
border-color=#666666
font=iosevka-lyte 11
font=Iosevka 11
progress-color=source #33333388
# format="<b>%s</b>
default-timeout=15000

View file

@ -144,11 +144,11 @@ client.focused_inactive #111111 #111111 #ffffff #111111 #111111
client.unfocused #111111 #111111 #ffffff #111111 #111111
exec_always kanshi
exec mako
exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded."
bar {
swaybar_command waybar
}
exec mako
exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded."
include $ENV_PATH/sway/config.d/main

View file

@ -1,266 +0,0 @@
# node manager shortcuts
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# set modes to tiled/floating for current node
super + {s,f}
bspc node -t {tiled,floating}
# set modes to pseudo_tiled/fullscreen for current node
super + shift + {s,f}
bspc node -t {pseudo_tiled,fullscreen -l above}
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# focus the next floating node
super + ctrl + f
bspc node -f next.floating
# swap positions with the previous node
super + apostrophe
bspc node -s last
# swap the current node with the biggest node on the current desktop
super + m
bspc node -s biggest
# move/swap between nodes using vim-style arrows
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# swap previous/next desktops
super + bracket{left,right}
bspc desktop -f {prev,next}
# preselect the splitting area for the current node
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# clear the splitting area
super + ctrl + {_,shift + }space
bspc {node -p cancel,desktop -c}
# expand the current node
super + alt + {h,j,k,l}
bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10}
# shrink the current node
super + alt + shift + {h,j,k,l}
bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10}
# set node split ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# move a floating window very slowly
super + shift + {Left,Down,Up,Right}
bspc node --move {-1 0, 0 1, 0 -1, 1 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node --move {-20 0, 0 20, 0 -20, 20 0}
# focus/move node to the selected desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} {1-9,10}
# # focus clicked node
~button1
bspc node -f pointed
# set the current node's dimensions to 1920x1080 (for streaming)
super + shift + alt + ctrl + s
wres1080
# # mouse controls for node movement and resizing
# super + button{1-3}
# bspc pointer -g {move,resize_side,resize_corner}
# # simulate mouse2
# shift + super + button1
# bspc pointer -g resize_corner
# # ???
# super + !button{1-3}
# bspc pointer -t %i %i
# # ???
# super + @button{1-3}
# bspc pointer -u
# change node gap and desktop padding
super + plus
bspc config -d focused window_gap $((`bspc config -d focused window_gap` + 5 ))
super + equal
bspc config -m $(bspc query -M | head -n 1) top_padding $TOP_BAR_PADDING; bspc config -m $(bspc query -M | head -n 1) bottom_padding $BOTTOM_BAR_PADDING; bspc config -d focused window_gap $WINDOW_GAP
super + minus
bspc config -d focused window_gap $((`bspc config -d focused window_gap` - 5 ))
super + alt + r
bspc config -m $(bspc query -M | head -n 1) bottom_padding $BOTTOM_BAR_PADDING; bspc config -m $(bspc query -M | head -n 1) top_padding $TOP_BAR_PADDING; bspc config -d focused window_gap $WINDOW_GAP
super + alt + equal
bspc config -d focused bottom_padding 0; bspc config -d focused top_padding 0; bspc config -d focused left_padding 0; bspc config -d focused right_padding 0
super + alt + plus
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5); bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5)
super + ctrl + alt + k
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) - 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) - 5)
super + ctrl + alt + j
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5)
super + ctrl + alt + h
bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) - 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) - 5)
super + ctrl + alt + l
bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5)
super + alt + plus
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) + 5); bspc config -d focused top_padding $(expr $(bspc config -d focused top_padding) + 5); bspc config -d focused left_padding $(expr $(bspc config -d focused left_padding) + 5); bspc config -d focused right_padding $(expr $(bspc config -d focused right_padding) + 5)
super + ctrl + alt + shift + space
bspc config -d focused bottom_padding 0; bspc config -d focused top_padding 0; bspc config -d focused left_padding 0; bspc config -d focused right_padding 0
super + ctrl + alt + space
bspc config -d focused bottom_padding 200; bspc config -d focused top_padding 200; bspc config -d focused left_padding 400; bspc config -d focused right_padding 400
super + alt + minus
bspc config -d focused bottom_padding $(expr $(bspc config -d focused bottom_padding) - 5)
# rotate the current node
super + r
bspc node -R 90
# balance the current node's leaves
super + shift + b
bspc node -B
# balance the current node's sibling leaves
super + ctrl + b
bspc node -f parent && bspc node -B
# wm-independant shortcuts
# spawn a transparent node
super + alt + t
"$TERMINAL" && compton-trans -c -o 0
# make current node transparent
super + t
compton-trans -c -o 0
# make current node fully opaque
super + shift + t
compton-trans -c -o 100
# swap sxhkd config with an alternate file and reload the new one
# super + shift + alt + ctrl + r
# if [ -e ~/.config/sxhkd/altsxhkdrc ]; then mv ~/.config/sxhkd/sxhkdrc ~/.config/sxhkd/origsxhkdrc && mv ~/.config/sxhkd/altsxhkdrc ~/.config/sxhkd/sxhkdrc && pkill -USR1 -x sxhkd; fi
# spawn a terminal
super + Return
"$TERMINAL"
# spawn a rock-solid and reliable terminal for when I break things
super + alt + Return
urxvt
# spawn a floating terminal
super + shift + Return
bspc rule -a '*' -o state=floating && "$TERMINAL"
# spawn the app launcher
super + space
app-launcher -modi run -show run
# lock the desktop
super + ctrl + shift + l
dm-tool switch-to-greeter
# $SHELL -c '$DOTFILES_PATH/env/x/screensaver/lock.sh'
# spawn gui file explorer
super + e
thunar
# volumes controls and media navigation for media keys
{_,shift + }XF86AudioLowerVolume
amixer -D pulse sset Master 5%-
# pulseaudio-ctl lower
# ADJ={10,1} && amixer -c 1 sset Speaker $ADJ%- && amixer -c 1 sset Headphone $ADJ%- && amixer -c 1 sset Master $ADJ%- && update_bar_MasterVolume
{_,shift + }XF86AudioRaiseVolume
amixer -D pulse sset Master 5%+
# pulseaudio-ctl raise
# ADJ={10,1} && amixer -c 1 sset Speaker $ADJ%+ && amixer -c 1 sset Headphone $ADJ%+ && amixer -c 1 sset Master $ADJ%+ && update_bar_MasterVolume
XF86AudioMute
amixer -D pulse sset Master toggle
# pulseaudio-ctl mute
# amixer -c 1 sset Master toggle && update_bar_MasterVolume
XF86AudioPlay
mpc toggle
XF86AudioNext
mpc next
XF86AudioPrev
mpc prev
# monitor brightness controls for monitor birghtness keys
{_,shift + }XF86MonBrightnessUp
xbacklight + 10
{_,shift + }XF86MonBrightnessDown
xbacklight - 10
# open rofi as a window switcher
super + w
"app-launcher" -modi window,run -show window
super + shift + v
sh -c 'kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.sh.pid")'
super + shift + v
sh -c 'kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.sh.pid")'
super + shift + e
rofimoji --insert-with-clipboard --rofi-args='--sort -sorting-method fzf'
super + shift + p
rofi-pass
# close the current application
super + c
bspc node -c
# kill the current application
super + shift + c
bspc node -k
# kill the wm, if alt is held, it will reload instead of truly quitting...
# I think?
super + ctrl + {alt +,_} Escape
sh -c '{bspc wm -d > "$BSPWM_STATE_FILE" && bspc quit, bspc quit 1}'
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
super + ctrl + c
bspc rule -a '*' -o state=floating && kitty -o remember_window_size=no -o initial_window_width=66c -o initial_window_height=10c sh -c "cal -n 3 && printf 'Press [ENTER] to close.' && read"
super + ctrl + p
pass-chooser

View file

@ -54,7 +54,7 @@
"interval": 3
},
"memory": {
"format": "{} <span foreground=\"#666666\"></span>"
"format": "{} <span foreground=\"#666666\"></span>"
},
"temperature": {
// "thermal-zone": 2,
@ -92,14 +92,14 @@
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume} <span foreground=\"#666666\">{icon}</span> {format_source}",
"format": "{volume} <span weight='900' face=\"Font Awesome 5 Free\" foreground=\"#666666\">{icon}</span> {format_source}",
//"format": "{volume}% {icon} {format_source}",
//"format-bluetooth": "{volume}% {icon} {format_source}",
//"format-bluetooth-muted": " {icon} {format_source}",
//"format-muted": " {format_source}",
"format-muted": "<span foreground=\"#666666\"></span> {format_source}",
"format-source": "<span foreground=\"#666666\"></span>",
"format-source-muted": "<span foreground=\"#666666\"></span>",
//"format-muted": " {format_source}",
"format-muted": "<span foreground=\"#666666\"></span> {format_source}",
"format-source": "<span foreground=\"#f92672\"> </span>",
"format-source-muted": "<span foreground=\"#66d9ef\"> </span>",
"format-icons": {
"headphones": "",
"handsfree": "",
@ -107,8 +107,9 @@
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
"default": ["", "", ""]
},
// TODO: toggle mute?
"on-click": "pavucontrol"
}
}

View file

@ -1,8 +1,7 @@
* {
border: none;
border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */
font-family: "Iosevka", Roboto, Helvetica, Arial, sans-serif;
font-family: "Iosevka", "Font Awesome 5 Free", sans-serif;
font-size: 16px;
min-height: 0;
}

View file

@ -1,14 +0,0 @@
#!/usr/bin/env sh
# as far as I can tell, this file is only executed when you run startx from the
# TTY - you probably want to modify xprofile
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config"
[ -z "$DOTFILES_PATH" ] && export DOTFILES_PATH="$XDG_CONFIG_HOME/dotfiles"
. "$DOTFILES_PATH/bin/prelude"
[ -f "$HOME/.xprofile" ] && . "$HOME/.xprofile"
[ -f "$ENV_PATH/x/init" ] && . "$ENV_PATH/x/init"
exec "$DOTFILES_PATH/apps/de/bspwm/wmstart"

View file

@ -1,23 +0,0 @@
#!/usr/bin/env sh
xqm() {
f="$1"; shift; [ -f "$f" ] && xrdb -merge "$f" "$@" &>/dev/null
}
xqm "/etc/X11/xinit/.Xresources"
xqm "$HOME/.Xresources"
xqm "$DOTFILES_PATH/bin/lib/colors/xresources"
xqm "$ENV_PATH/x/resources"
sysmodmap="/etc/X11/xinit/.Xmodmap"
usermodmap="$ENV_PATH/x/modmap"
[ -f "$sysmodmap" ] && xmodmap "$sysmodmap" &>/dev/null
[ -f "$usermodmap" ] && xmodmap "$usermodmap" &>/dev/null
if [ -d "/etc/X11/xinit/xinitrc.d" ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi

View file

@ -1,7 +0,0 @@
! convert caps lock to control
clear Lock
keycode 66 = Control_L
add Control = Control_L
! a fake keycode for xcape
keycode 254 = Escape

View file

@ -1,20 +0,0 @@
#!/usr/bin/env bash
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config"
[ -z "$DOTFILES_PATH" ] && export DOTFILES_PATH="$XDG_CONFIG_HOME/dotfiles"
. "$DOTFILES_PATH/bin/prelude"
[ -f "$DOTFILES_PATH/apps/de/x/loadresources" ] && "$DOTFILES_PATH/apps/de/x/loadresources"
[ -f "$HOME/.xmodmap" ] && xmodmap "$HOME/.xmodmap"
has_command libinput-gestures-setup && libinput-gestures-setup start
has_command autorandr && autorandr -c
# has_command redshift && redshift -r -l 39.1:-94.6 -t 6500K:3000K &
has_command kdeconnect-indicator && kdeconnect-indicator &
has_command gnome-keyring-daemon && eval "$(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)"
export SSH_AUTH_SOCK
xset r rate 250 80 & # keyrepeat
source maybe_source_env_file x/profile

View file

@ -1,6 +1,6 @@
profile desktop-H {
output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,560 scale 1 transform normal
output "Dell Inc. DELL U2719DC 5DL4QS2" enable mode 2560x1440@60Hz position 0,0 scale 1 transform 270
output "Dell Inc. DELL U2719DC 9DL4QS2" enable mode 2560x1440@60Hz position 4880,0 scale 1 transform 90
output "Dell Inc. DELL U2719DC 5DL4QS2" enable mode 2560x1440@60Hz position 0,0 scale 1 transform 90
output "Dell Inc. DELL U2719DC 9DL4QS2" enable mode 2560x1440@60Hz position 4880,0 scale 1 transform 270
exec "$HOME/.config/dotfiles/apps/kanshi/desktop-H-workspaces.sh"
}

View file

@ -23,15 +23,11 @@ enable_audio_bell yes
url_style curly
# https://google.com
strip_trailing_spaces smart
kitty_mod ctrl+shift+alt
open_url_modifiers ctrl
# dark theme
# TODO: generate via color scheme generator
background #111111
@ -56,7 +52,7 @@ color13 #f5f4f1
color14 #cc6633
color15 #f9f8f5
# color18 #333333
color18 #333333
# # light theme
#
@ -83,9 +79,7 @@ color15 #f9f8f5
# color15 #f9f8f5
#
# color18 #cccccc
#
color18 #333333
kitty_mod ctrl+shift+alt
open_url_modifiers ctrl
wheel_scroll_multiplier 5.0

View file

@ -140,10 +140,6 @@ alias pa="pulsemixer"
# this sometimes fixes steam dynamic library issues?
alias lsteam="LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' steam"
# override the man commands with vim
alias _man="\\man"
alias man="vman"
# neomutt is better
alias mutt="neomutt"

View file

@ -71,6 +71,7 @@ alias cdc "d $XDG_CONFIG_HOME" # go to ~/.config
alias cdn "d $NOTES_PATH"
alias cdl "d $XDG_DOWNLOAD_DIR"
alias cdg "d $XDG_GAMES_DIR"
alias cdnx "d $DOTFILES_PATH/env/nix"
# quick parent-directory aliases
alias .. "d .."

View file

@ -67,3 +67,7 @@ if has_command tmux && string match -v -q '*tmux*' $TERM && string match -v -q '
tmux start-server
tmux attach -t default || tmux new -s default
end
if set -q $__HM_SESS_VARS_SOURCED
exec bash -c "source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh; exec fish"
end

View file

@ -48,3 +48,8 @@ set -Ux TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/
set -Ux NOTES_PATH $XDG_DOCUMENTS_DIR/notes
set -Ux USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs
set -Ux SCROTS_PATH $XDG_PICTURES_DIR/scrots
if test -n "$NIX_PATH"
set NIX_PATH :
end
set -Ux NIX_PATH $HOME/.nix-defexpr/channels:$NIX_PATH

View file

@ -1,2 +0,0 @@
# Suspend the system when battery level drops to 3% or lower
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/usr/bin/systemctl hibernate"

View file

@ -1 +0,0 @@
ACTION=="add", SUBSYSTEM=="usb_device", RUN+="xset r rate 300 80"

View file

@ -1 +0,0 @@
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", RUN+="/usr/bin/iw dev $name set power_save on"

View file

@ -1,7 +1,4 @@
#!/usr/bin/env sh
if is_wayland; then
floating-term sh -c "launch | xargs swaymsg exec --"
else
rofi -combi-modi run,window -show combi -modi combi -sorting-method fzf --sort "$@"
fi
source "$HOME/.config/dotfiles/bin/prelude"
floating-term sh -c "launch | xargs swaymsg exec --"

View file

@ -1,21 +1,8 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
# TODO: geomoetry flags?
flags=("")
case "$TERMINAL" in
kitty )
flags=(-o remember_window_size=no -o initial_window_width=60c -o initial_window_height=12c --class floating_terminal)
;;
# TODO: rxvt?
esac
if is_wayland; then
# wayland only needs app_id or class set to "floating_terminal"
: # no-op
else
bspc rule -a '*' -o state=floating
fi
"$TERMINAL" "${flags[@]}" "$@"
kitty \
-o remember_window_size=no \
-o initial_window_width=60c \
-o initial_window_height=12c \
--class floating_terminal \
"$@"

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash
LAUNCHER_HISTORY_FILE="$ENV_PATH/launch.log"
LAUNCHER_HISTORY_FILE="$HOME/.local/share/lytelaunch/launch.log"
mkdir --parents "$(dirname "$LAUNCHER_HISTORY_FILE")"
touch "$LAUNCHER_HISTORY_FILE"
app="$(
< "$LAUNCHER_HISTORY_FILE" \

View file

@ -22,8 +22,10 @@ links=(
"apps/udev-rules/lowbat" "/etc/udev/rules.d/99-lowbat.rules"
"apps/udev-rules/wifi-powersave" "/etc/udev/rules.d/81-wifi-powersave.rules"
"apps/udev-rules/gcadapter" "/etc/udev/rules.d/51-gcadapter.rules"
"apps/udev-rules/wifi-powersave" "/etc/udev/rules.d/81-wifi-powersave.rules"
# tmpfiles
# TODO: does this even do anything anymore?
"apps/tmpfiles/disable-lid-wakeup" "/etc/tmpfiles.d/disable-lid-wakeup.conf"
# lightdm

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
"$TERMINAL"

View file

@ -1,6 +0,0 @@
[user]
signingkey = daniel@lytedev.io
[commit]
gpgsign = true

View file

@ -8,7 +8,7 @@
imports = [
./hardware-configuration.nix
# TODO: fork?
(import "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos")
(import "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos")
];
home-manager.users.daniel = {

View file

@ -1,8 +0,0 @@
#define bar_font_size 12
# TODO: this needs fixing
polybar.primary_font: iosevka\-lyte:pixelsize=bar_font_size;1
bspwm.num_desktops_per_monitor: 3
bspwm.reverse_desktop_ordering: 0
bspwm.reverse_monitor_desktops: 0
polybar.display_monitor: DisplayPort-0
polybar.height: 40

View file

@ -1,6 +0,0 @@
[user]
signingkey = daniel@lytedev.io
[commit]
gpgsign = true

View file

@ -1,40 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [ "resume=/swapfile" "resume_offset=874496" ];
boot.resumeDevice = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
fsType = "ext4";
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3EB9-C18F";
fsType = "vfat";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3EB9-C18F";
fsType = "vfat";
};
swapDevices = [
{
device = "/swapfile";
priority = 0;
size = 16000;
}
];
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# High-DPI console
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# High-DPI console
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
}

9
env/laptop/polybar vendored
View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
export BAR_SIDE_MARGIN=0
export BAR_HEIGHT=80
[[ -v OVERRIDE_BAR_MONITOR ]] && export BAR_MONITOR="$OVERRIDE_BAR_MONITOR"
[[ -v OVERRIDE_BAR_HEIGHT ]] && export BAR_HEIGHT="$OVERRIDE_BAR_HEIGHT"
return 0

View file

@ -1,6 +1,8 @@
exec libinput-gestures -c $DOTFILES_PATH/apps/de/libinput/sway-gestures.conf
output eDP-1 res 1600x900 pos 0 0
exec libinput-gestures -c $HOME/.config/dotfiles/apps/de/libinput/sway-gestures.conf
exec gammastep -t 6500:3500 -l 39.0:-94.5
# exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000'
exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000'
bindswitch lid:toggle exec swaylock
@ -15,7 +17,3 @@ input type:touchpad {
input type:keyboard {
xkb_options ctrl:nocaps
}
# TODO: setup displays (when docked for work?)
output eDP-1 res 1600x900 pos 0 0

0
env/laptop/vim vendored
View file

View file

@ -1,7 +0,0 @@
dpi: 92
.dpi: 92
*dpi: 92
Xft.dpi: 92
polybar.display_monitor: DP1-1-8
polybar.height: 40

View file

@ -1,7 +0,0 @@
dpi: 92
.dpi: 92
*dpi: 92
Xft.dpi: 92
polybar.display_monitor: eDP1
polybar.height: 40

View file

@ -1,4 +0,0 @@
polybar.display_monitor: DP1-1
polybar.height: 40
bspwm.reverse_monitor_desktops: 1
bspwm.reverse_desktop_ordering: 1

View file

@ -1,3 +0,0 @@
#!/usr/bin/env sh
has_command xcape && xcape -e 'Control_L=Escape' &

View file

@ -1,21 +0,0 @@
#define mono_font iosevka-lyte
#define mono_font_size 12
#define bar_font_size 12
#define icon_font Font Awesome 5 Free Solid
#define icon_font_size 12
*.font: xft:mono_font:pixelsize=mono_font_size,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14
*.boldFont: xft:mono_font:style=bold:pixelsize=mono_font_size,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14
# URxvt.font: xft:mono_font:pixelsize=32,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14
# URxvt.boldFont: xft:mono_font:style=bold:pixelsize=32,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14
dpi: 190
.dpi: 190
*dpi: 190
Xft.dpi: 190
polybar.height: 70
polybar.display_monitor: eDP1
polybar.primary_font: mono_font:pixelsize=bar_font_size;1
polybar.secondary_font: icon_font:style=Regular:pixelsize=icon_font_size;1

48
env/nix/machines/third.nix vendored Normal file
View file

@ -0,0 +1,48 @@
{ config, pkgs, ... }: {
imports = [
../profiles/laptop.nix
../modules/systemd-boot-efi.nix
../modules/intel.nix
../modules/docker.nix
../modules/network-manager.nix
../modules/bluetooth.nix
../modules/pulseaudio.nix
../modules/de/sway.nix
../modules/users/daniel.nix
../modules/users/valerie.nix
];
networking = {
hostName = "third.lyte.dev";
firewall.enable = false;
networkmanager.wifi.powersave = true;
};
services.fwupd = {
enable = true;
};
console.useXkbConfig = true;
services.xserver.xkbOptions = "ctrl:nocaps";
# TODO: setup caps-lock as Control/Escape?
# console.font = "TER16x32";
services.xserver.displayManager.lightdm.greeters.gtk.extraConfig = ''
xft-dpi=260
'';
swapDevices = [ { device = "/swapfile"; size = (1024*16); } ];
boot = {
# fallocate -l 16G /swapfile
resumeDevice = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
# sudo filefrag -v /swapfile | head -n 4 | tail -n 1 | \
# tr -s "[:blank:]" | field 5 | tr -d ":"
kernelParams = [ "resume_offset=874496" ];
};
# services.upower = {
# enable = true;
# criticalPowerAction = "Hibernate";
# };
}

37
env/nix/machines/wallwart.nix vendored Normal file
View file

@ -0,0 +1,37 @@
{ config, pkgs, ... }: {
imports = [
../profiles/desktop.nix
../modules/systemd-boot-efi.nix
../modules/amd.nix
../modules/amd-gpu.nix
../modules/docker.nix
../modules/network-manager.nix
../modules/bluetooth.nix
../modules/pulseaudio.nix
../modules/de/sway.nix
../modules/users/daniel.nix
../modules/users/valerie.nix
];
networking = {
hostName = "wallwart.lyte.dev";
firewall.enable = false;
};
environment = {
systemPackages = with pkgs; [ ntfs3g ];
};
fileSystems."/storage/ext".options = [ "defaults" "user" "nofail" ];
fileSystems."/storage/butter".options = [ "defaults" "auto" "nofail" ];
fileSystems."/storage/windows" = {
device = "/dev/disk/by-uuid/AE624593624560E7";
fsType = "ntfs";
options = [ "defaults" "auto" "nofail" ];
};
fileSystems."/storage/shared" = {
device = "/dev/disk/by-uuid/26F6144A6B518523";
fsType = "ntfs";
options = [ "defaults" "auto" "nofail" ];
};
}

3
env/nix/modules/amd-gpu.nix vendored Normal file
View file

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
services.xserver.videoDrivers = [ "amdgpu" ];
}

5
env/nix/modules/amd.nix vendored Normal file
View file

@ -0,0 +1,5 @@
{ config, pkgs, ... }: {
hardware = {
cpu.amd.updateMicrocode = true;
};
}

3
env/nix/modules/bash.nix vendored Normal file
View file

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
environment.systemPackages = [ pkgs.bash ];
}

3
env/nix/modules/bluetooth.nix vendored Normal file
View file

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
hardware.bluetooth.enable = true;
}

21
env/nix/modules/de/graphics.nix vendored Normal file
View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }: {
imports = [ ../lightdm.nix ];
fonts.fonts = with pkgs; [ iosevka ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
environment = {
systemPackages = with pkgs; [
glxinfo
firefox-devedition-bin
pavucontrol
brightnessctl
];
};
qt5 = {
platformTheme = "gtk2";
style = "gtk2";
};
}

57
env/nix/modules/de/sway.nix vendored Normal file
View file

@ -0,0 +1,57 @@
{ config, pkgs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
in {
imports = [ ./graphics.nix ];
fonts.fonts = with pkgs; [
noto-fonts-emoji font-awesome
];
programs = {
sway = {
enable = true;
extraPackages = with pkgs; [
swaylock
swayidle
unstable.mako unstable.libnotify
waybar
wl-clipboard
slurp
grim
unstable.font-awesome
unstable.xwayland
unstable.kanshi
unstable.gammastep
];
extraSessionCommands = ''
systemctl --user import-environment
export TERMINAL=kitty
export BROWSER=firefox-devedition
export WLC_REPEAT_DELAY=200
export WLC_REPEAT_RATE=60
export CLUTTER_BACKEND=wayland
export SDL_VIDEODRIVER=wayland
export MOZ_ENABLE_WAYLAND=1
export XDG_SESSION_TYPE=wayland
export XDG_CURRENT_DESKTOP=sway
'';
};
};
services = {
pipewire.enable = true;
xserver.libinput = {
enable = true;
tapping = true;
naturalScrolling = true;
disableWhileTyping = false;
};
};
xdg.portal = {
enable = true;
gtkUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
unstable.xdg-desktop-portal-wlr
];
};
}

7
env/nix/modules/docker.nix vendored Normal file
View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }: {
virtualisation.docker = {
enable = true;
enableOnBoot = false;
};
environment.systemPackages = [ pkgs.docker-compose ];
}

11
env/nix/modules/fish.nix vendored Normal file
View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
in {
programs.fish = {
enable = true;
};
environment.systemPackages = [ unstable.fish ];
}

19
env/nix/modules/intel.nix vendored Normal file
View file

@ -0,0 +1,19 @@
{ config, pkgs, ... }: {
services.xserver.videoDrivers = [ "intel" ];
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
};
hardware = {
cpu.intel.updateMicrocode = true;
opengl = {
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
}

25
env/nix/modules/lightdm.nix vendored Normal file
View file

@ -0,0 +1,25 @@
{ config, pkgs, ... }: {
# services.xserver.displayManager.defaultSession
services.xserver = {
enable = true;
displayManager.lightdm = {
enable = true;
greeter = {
enable = true;
};
greeters.gtk = {
enable = true;
theme = {
package = pkgs.arc-theme;
name = "Arc-Dark";
};
clock-format = "%H:%M:%S";
extraConfig = ''
font-name=Iosevka
'';
};
# background = "";
};
};
environment.systemPackages = with pkgs; [ lightdm lightdm_gtk_greeter ];
}

20
env/nix/modules/neovim.nix vendored Normal file
View file

@ -0,0 +1,20 @@
{ config, pkgs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
aliases = { vim = "nvim"; vi = "nvim"; };
in
{
environment = {
systemPackages = [ unstable.neovim ];
variables = {
EDITOR = "nvim";
PAGER = "nvim";
VISUAL = "nvim";
MANPAGER = "nvim +Man!";
MANWIDTH = "80";
};
shellAliases = aliases;
};
programs.bash.shellAliases = aliases;
programs.fish.shellAliases = aliases;
}

4
env/nix/modules/network-manager.nix vendored Normal file
View file

@ -0,0 +1,4 @@
{ config, pkgs, ... }: {
networking.networkmanager.enable = true;
environment.systemPackages = [ pkgs.networkmanager ];
}

9
env/nix/modules/pulseaudio.nix vendored Normal file
View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }: {
hardware.pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
};
nixpkgs.config.pulseaudio = true;
sound.enable = true;
}

8
env/nix/modules/systemd-boot-efi.nix vendored Normal file
View file

@ -0,0 +1,8 @@
{ config, pkgs, ... }: {
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
}

7
env/nix/modules/tmux.nix vendored Normal file
View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }: {
environment.systemPackages = [ pkgs.tmux ];
programs.tmux = {
enable = true;
};
}

57
env/nix/modules/users/daniel.nix vendored Normal file
View file

@ -0,0 +1,57 @@
{ config, pkgs, ... }: {
fonts.fonts = with pkgs; [
# helvetica # needed by zoom
];
users.users.daniel = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
shell = pkgs.fish;
home = "/home/daniel/.home";
packages = with pkgs; [
fortune # fun sayings
steam # games
pulsemixer # audio
file # identify file types
kitty # terminal emulator
fzf # fuzzy finder
dmenu # TODO: currently only using this for dmenu_path in `bin/launch`
ranger # tui for file management
pass # the standard unix password manager
vulkan-tools # vkcube for making sure vulkan still works
rustup
clang
pavucontrol # gui pulseaudio manager
pamixer # tui pulseaudio manager
strongswan # work vpn
gnumake
elixir
postgresql # database
htop # almost as good as bottom (btm)
unzip # needed by a handful of other utilities
autoconf automake # autotools
weechat # irc
python39Full # python 3.9
jq # awk for json
xfce.thunar xfce.thunar-archive-plugin xfce.thunar-volman # gui file manager
mpd # music player daemon
ncmpcpp # ncurses music player client
vlc # video player
# TODO: work module?
google-cloud-sdk # gcloud
kubectl # kubernetes cli
awscli # aws cli
zoom # video conferencing
lastpass-cli
# TODO: move this one to just laptop?
brightnessctl # laptop screen brightness
# nix utils
nox # package querying and installation?
# yay is to pacman, nox is to nix-env
niv # dependency pinning?
lorri # project envrc - like asdf-vm?
];
};
}

7
env/nix/modules/users/valerie.nix vendored Normal file
View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }: {
users.users.valerie = {
isNormalUser = true;
shell = pkgs.fish;
home = "/home/valerie";
};
}

View file

@ -1,129 +0,0 @@
{ config, pkgs, ... }:
{
imports = [ /etc/nixos/hardware-configuration.nix ];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
};
networking = {
networkmanager.enable = true;
hostName = "third.lyte.dev";
};
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
time.timeZone = "America/Chicago";
environment = {
systemPackages = with pkgs; [
fish bash tmux
vim neovim
networkmanager
wget curl w3m
git
pciutils usbutils binutils
ripgrep sd
nodejs python3
rsync
];
variables = {
EDITOR = "nvim";
};
};
fonts.fonts = with pkgs; [ iosevka ];
virtualisation.docker.enable = true;
hardware = {
bluetooth = {
enable = true;
};
pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
# extraConfig = "
# load-module module-switch-on-connect
# ";
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
};
programs = {
fish.enable = true;
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
};
services = {
openssh.enable = true;
};
networking.firewall.enable = false;
sound.enable = true;
users.users.daniel = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
shell = pkgs.fish;
home = "/home/daniel/.home";
packages = with pkgs; [
steam
pulsemixer
file
appimage-run
kitty
sway waybar mako wl-clipboard
firefox-devedition-bin
fzf
fortune
dmenu
ranger
pass
brightnessctl
vulkan-tools # TODO: vulkan?
rustup
clang
pavucontrol
pamixer
strongswan
gnumake
elixir
docker docker-compose
postgresql
htop
google-cloud-sdk
slurp grim
];
};
system.stateVersion = "20.03";
}

1
env/nix/pkgs/config.nix vendored Normal file
View file

@ -0,0 +1 @@
{ allowUnfree = true; }

View file

@ -1,7 +1,4 @@
{ config, pkgs, ... }:
{
programs.home-manager.enable = true;
home.stateVersion = "20.03";
{ config, pkgs, ... }: {
programs.home-manager.enable = true;
home.stateVersion = "20.03";
}

65
env/nix/profiles/base.nix vendored Normal file
View file

@ -0,0 +1,65 @@
{ config, pkgs, ... }: {
imports = [
../modules/fish.nix
../modules/bash.nix
../modules/tmux.nix
../modules/neovim.nix
];
nixpkgs.config.allowUnfree = true;
i18n.defaultLocale = "en_US.UTF-8";
time.timeZone = "America/Chicago";
environment = {
systemPackages = with pkgs; [
less
wget curl
rsync
w3m
git
pciutils usbutils binutils
ripgrep sd fd
unzip
killall
];
};
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
};
services = {
openssh = {
enable = true;
passwordAuthentication = false;
permitRootLogin = "no";
};
};
console = {
earlySetup = true;
colors = [
"111111"
"f92672"
"a6e22e"
"f4bf75"
"66d9ef"
"ae81ff"
"a1efe4"
"f8f8f2"
"75715e"
"f92672"
"a6e22e"
"f4bf75"
"66d9ef"
"ae81ff"
"a1efe4"
"f9f8f5"
];
};
}

3
env/nix/profiles/desktop.nix vendored Normal file
View file

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
imports = [ ./base.nix ];
}

3
env/nix/profiles/laptop.nix vendored Normal file
View file

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
imports = [ ./base.nix ];
}

89
init.sh Executable file
View file

@ -0,0 +1,89 @@
#!/usr/bin/env sh
# NOTE: run this from inside a NixOS installation, not from the live USB/CD
root_home="/root"
daniel_home="/home/daniel/.home"
nice_home="/home/daniel"
dotfiles="/.config/dotfiles"
add_unstable_channel() {
nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
nix-channel --update
}
clone_dotfiles() {
echo "Setting up dotfiles for root..."
mkdir --parents "$1"
git clone "https://git.lyte.dev/lytedev/dotfiles" "$1"
}
symlink_nixos() {
rm --force "/etc/nixos/lytedev"
ln --symbolic "$1" "/etc/nixos/lytedev"
}
setup_wallpaper() {
mkdir --parents "$nice_home/img/walls"
curl --silent --output "$nice_home/img/walls/clouds_by_souredapply.png" \
"https://art.ngfiles.com/images/530000/530895_souredapple_clouds.png"
rm --recursive --force "$daniel_home/.wallpaper"
ln --symbolic "$nice_home/img/walls/clouds_by_souredapply.png" "$daniel_home/.wallpaper"
}
generate_ssh_key() {
mkdir --mode 600 --parents "$daniel_home/.ssh"
keyfile="$daniel_home/.ssh/$(hostname --short)"
ssh-keygen -N '' -t ed25519 -f "$keyfile"
mkdir --mode 640 --parents "$nice_home/public"
cp "$keyfile.pub" "$nice_home/public"
ssh-add "$keyfile"
}
fix_dotfiles_origin() {
cd "$daniel_home$dotfiles"
git remote set-url origin "ssh://git@git.lyte.dev:2222/lytedev/dotfiles.git"
}
setup_home_manager() {
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install
}
init_for_root() {
clone_dotfiles "$root_home$dotfiles"
symlink_nixos "$root_home$dotfiles/env/nix/"
add_unstable_channel
nixos-rebuild switch
chown daniel:users "$daniel_home"
echo "Re-running as user daniel..."
sudo --user daniel "$root_home$dotfiles/init.sh"
}
init_for_daniel() {
clone_dotfiles "$daniel_home$dotfiles"
generate_ssh_key
symlink_nixos "$daniel_home$dotfiles/env/nix/"
setup_wallpaper
# TODO: setup ssh/gpg keys
# TODO: setup password store
fix_dotfiles_origin
}
if [ "$EUID" -eq 0 ]
init_for_root
else
init_for_daniel
fi
echo "Here is this machine's public SSH key:"
echo " $(cat "$daniel_home/.ssh/$(hostname --short).pub")"
echo "It needs to be added to existing cloud-based git accounts"
echo "and other machines before proceeding."
echo
echo "Don't forget to setup GPG keys by importing from an existing machine"
echo "or adding new child keys!"
echo
echo "The simplest method for doing this is to run the following:"
echo ' scp -r "$TARGET_MACHINE:~/.gnupg" "$HOME/.gnupg"

View file

@ -1,61 +1,29 @@
# dotfiles by lytedev
This repository is undergoing some massive changes.
Tread lightly.
```
curl -s -L https://git.lyte.dev/lytedev/dotfiles/raw/branch/nixos/init.sh
```
[🖥️ Upstream][upstream] • [🐙 GitHub Mirror][github]
![Desktop Screenshot][desktop-screenshot]
This repository contains the majority of application or OS configuration files
I use on a daily basis. I keep them public in an effort to inform others who may
not know either how to go about organizing such files or to learn how to achieve
certain behavior in their software and to have quick and easy access for myself
when setting up a new machine.
## Setup
**NOTE**: Unless you're me, you probably shouldn't use my setup exactly. Just
take chunks you like instead! Backup your files first!
```sh
git clone 'https://git.lyte.dev/lytedev/dotfiles.git' '~/.config/dotfiles'
cd '~/.config/dotfiles' && ./setup.bash # follow the instructions!
```
## Priorities
+ Productivity
+ Flexibility and extensibility
+ Primarily configured for Linux
+ Terminal-based applications that play well with others
+ Quick setup
+ Portability
## Primary Applications
+ **Terminal**: Kitty + tmux
+ **Editor**: Neovim
+ **Browser**: Firefox
+ **Music**: Google Play Music in Firefox
+ **Email**: Gmail in Firefox
+ **Image Editing**: Inkscape, Krita, GIMP
+ **Gaming**: Steam, Dolphin Emulator, Lutris
## Workflow
*Coming someday... maybe!*
## Improvements
+ Move to NixOS or Guix? Declarative is the future!
+ Custom Iosevka font with kitty-compatible ligatures?
+ Makefile instead of setup script
+ Vulkan is broken on my desktop
+ `c` (and similar aliases) could utilize `CDPATH` envvar?
+ Better/more secure remote management configuration in dotfiles? [1][1]
+ Setup network file share?
+ Add vim in the terminal as the handler for many MIME types (xdg-open and such)
for the rare time I'm in a file manager or for opening easily from
the browser.
for the rare time I'm in a file manager or for opening easily from
the browser.
+ Unify all the common variables... somehow? (and use templates and `envsubst`?)
+ [Vimux](https://github.com/benmills/vimux)?
+ Custom Iosevka font with kitty-compatible ligatures?
+ Setup network file share?
+ Investigate systemd services that may help with various tasks (homed, etc.)