diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 36f34b8..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -temp/ -result -*.png -*.jpg -*.bak diff --git a/Readme.md b/Readme.md index 8ce20b8..ceac8c2 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ ### Dotfiles for Me - Migrating to Nix -Heavy wip, not ready for use. +Heavy wip, not ready for use. Will eventually manage my servers and computers. diff --git a/config/dunst/scripts/volumeNotify.sh b/config/dunst/scripts/volumeNotify.sh index 6cc9b0d..5145125 100755 --- a/config/dunst/scripts/volumeNotify.sh +++ b/config/dunst/scripts/volumeNotify.sh @@ -11,10 +11,10 @@ if [[ "$mute" == "" ]]; then # Change the volume $(wpctl set-volume @DEFAULT_AUDIO_SINK@ $@) - # Query Pipewire and Parse Volume as an Int + # Query Pipewire and Parse Volume as an Int volume="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')" vol=${volume//.} - + # Send the notification $(dunstify -h int:value:"$vol" Volume: $vol -h string:x-dunst-stack-tag:volume) $(echo $vol > ${XDG_CACHE_HOME:-~/.cache}/eww/vol) diff --git a/config/eww/eww.scss b/config/eww/eww.scss index f7ed844..f528699 100644 --- a/config/eww/eww.scss +++ b/config/eww/eww.scss @@ -1,63 +1,60 @@ -$color-primary: #c6a0f6; -$color-sec: #f5bde6; -$color-bg: #24273a; -$color-plane: #5a2d85; -$color-light: #5b6078; .bar { - background-color: $color-bg; border-radius: 12px; - border: 3px solid $color-light; + } .bat { - color: $color-primary; + color: #cac; + } .circle { margin-top: -2.5rem; - color: $color-primary; + color: #cac; } .workspace-entry { - border: 2px solid $color-primary; border-radius: 20px; + border-width: 2px; + border-style: solid; + border-color: #cac; margin: 2px; + + &.empty { - &.empty {} + } - &.occupied{ - background-color: $color-light; + &.occupied{ } &.current { - background-color: $color-plane; + background-color: #536; } } .power { - color: $color-primary; - font-size: 18; - padding-right: 3px; - padding-bottom: 2px; + color: #cac; + font-size: 20; + padding-top: 2px; + padding-right: 4px; + padding-left: 0px; + padding-bottom: 4px; margin-bottom: 5px; - // margin-left: 1px; - margin: 5px 2px; - background-color: $color-plane; - border: 2px solid; + margin-left: 1px; + background-color: #515; border-radius: 15px; } -.cal { - background-color: $color-primary; - border-radius: 8px; - padding: 5px; -} .clock { - color: $color-primary; - background-color: $color-plane; - border: 2px solid $color-primary; - border-radius: 3px; + background-color: #536; + border-width: 2px; + border-style: solid; + border-color: #cac; + border-radius: 5px; + color: #cac; padding: 2px; margin: 2px; + border-radius: 3px; + } diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index aa76a33..c49aa32 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -1,11 +1,13 @@ -;; VARIABLE DEFINITIONS +;;;; (defpoll time :interval "1s" 'date +%s') +(defwidget clock [] + (box :orientation "vertical" + :halign "center" + :valign "end" + (box :class "clock" {formattime(EWW_TIME, "%H")}) + (box :class "clock" {formattime(EWW_TIME, "%M")}) + )) -;; Audio -(deflisten vol "cat ~/.cache/eww/vol && inotifywait -q -m -e close_write ~/.cache/eww/vol | while read -r filename event; do cat ~/.cache/eww/vol; done") -(defpoll micvol :interval "1m" "wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print $2}'") - -;; Workspace Stuff (deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces") (deflisten current_workspace :initial "..." "bash ~/.config/eww/scripts/get-active-workspace") (deflisten urgent_workspace :initial "..." "bash ~/.config/eww/scripts/get-urgent-workspaces") @@ -19,28 +21,13 @@ (label :text "${workspace.id}") )))))) -;; Screen -(deflisten backlight "brightnessctl g && inotifywait -q -m -e modify /sys/class/backlight/intel_backlight/actual_brightness | while read -r filename event; do cat /sys/class/backlight/intel_backlight/actual_brightness; done") - -;; Widgets - -(defwidget clock [] - (eventbox - :onhover "eww open cal" - (box :orientation "vertical" - :halign "center" - :valign "end" - (box :class "clock" {formattime(EWW_TIME, "%H")}) - (box :class "clock" {formattime(EWW_TIME, "%M")}) - ))) - -(defwidget circle [val prog sty char] +(defwidget circle [val prog sty char] (box :halign "center" :orientation "vertical" :valign "end" - (circular-progress :value prog - :start-at 10 + (circular-progress :value prog + :start-at 10 :clockwise false :thickness 3 :width 30 @@ -51,88 +38,60 @@ (box :class "circle" :style sty char))) (defwidget battery [] - (circle :prog {EWW_BATTERY.BAT1.capacity * (77778 /100000)} + (circle :prog {EWW_BATTERY.BAT1.capacity * (77778 /100000)} :sty "color: ${EWW_BATTERY.BAT1.status == 'Charging' ? '#1a1': EWW_BATTERY.BAT1.capacity < 20 ? '#a11': '#cac'};" :val {EWW_BATTERY.BAT1.capacity} :char "󱐋")) -(defwidget volume [] - (eventbox - :onclick "hyprctl dispatch exec 'pavucontrol -t 3'" - :onscroll "if [ {} == 'up' ]; then /etc/nixos/config/dunst/scripts/volumeNotify.sh 1%+; else /etc/nixos/config/dunst/scripts/volumeNotify.sh 1%-; fi" - (circle :prog {vol * 7/10} - :sty "font-size: 12; margin-right: 2px;" - :val {vol + 1 - 1} - :char ""))) +(deflisten vol "cat ~/.cache/eww/vol && inotifywait -q -m -e close_write ~/.cache/eww/vol | while read -r filename event; do cat ~/.cache/eww/vol; done") + +(defwidget volume [] + (circle :prog {vol * 7/10} + :sty "font-size: 12; margin-right: 2px;" + :val {vol + 1 - 1} + :char "")) + +(defpoll micvol :interval "1m" "wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print $2}'") (defwidget mic [] - (eventbox - :onclick "hyprctl dispatch exec 'pavucontrol -t 4'" - :onscroll "if [ {} == 'up' ]; then wpctl set-volume -l 1 @DEFAULT_SOURCE@ 1%+; else wpctl set-volume @DEFAULT_SOURCE@ 1%-; fi" - (circle :prog {micvol * 70} - :sty "margin-left: 1px;" - :val {micvol *100} - :char "󰍬"))) + (circle :prog {micvol * 70} + :sty "margin-left: 1px;" + :val {micvol *100} + :char "󰍬")) + +(deflisten backlight "brightnessctl g && inotifywait -q -m -e modify /sys/class/backlight/intel_backlight/actual_brightness | while read -r filename event; do cat /sys/class/backlight/intel_backlight/actual_brightness; done") (defwidget brightness [] - (eventbox - :onscroll "if [ {} == 'up' ]; then brightnessctl -d intel_backlight set 1%+; else brightnessctl -d intel_backlight set 1%-; fi" - (circle :prog {(backlight / 960) * 7/10} - :sty "font-size: 12; margin-right: 3px;" - :val {round( backlight / 960, 0) - 1} - :char "󰃠"))) + (circle :prog {(backlight / 960) * 7/10} + :sty "font-size: 12; margin-right: 3px;" + :val {round( backlight / 960, 0) - 1} + :char "󰃠")) (defwidget power [] - (eventbox - :onclick "hyprctl dispatch exec 'wlogout'" - (box :class "power" :valign "end" "⏻"))) - -(defwidget tray [] - (systray :orientation "v" :icon-size 20)) - - -;; Upper Level Widgets - + (box :class "power" :valign "end" "⏻")) (defwidget bar [] (centerbox :orientation "vertical" - :halign "center" - :space-evenly false - (_workspaces) - (clock) - (box :orientation "vertical" :spacing -25 :valign "end" - (brightness) - (mic) - (volume) - (battery) - (tray) - (power)))) + :halign "center" + :space-evenly false + (_workspaces) + (clock) + (box :orientation "vertical" :spacing -25 :valign "end" + (brightness) + (mic) + (volume) + (battery) + (power)))) -(defwidget cal [] - (box - :class "cal" - (eventbox - :onhoverlost "eww close cal" - (calendar)))) - - -;; Windows (defwindow bar - :monitor 0 - :geometry (geometry :x "4px" - :height "98%" - :anchor "left center") - :stacking "fg" - :exclusive true - :class "bar" + :monitor 0 + :geometry (geometry :x "4px" + :y "1%" + :width "2.5%" + :height "98%" + :anchor "left center") + :stacking "fg" + :exclusive true + :class "bar" (bar)) - -(defwindow cal - :monitor 0 - :geometry (geometry :x "4px" - :anchor "left center") - :stacking "fg" - :exclusive false - :class "bar" - (cal)) diff --git a/config/eww/scripts/get-active-workspace b/config/eww/scripts/get-active-workspace index 6f7fc6b..7bb8fe3 100755 --- a/config/eww/scripts/get-active-workspace +++ b/config/eww/scripts/get-active-workspace @@ -2,5 +2,5 @@ hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id' -socat -u UNIX-CONNECT:/run/user/1000/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | +socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}' diff --git a/config/foot/catppuccin-macchiato.ini b/config/foot/catppuccin-macchiato.ini deleted file mode 100644 index 3dd9312..0000000 --- a/config/foot/catppuccin-macchiato.ini +++ /dev/null @@ -1,37 +0,0 @@ -[cursor] -color=181926 f4dbd6 - -[colors] -foreground=cad3f5 -background=24273a - -regular0=494d64 -regular1=ed8796 -regular2=a6da95 -regular3=eed49f -regular4=8aadf4 -regular5=f5bde6 -regular6=8bd5ca -regular7=b8c0e0 - -bright0=5b6078 -bright1=ed8796 -bright2=a6da95 -bright3=eed49f -bright4=8aadf4 -bright5=f5bde6 -bright6=8bd5ca -bright7=a5adcb - -16=f5a97f -17=f4dbd6 -18=c6a0f6 - -selection-foreground=cad3f5 -selection-background=454a5f - -search-box-no-match=181926 ed8796 -search-box-match=cad3f5 363a4f - -jump-labels=181926 f5a97f -urls=8aadf4 diff --git a/config/foot/foot.ini b/config/foot/foot.ini deleted file mode 100644 index 3190d53..0000000 --- a/config/foot/foot.ini +++ /dev/null @@ -1,18 +0,0 @@ -# -*- conf -*- - -[main] -include=~/.config/foot/catppuccin-macchiato.ini - -font=monospace:size=10 - -[colors] -alpha = .65 - -[key-bindings] - spawn-terminal=Control+Shift+n - -# Fixes the SHIFT+ENTER escape sequence from showing -# Git Issue: https://codeberg.org/dnkl/foot/issues/1358 -[text-bindings] - \x0d = Control+Return Shift+Return Control+Shift+Return - \x20 = Shift+space diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index 9dd9949..ecc2103 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -1,39 +1,32 @@ # Binding Config File for Hyprland # Main Bindings +# +# Foot, you done goofed +bind=ALT,RETURN,exec,foot +#bind=ALT,RETURN,exec,kitty -# Programs -bind=ALT,A,exec,footclient nvim -bind=ALT,B,exec,swaylock -bind=ALT,E,exec,dolphin -bind=ALT,G,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh -bind=ALT,C,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh clip -bind=ALT,RETURN,exec,footclient -bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images - - -# Basic Actions bind=ALT,Q,killactive, -bind=ALT,V,togglefloating, -bind=ALTSHIFT,M,fullscreen,0 bind=SUPER,M,exec,hyprctl dispatch exit 0 - -# Screenshots -bind=,Print,exec,slurp | grim -t jpeg -g - - | wl-copy -bind=SHIFT,Print,exec,slurp | grim -t jpeg -g - Downloads/screenshot.jpeg -bind=SHIFTSUPER,Print,exec,hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -t jpeg -g - - | wl-copy -bind=SUPER,Print,exec,hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - Downloads/screenshot.jpeg +bind=ALT,E,exec,dolphin +bind=ALT,V,togglefloating, +bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images +bind=ALTSHIFT,F,fullscreen,1 +bind=ALTSHIFT,M,fullscreen,0 +bind=,Print,exec,grim -g "$(slurp)" -t jpeg - | wl-copy +bind=SHIFT,Print,exec,grim -g "$(slurp)" -t jpeg Downloads/screenshot.jpeg # trigger when the switch is toggled -bindl=,switch:Lid Switch,exec,swaylock +bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale + # Games -bind=ALTSHIFT,C,exec,steam-run "~/Documents/Games/Celeste/Celeste" -bind=ALTSHIFT,O,exec,osu\! -bind=ALTSHIFT,R,exec,steam-run "~/Documents/Games/factorio/bin/x64/factorio" -bind=ALTSHIFT,S,exec,steam-run "~/Documents/Games/Stardew Valley/StardewValley" -bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "~/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" +bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -F fsr -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" +bind=ALTSHIFT,O,exec,osu-lazer +bind=ALTSHIFT,C,exec,"/home/flyingstitchman/Documents/Games/Celeste/Celeste" +bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley" +bind=ALTSHIFT,R,exec,"/home/flyingstitchman/Documents/Games/factorio/bin/x64/factorio" # Window Moving @@ -42,7 +35,7 @@ bindm=SUPER,mouse:273,resizewindow # Quick Bindings bindle=,XF86MonBrightnessDown,exec,brightnessctl -d intel_backlight set 1%- -bindle=,XF86MonBrightnessUp,exec,brightnessctl -d intel_backlight set +1% +bindle=,XF86MonBrightnessUp,exec,brightnessctl -d intel_backlight set +1% bindle=,XF86AudioRaiseVolume,exec,${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/volumeNotify.sh 1%+ bindle=,XF86AudioLowerVolume,exec,${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/volumeNotify.sh 1%- @@ -65,16 +58,6 @@ bind=ALTSHIFT,k,swapwindow, u bind=ALTSHIFT,h,swapwindow, l bind=ALTSHIFT,l,swapwindow, r -## Special Workspaces ## - -# Firefox -bind=ALT,F,togglespecialworkspace,firefox -bind=ALTSHIFT,F,movetoworkspace,special:firefox - -# Chat Programs -bind=ALT,S,togglespecialworkspace,chat -bind=ALTSHIFT,S,movetoworkspace,special:chat - # Switch Workspace Bindings bind=ALT,1,workspace,1 bind=ALT,2,workspace,2 @@ -99,16 +82,24 @@ bind=ALTSHIFT,8,movetoworkspace,8 bind=ALTSHIFT,9,movetoworkspace,9 bind=ALTSHIFT,10,movetoworkspace,0 -## Resizing Windows ## -binde=SUPER,L,resizeactive,10 0 -binde=SUPER,H,resizeactive,-10 0 -binde=SUPER,K,resizeactive,0 -10 -binde=SUPER,J,resizeactive,0 10 +# Submap for resizing windows +bind=ALT,R,submap,resize # will switch to a submap called resize -binde=SUPERSHIFT,L,resizeactive,50 0 -binde=SUPERSHIFT,H,resizeactive,-50 0 -binde=SUPERSHIFT,K,resizeactive,0 -50 -binde=SUPERSHIFT,J,resizeactive,0 50 +submap=resize # will start a submap called "resize" + +binde=,L,resizeactive,10 0 +binde=,H,resizeactive,-10 0 +binde=,K,resizeactive,0 -10 +binde=,J,resizeactive,0 10 + +binde=SHIFT,L,resizeactive,50 0 +binde=SHIFT,H,resizeactive,-50 0 +binde=SHIFT,K,resizeactive,0 -50 +binde=SHIFT,J,resizeactive,0 50 + +bind=ALT,R,submap,reset # use reset to go back to the global submap + +submap=reset # will reset the submap, meaning end the current one and return to the global one. # Submap to disable all keybinds (for blender) bind=ALT,U,submap,clean diff --git a/config/hypr/exec-start.conf b/config/hypr/exec-start.conf index 1805b80..a21e8a1 100644 --- a/config/hypr/exec-start.conf +++ b/config/hypr/exec-start.conf @@ -1,24 +1,13 @@ # Executable Startup File for Hyprland - -# Activity Watch -exec-once=aw-server -exec-once=awatcher - -# Copy and Paste -exec-once=wl-paste -t text --watch clipman store --no-persist - -# Desktop Rice +#exec-once=uclampset -M 10 waybar exec-once=eww open bar -exec-once=fcitx5 -exec-once=hyprpaper exec-once=swayidle - -# Notifications +exec-once=hyprpaper +exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once=dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus exec-once=dunst exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh - -# Terminal -exec-once=foot -s - -# Systemdeeznuts -exec-once=dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus +exec-once=fcitx5 +#exec-once=~/.config/hypr/portal.sh +exec-once=systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once=wl-paste -p --watch wl-copy -pc diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index a7c6887..600fc5f 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -26,8 +26,8 @@ input { sensitivity=.4 accel_profile=adaptive - touchpad { - natural_scroll=false + touchpad { + natural_scroll=false disable_while_typing=false } @@ -36,9 +36,9 @@ input { general { gaps_in=3 gaps_out=5 - border_size=4 - col.active_border=0xffcc6a0f6 - col.inactive_border=0xff494d64 + border_size=3 + col.active_border=0xff7733cc + col.inactive_border=0xff333333 layout=dwindle } @@ -51,30 +51,34 @@ decoration { passes=3 ignore_opacity=false new_optimizations=true - noise=.03 - vibrancy=.2 - vibrancy_darkness=0.5 - input_methods=true } - # Other - rounding=15 - inactive_opacity=.8 - fullscreen_opacity=1 multiplier + # Shadow + drop_shadow=0 + shadow_range=15 + shadow_render_power=2 + shadow_ignore_window=1 + col.shadow=0xdb331153 + col.shadow_inactive=0x99333333 + shadow_offset=3 2 + + # Other + rounding=15 + inactive_opacity=.8 + fullscreen_opacity=1 multiplier } animations { enabled=true + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - bezier = fast, 0.41, 0.6, 0.02, 0.93 - - animation = windows, 1, 1, fast + animation = windows, 1, 7, myBezier animation = windowsOut, 1, 7, default, popin 80% animation = border, 1, 10, default animation = borderangle, 1, 8, default - animation = fade, 1, 3, default - animation = workspaces, 1, 1, fast - animation = specialWorkspace, 0 + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default } dwindle { @@ -82,9 +86,12 @@ dwindle { preserve_split=true } +master { + new_is_master=true +} + misc { layers_hog_keyboard_focus=true - middle_click_paste=true vfr=1 vrr=on disable_hyprland_logo=true diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf index 82129a6..c98267c 100644 --- a/config/hypr/hyprpaper.conf +++ b/config/hypr/hyprpaper.conf @@ -6,6 +6,5 @@ wallpaper = DP-1,~/.config/wallpapers/current_wallpaper.png wallpaper = DP-2,~/.config/wallpapers/current_wallpaper.png wallpaper = DP-3,~/.config/wallpapers/current_wallpaper.png wallpaper = DP-4,~/.config/wallpapers/current_wallpaper.png -wallpaper = HDMI-A-1,~/.config/wallpapers/current_wallpaper.png splash=false ipc = off diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index 6d79937..335946e 100644 --- a/config/hypr/monitors.conf +++ b/config/hypr/monitors.conf @@ -1,18 +1,19 @@ # Configure Monitor Setup for Hyprland # Assign Monitors -monitor=eDP-1,preferred,auto,1.5 +#monitor=DP-2,3440x1440@100,0x0,1 +#monitor=HDMI-A-1,1920x1080@60,3440x160,1 +#monitor=DP-3,disable + +# Set Default Workspaces +#workspace=HDMI-A-1,7 +#workspace=DP-2,1 + + +monitor=eDP-1,2256x1504@60,0x0,1.5 +#monitor=DP-2,1024x786,2256x0,1 workspace=eDP-1,1 - -## CRT Fun ## -# Good Middle Ground -# monitor=DP-1,1280x1024@150,auto,1 - -# High Rez -# monitor=DP-1,2500x2000@30,auto,1 - -# Fast As FUK BOIZ - doesn't work well maybe adaptor -#monitor=DP-1,640x480@240,auto,1 - -# Auto Monitor Rule -monitor = , preferred, auto, 1 +#monitor=DP-1,preferred,auto,1 +#monitor=DP-2,preferred,auto,1 +#monitor=DP-3,preferred,auto,1 +#monitor=DP-4,preferred,auto,1 diff --git a/config/hypr/portal.sh b/config/hypr/portal.sh new file mode 100755 index 0000000..8f692bf --- /dev/null +++ b/config/hypr/portal.sh @@ -0,0 +1,8 @@ +#!/bin/bash +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/lib/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & diff --git a/config/hypr/windowrules.conf b/config/hypr/windowrules.conf index 958f3be..cbefe83 100644 --- a/config/hypr/windowrules.conf +++ b/config/hypr/windowrules.conf @@ -1,13 +1,10 @@ # Window Rule Config File -# Application Fixes -# Foot Fullscreen Transparency Fix -windowrulev2 = syncfullscreen 0, initialClass:(footclient), initialTitle:(foot) - -windowrule=nofocus,ibus,^(Ibus-ui-gtk3)$ - # WLogout Configuration # Might move to separate file cause screen resolutions whack + +windowrule=nofocus,ibus,^(Ibus-ui-gtk3)$ + windowrule=move 720 222,wlogout windowrule=size 2000 1000,wlogout windowrule=tile,xyz @@ -16,12 +13,10 @@ windowrule=pseudo,abc windowrule=monitor 0,wlogout # Don't blur performance intensive applications -windowrulev2 = noblur,class:osu! -windowrulev2 = noblur,class:firefox -windowrulev2 = noblur,class:librewolf -windowrulev2 = noblur,class:blender -windowrulev2 = noblur,class:steam +windowrule=noblur,osu! +windowrule=noblur,^(firefox)$ +windowrule=noblur,^(librewolf)$ +windowrule=noblur,Blender +windowrule=noblur,Steam +windowrule=noblur,nheko #windowrulev2=noblur,fullscreen:1 - -# Funny Opacity -windowrulev2 = opacity .8, class:nheko diff --git a/config/mutt/config.muttrc b/config/mutt/config.muttrc deleted file mode 100644 index ddfb9f6..0000000 --- a/config/mutt/config.muttrc +++ /dev/null @@ -1,118 +0,0 @@ -# vim: filetype=neomuttrc - -# General Settings -set send_charset="us-ascii:utf-8" -set mime_type_query_command = "file --mime-type -b %s" -set date_format="%y/%m/%d %I:%M%p" -set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)" -set sort = 'reverse-date' -set smtp_authenticators = 'gssapi:login' -set query_command = "abook --mutt-query '%s'" -set rfc2047_parameters = yes -set sleep_time = 0 # Pause 0 seconds for informational messages -set markers = no # Disables the `+` displayed at line wraps -set mark_old = no # Unread mail stay unread until read -set mime_forward = no # mail body is forwarded as text -set forward_attachments = yes # attachments are forwarded with mail -set wait_key = no # mutt won't ask "press key to continue" -set fast_reply # skip to compose when replying -set fcc_attach # save attachments with the body -set forward_format = "Fwd: %s" # format of subject when forwarding -set forward_quote # include message in forwards -set reverse_name # reply as whomever it was to -set include # include message in replies -# set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example) -# set use_threads=threads sort=reverse-date sort_aux=date - -# HTML Viewing -auto_view text/html # automatically show html (mailcap uses lynx) -auto_view application/pgp-encrypted -alternative_order text/html text/plain text/enriched - -# Change Header Cache to faster -set header_cache_backend = "lmdb" -set header_cache_compress_method = "zstd" -set header_cache_compress_level = 18 - -set mailcap_path = $XDG_CONFIG_HOME/mutt/mailcap - -bind index,pager i noop -bind index,pager g noop -bind index \Cf noop -bind index,pager M noop -bind index,pager C noop - -# General rebindings -bind index gg first-entry -bind index j next-entry -bind index k previous-entry -bind attach view-mailcap -bind attach l view-mailcap -bind editor noop -bind index G last-entry -bind pager,attach h exit -bind pager j next-line -bind pager k previous-line -bind pager l view-attachments -bind index D delete-message -bind index U undelete-message -bind index L limit -bind index h noop -bind index l display-message -bind index,query tag-entry -#bind browser h goto-parent -macro browser h '..' "Go to parent folder" -bind index,pager H view-raw-message -bind browser l select-entry -bind browser gg top-page -bind browser G bottom-page -bind pager gg top -bind pager G bottom -bind index,pager,browser d half-down -bind index,pager,browser u half-up -bind index,pager S sync-mailbox -bind index,pager R group-reply -bind index \031 previous-undeleted # Mouse wheel -bind index \005 next-undeleted # Mouse wheel -bind pager \031 previous-line # Mouse wheel -bind pager \005 next-line # Mouse wheel -bind editor complete-query - -macro index,pager gi "=INBOX" "go to inbox" -macro index,pager Mi ";=INBOX" "move mail to inbox" -macro index,pager Ci ";=INBOX" "copy mail to inbox" -macro index,pager gd "=Drafts" "go to drafts" -macro index,pager Md ";=Drafts" "move mail to drafts" -macro index,pager Cd ";=Drafts" "copy mail to drafts" -macro index,pager gj "=Junk" "go to junk" -macro index,pager Mj ";=Junk" "move mail to junk" -macro index,pager Cj ";=Junk" "copy mail to junk" -macro index,pager gt "=Trash" "go to trash" -macro index,pager Mt ";=Trash" "move mail to trash" -macro index,pager Ct ";=Trash" "copy mail to trash" -macro index,pager gs "=Sent" "go to sent" -macro index,pager Ms ";=Sent" "move mail to sent" -macro index,pager Cs ";=Sent" "copy mail to sent" -macro index,pager ga "=Archive" "go to archive" -macro index,pager Ma ";=Archive" "move mail to archive" -macro index,pager Ca ";=Archive" "copy mail to archive" - -macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" -macro index \Cr "T~UN." "mark all messages as read" -macro index O "mailsync" "run mailsync to sync all mail" -macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"" "show only messages matching a notmuch pattern" -macro index A "all\n" "show all messages (undo limit)" - -# Sidebar mappings -set sidebar_visible = yes -set sidebar_width = 20 -set sidebar_short_path = yes -set sidebar_next_new_wrap = yes -set mail_check_stats -set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?' -bind index,pager \Ck sidebar-prev -bind index,pager \Cj sidebar-next -bind index,pager \Co sidebar-open -bind index,pager \Cp sidebar-prev-new -bind index,pager \Cn sidebar-next-new -bind index,pager B sidebar-toggle-visible diff --git a/config/mutt/mailcap b/config/mutt/mailcap deleted file mode 100644 index 6d6ec9e..0000000 --- a/config/mutt/mailcap +++ /dev/null @@ -1,10 +0,0 @@ -text/plain; $EDITOR %s ; -text/html; xdg-open %s ; nametemplate=%s.html -text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput; -image/*; xdg-open %s ; -video/*; setsid mpv --quiet %s &; copiousoutput -audio/*; mpv %s ; -application/pdf; xdg-open %s ; -application/pgp-encrypted; gpg -d '%s'; copiousoutput; -application/pgp-keys; gpg --import '%s'; copiousoutput; -application/x-subrip; $EDITOR %s ; diff --git a/config/mutt/style.muttrc b/config/mutt/style.muttrc deleted file mode 100644 index bb407ab..0000000 --- a/config/mutt/style.muttrc +++ /dev/null @@ -1,163 +0,0 @@ -# vim: filetype=neomuttrc -# Adapted from https://github.com/ceuk/mutt_dotfiles/ - -# Formatting ---------------------------------------------------------------------- -set date_format = "%a %d %h %H:%M" -set index_format=" %{$date_format} %zc %zs %zt | %-30.30L | %-30.80s %> %?Y?%Y ? " -set pager_format="%n %T %s%*  %{!%d %b · %H:%M} %?X? %X?%P" -set status_format = " %D %?u? %u ?%?R?󰗯 %R ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? \n \n" -set compose_format="-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-" -set vfolder_format = "%N %?n?%3n& ? %8m  · %f" -set attach_format = "%u%D  %T%-75.75d %?T?& ? %5s · %m/%M" -set sidebar_format = '%D%?Z? [%Z]?%* %?S?%S?' -index-format-hook attachment_info '=B text/calendar ~X 1' ' ' -index-format-hook attachment_info '=B text/calendar' " " -index-format-hook attachment_info '~X 1' " " -index-format-hook attachment_info '~A' " " - - -# General Colors ------------------------------------------------------------------ -color normal default default # general text -color error color231 color212 # error messages -color message default default # messages at the bottom -color prompt default default # prompt text -color search black color10 # search highlight - - -# Statusbar Colors ---------------------------------------------------------------- -color status color141 default -color status color0 default '(|)' # statusline "bubbles" -color status yellow color0 '' # Flagged icon -color status green color0 '' # Unread messages count -color status blue color0 '󰗯' # Read messages count icon -color status red color8 '' # Pending delete icon -color status color7 color0 '([a-zA-Z0-9\.,]|\[|\])(\s)' # bubble content 1 -color status color7 color0 '(\s)([a-zA-Z0-9\.,]|\[|\])' # bubble content 2 -color status color7 color0 '(\% )' # % symbol -color status color7 color0 '(\S)' # empty spaces -# color status color69 black '(\` )' # bubble account variation -color status white color69 '([a-zA-Z0-9\.]+)( )' # account text - - -# Index Colors -------------------------------------------------------------------- -color index color4 default '~N' # new messages -color index color15 default '~R' # read messages -color index color8 default '~Q' # messages which have been replied to -color index_collapsed color4 default # collapsed thread (message count text) -# color index color5 default '!~Q^~p' # sent only to me and haven't been replied to -color index color22 default '~h X-Label..' # messages with a complete label -color index color5 default '~F' # flagged messages -color index color6 default '~F~N' # flagged messages (new) -color index color6 default '~F~R' # flagged messages (read) -color index color1 default '~D' # deleted messages -color index color1 default '~D~N' # deleted messages (new) -color index color9 default '~D~R' # deleted messages (read) -color index color3 default '~T' # tagged messages -color index color3 default '~T~N' # tagged messages (new) -color index color11 default '~T~R' # tagged messages (read) -color tree color8 color8 # thread tree lines/arrow -color indicator default color8 # selection indicator -color index_date color14 default # date is always the same colour -color index_label color6 default # label is always the same colour - - -# Sidebar Colors ------------------------------------------------------------------ -color sidebar_indicator color14 black # currently selected mailbox -color sidebar_highlight white color8 # highlighted, but not open, mailbox. -color sidebar_ordinary color8 default # Color to give mailboxes by default -color sidebar_divider color8 black # divider between sidebar & content -color sidebar_flagged red black # mailboxes containing flagged mail -color sidebar_new green black # mailboxes containing new mail -color sidebar_unread color7 default # mailboxes containing unread mail -color sidebar_unread color7 default # mailboxes containing unread mail - - -# Message Headers ----------------------------------------------------------------- -color hdrdefault color8 default - - -# Message Body -------------------------------------------------------------------- - -# Attachments -color attachment color8 default - -# Signature -color signature color8 default - -# emails -# color body color14 default '[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+' - -# hide "mailto" -color body color0 color0 '' - -# URLs -color body color3 default '(https?|ftp)://[-\.,/%~_:?&=\#a-zA-Z0-9\+]+' - -# Dividers -color body color8 default '(^[-_]*$)' - -# Important info in calendar invites -color body color6 default '^(Date\/Time|Location|Organiser|Invitees|Teams Meeting)(:| \~\~)' - -# Quotes -color quoted color61 default -color quoted1 color117 default -color quoted2 color84 default -color quoted3 color215 default -color quoted4 color212 default - -# Forward/reply headers -color body color8 default '(^(To|From|Sent|Subject):.*)' - -# Patch syntax highlighting -# color body brightwhite default '^[[:space:]].*' -# color body yellow default ^(diff).* -# color body white default ^[\-\-\-].* -# color body white default ^[\+\+\+].* -# color body green default ^[\+].* -# color body red default ^[\-].* -# color body brightblue default [@@].* -# color body cyan default ^(Signed-off-by).* -# color body brightwhite default ^(Cc) -# color body yellow default "^diff \-.*" -# color body brightwhite default "^index [a-f0-9].*" -# color body brightblue default "^---$" -# color body white default "^\-\-\- .*" -# color body white default "^[\+]{3} .*" -# color body green default "^[\+][^\+]+.*" -# color body red default "^\-[^\-]+.*" -# color body brightblue default "^@@ .*" -# color body green default "LGTM" -# color body brightmagenta default "-- Commit Summary --" -# color body brightmagenta default "-- File Changes --" -# color body brightmagenta default "-- Patch Links --" -# color body green default "^Merged #.*" -# color body red default "^Closed #.*" -# color body brightblue default "^Reply to this email.*" - - -# Misc ----------------------------------------------------------------------------- - -# no addressed to me, to me, group, cc, sent by me, mailing list -set to_chars=" " - -# unchanged mailbox, changed, read only, attach mode -set status_chars = " " -ifdef crypt_chars set crypt_chars = " " -set flag_chars = " " - -# hide some tags -set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted" -tag-transforms "replied" "↻ " \ - "encrytpted" "" \ - "signed" "" \ - "attachment" "" \ - -# The formats must start with 'G' and the entire sequence is case sensitive. -tag-formats "replied" "GR" \ - "encrypted" "GE" \ - "signed" "GS" \ - "attachment" "GA" \ - - # don't put '+' at the beginning of wrapped lines -set markers=no diff --git a/config/mutt/switch.muttrc b/config/mutt/switch.muttrc deleted file mode 100644 index c808c99..0000000 --- a/config/mutt/switch.muttrc +++ /dev/null @@ -1,10 +0,0 @@ -# vim: filetype=neomuttrc - -# This is an embarrassing and hacky file that unbinds a bunch of binds between -# switching accounts. It is called each time an account is changed. - -unset hostname -unmy_hdr Organization -unmailboxes * -unalternates * -unset signature diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 90b1f5e..a215cae 100755 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -1,9 +1,155 @@ -" (Neo)vim Configuration -" By Flying_Stitchman 4 Jan 2022 +" (Neo)vim Configuration +" By Flying_Stitchman +" 4 Jan 2022 -" nvim builtin option config -luafile /etc/nixos/config/nvim/lua/options.lua -" nvim keymapping -luafile /etc/nixos/config/nvim/lua/keymap.lua -" Main Config stuffs -luafile /etc/nixos/config/nvim/nvim.lua + " Basic Configuration + +syntax on +set spell +set hlsearch +set ignorecase +set number relativenumber +set noswapfile +inoremap jk +xnoremap gy "+y +let mapleader = "`" + +" Good indents " +set tabstop=2 +set shiftwidth=2 +set expandtab + + " Make Lines Wrap Properly +set linebreak +set wrap + " True Color Support +if has('nvim') + set t_8f=[38;2;%lu;%lu;%lum + set t_8b=[48;2;%lu;%lu;%lum + set termguicolors +endif +"colorscheme cwcolors + + + " Highlight Trailing Spaces +let c_space_errors=1 + +set noincsearch + + " Plugs +"call plug#begin() +"Plug 'neovim/nvim-lspconfig' +"Plug 'jackguo380/vim-lsp-cxx-highlight' +"Plug 'folke/tokyonight.nvim', { 'branch': 'main' } +"Plug 'tribela/vim-transparent' +"Plug 'hrsh7th/nvim-cmp' +"Plug 'hrsh7th/cmp-nvim-lsp' +"Plug 'saadparwaiz1/cmp_luasnip' +"Plug 'L3MON4D3/LuaSnip' +"call plug#end() + +let g:airline#extensions#wordcount#filetypes = '\vasciidoc|help|mail|markdown|markdown.pandoc|org|rst|tex|text' +set laststatus=2 " enables vim-airline. + + + + " C Syntax highlighting +lua << EOF +require'lspconfig'.rust_analyzer.setup{} +require'lspconfig'.texlab.setup{} +require'lspconfig'.svls.setup{} +require'lspconfig'.pylsp.setup{ + settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'W391'}, + maxLineLength = 100 + }, + pylint = { + enabled = false + }, + pyflakes = { + enabled = true + } + } + } + } +} +require'lspconfig'.ccls.setup{ + init_options = { + highlight = { + lsRanges = true; + } + } + } + + +-- Add additional capabilities supported by nvim-cmp +local capabilities = require("cmp_nvim_lsp").default_capabilities() + +local lspconfig = require('lspconfig') + +-- Enable some language servers with the additional completion capabilities offered by nvim-cmp +local servers = { 'clangd', 'rust_analyzer', 'tsserver' } +for _, lsp in ipairs(servers) do + lspconfig[lsp].setup { + -- on_attach = my_custom_on_attach, + capabilities = capabilities, + } +end + +-- luasnip setup +local luasnip = require 'luasnip' + +-- nvim-cmp setup +local cmp = require 'cmp' +cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), -- Up + [''] = cmp.mapping.scroll_docs(4), -- Down + -- C-b (back) C-f (forward) for snippet placeholder navigation. + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { 'i', 's' }), + }), + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, +} + +EOF + + + + + " Color Themes +colorscheme tokyonight +hi Comment guifg=#e69dc5 +hi Linenr guifg=#a672f3 diff --git a/config/nvim/lua/keymap.lua b/config/nvim/lua/keymap.lua deleted file mode 100644 index ad01663..0000000 --- a/config/nvim/lua/keymap.lua +++ /dev/null @@ -1,159 +0,0 @@ --- Keymap File -local map = vim.keymap.set - --- jk exit from insert mode -map("i", "jk", "noh", { silent = true }) -map({"n", "x"}, "", "noh", { silent = true }) - --- Append and Prepend Newline -map("n", "[", "call append(line('.')-1, '')", { desc = "Prepend Newline"}) -map("n", "]", "call append(line('.'), '')", { desc = "Append Newline"}) - ----- --- Movements ----- - --- More powerful J and K (use 6j/6k) --- Via Pseudometa (https://nanotipsforvim.prose.sh/motion-setup--hjkl-as-amplified-hjkl) -map({ "n", "x" }, "", "6j") -map({ "n", "x" }, "", "6k") - --- And fix the keys to other ones -map({ "n", "x" }, "M", "J", { desc = "Merge" }) -- Replace the join command -map("n", "gh", vim.lsp.buf.hover, { desc = "Hover" }) -- Code action hover - - --- Move to window using the hjkl keys -map("n", "", "h", { desc = "Go to left window", remap = true }) -map("n", "", "j", { desc = "Go to lower window", remap = true }) -map("n", "", "k", { desc = "Go to upper window", remap = true }) -map("n", "", "l", { desc = "Go to right window", remap = true }) - --- Move between buffers -map("n", "", "BufferLineCyclePrev", { desc = "Move buffer left", silent = true }) -map("n", "", "BufferLineCycleNext", { desc = "Move buffer right", silent = true }) -map("n", "<", "BufferLineMovePrev", { desc = "Move buffer left", silent = true }) -map("n", ">", "BufferLineMoveNext", { desc = "Move buffer right", silent = true }) - --- ToggleTerm Bindings -map("n", "a", "ToggleTerm name=main", { desc = "Floating Terminal", silent = true }) -map("n", "g", "lua _lazygit_toggle()", {noremap = true, silent = true}) - --- Undotree -map("n", "fu", "Telescope undo") - ----- --- Cool Macros ----- - --- Quit All -map("n", "qq", "qa", { desc = "Quit all" }) - --- Copy and paste from system clipboard -map({ "n", "x" }, "y", '"+y', { desc = "Yank to system clipboard", silent = true }) -map({ "n", "x" }, "p", '"+p', { desc = "Paste after from system clipboard", silent = true }) -map({ "n", "x" }, "P", '"+P', { desc = "Paste before from system clipboard", silent = true }) - --- Neotree -map("n", "e", function() - require("neo-tree.command").execute({ action = "show", position = "right", toggle = true, dir = vim.loop.cwd() }) -end, { desc = "Open Neotree", remap = true }) - - --- Conform Formatting -map({ "n", "v" }, "mp", function() - require("conform").format({ - lsp_fallback = true, - async = false, - timeout_ms = 500, - }) -end, { desc = "Format file or range (in visual mode)" }) - --- diagnostic ----@param next "f"|"b" ----@param severity "ERROR"|"WARN"? -local diagnostic_goto = function(next, severity) - local go = (next == "f") and vim.diagnostic.goto_next or vim.diagnostic.goto_prev - local severity_index = severity and vim.diagnostic.severity[severity] or nil - return function() - go({ severity = severity_index }) - end -end -map("n", "cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" }) -map("n", "]d", diagnostic_goto("f"), { desc = "Next Diagnostic" }) -map("n", "[d", diagnostic_goto("b"), { desc = "Prev Diagnostic" }) -map("n", "]e", diagnostic_goto("f", "ERROR"), { desc = "Next Error" }) -map("n", "[e", diagnostic_goto("b", "ERROR"), { desc = "Prev Error" }) -map("n", "]w", diagnostic_goto("f", "WARN"), { desc = "Next Warning" }) -map("n", "[w", diagnostic_goto("b", "WARN"), { desc = "Prev Warning" }) - ----- --- Plugins ----- - --- Telescope (fuzzy finder) -local function telescope_git_fallback() - vim.fn.system("git rev-parse --is-inside-work-tree") - local is_git_repo = vim.v.shell_error == 0 - - if is_git_repo then - require("telescope.builtin").git_files() - else - require("telescope.builtin").find_files() - end -end -local function telescope_files() - require("telescope.builtin").find_files({ cwd = vim.uv.cwd() }) -end -local function telescope_oldfiles() - require("telescope.builtin").oldfiles({ cwd = vim.uv.cwd() }) -end -local function telescope_live_grep() - vim.fn.system("git rev-parse --is-inside-work-tree") - local is_git_repo = vim.v.shell_error == 0 - local git_root = vim.fn.fnamemodify(vim.fn.finddir(".git", ".;"), ":h") - - require("telescope.builtin").live_grep({ - cwd = is_git_repo and git_root or vim.uv.cwd(), - }) -end -map("n", "", telescope_git_fallback, { desc = "Find files (git/fallback, cwd)" }) -map("n", "ff", telescope_files, { desc = "Find files (cwd)" }) -map("n", "fo", telescope_oldfiles, { desc = "Find files (cwd)" }) -map("n", "/", telescope_live_grep, { desc = "Live grep (cwd)" }) -map("n", ",", require("telescope.builtin").buffers, { desc = "Find buffers" }) -map("n", "\"", require("telescope.builtin").registers, { desc = "Find registers" }) - - ----- --- Fixes ----- - --- Proper Wrap Navigation -map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) -map({ "n", "x" }, "", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) -map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) -map({ "n", "x" }, "", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) - --- Auto Re-highlight After Indent -map("v", "<", "", ">gv") - --- Saner Movement of nN -map("n", "n", "'Nn'[v:searchforward].'zv'.'zz'", { expr = true, desc = "Next search result" }) -map("x", "n", "'Nn'[v:searchforward].'zz'", { expr = true, desc = "Next search result" }) -map("o", "n", "'Nn'[v:searchforward].'zz'", { expr = true, desc = "Next search result" }) -map("n", "N", "'nN'[v:searchforward].'zv'.'zz'", { expr = true, desc = "Prev search result" }) -map("x", "N", "'nN'[v:searchforward].'zz'", { expr = true, desc = "Prev search result" }) -map("o", "N", "'nN'[v:searchforward].'zz'", { expr = true, desc = "Prev search result" }) - --- Terminal Mappings -map("t", "", "", { desc = "Enter Normal Mode" }) -map("t", "", "wincmd h", { desc = "Go to left window" }) -map("t", "", "wincmd j", { desc = "Go to lower window" }) -map("t", "", "wincmd k", { desc = "Go to upper window" }) -map("t", "", "wincmd l", { desc = "Go to right window" }) -map("t", "", "close", { desc = "Hide Terminal" }) -map("t", "", "close", { desc = "which_key_ignore" }) - - diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua deleted file mode 100644 index 1baefd7..0000000 --- a/config/nvim/lua/options.lua +++ /dev/null @@ -1,51 +0,0 @@ --- Options File - -local opt = vim.opt - --- Leader key -vim.g.mapleader = " " -vim.g.maplocalleader = "\\" - --- Basic Options I like -opt.hlsearch = true -opt.ignorecase = true -opt.relativenumber = true -opt.number = true -opt.spell = true -opt.swapfile = false -opt.syntax = "on" -opt.scrolloff = 15 - --- Had this disabled before might not like -opt.incsearch = true - --- 24-bit color -opt.termguicolors = true - --- Good indents -opt.tabstop = 2 -opt.shiftwidth = 0 -- Use tabstop -opt.expandtab = true - --- Show trailing whitespace but fancy -opt.list = true -opt.listchars = { - tab = "→ ", - trail = "╳", - nbsp = "⎵", -} - --- Make Lines Wrap Properly -opt.linebreak = true -opt.wrap = true - --- Colors -require("tokyonight").setup({ - transparent = true, - styles = { - floats = "transparent" - } -}) -vim.cmd("colorscheme tokyonight") -vim.cmd("hi Comment guifg=#e69dc5") -vim.cmd("hi Linenr guifg=#a672f3") diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua deleted file mode 100644 index 753408d..0000000 --- a/config/nvim/nvim.lua +++ /dev/null @@ -1,189 +0,0 @@ --- This will need some refactoring as it is mostly a --- copy and paste from the previous single-file .vim config - -require'lspconfig'.pylsp.setup{ - settings = { - formatCommand = {"black"}, - pylsp = { - plugins = { - jedai_completion = { - fuzzy = true - }, - pyflakes = { - enabled = true - }, - pylsp_mypy = { - enabled = true - } - } - } - } -} -require'nvim-treesitter.configs'.setup { - ensure_installed = { }, - auto_install = false, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, -} - --- Add additional capabilities supported by nvim-cmp -local capabilities = require("cmp_nvim_lsp").default_capabilities() - -local lspconfig = require('lspconfig') - --- Enable some language servers with the additional completion capabilities offered by nvim-cmp -local servers = { 'clangd', 'glsl_analyzer', 'nixd', 'rust_analyzer', 'texlab', 'tinymist', 'verible', 'vhdl_ls', 'vtsls' } -for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - -- on_attach = my_custom_on_attach, - capabilities = capabilities, - settings = { - ['rust-analyzer'] = { - cargo = { - allFeatures = true; - } - } - } - } -end - --- luasnip setup -local luasnip = require 'luasnip' - --- nvim-cmp setup -local cmp = require 'cmp' -cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), -- Up - [''] = cmp.mapping.scroll_docs(4), -- Down - -- C-b (back) C-f (forward) for snippet placeholder navigation. - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }, - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { 'i', 's' }), - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { 'i', 's' }), - }), - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - }, -} - ---[[ - u.-*'M'*-.u - x` _____ `x - o` _| ___| `o -, | |___ , -3 |_ | E -' | _ | ' - o, |_| |_| ,o - x". ."x - n"--.W.--"n - Kiloroy Was Here -]] - --- Funky plugins -require("conform").setup({ - formatters_by_ft = { - C = { "clang-format"}, - css = { "prettier", }, - html = { "prettier", }, - javascript = { "prettier", }, - python = { "black" }, - typst = { "prettypst" }, - verilog = { "verible", "trim_whitespace" }, - systemverilog = { "verible", "trim_whitespace" } - }, - formatters = { - prettypst = { - args = { "--use-std-in", "--use-std-out" } - } - }, - format_on_save = { - timeout_ms = 500, - lsp_format = "fallback", - }, -}) -require("bufferline").setup({ options = { - always_show_bufferline = true, - show_buffer_close_icons = false, - separator_style = "slope", - style_preset = { - require("bufferline").style_preset.no_italic, - }, - offsets = { - { - filetype = "neo-tree", - text = "File Explorer", - highlight = "Directory", - text_align = "left", - }, - }, -},}) -require("gitsigns").setup() -require("ibl").setup() -require("mini.pairs").setup() -require("mini.comment").setup() -require("mini.icons").setup() -require("neo-tree").setup() -require("nvim-web-devicons").setup() -require("render-markdown").setup() -require("telescope").setup() -require("toggleterm").setup{ - direction = 'float', - float_opts = { - border = 'curved', - }, -} -require("which-key").setup({ global = false }) -require("spaceman").setup({ - workspaces = { - "/etc/nixos", - { "config", "/etc/nixos/config/" }, - { "home", "~/" }, - "/opt/www/stitchy.moe" , - }, - directories = { - "~/Documents/Classes", - "~/Documents/Repos", - "~/Documents/Repos/ExtremeHeatTransfer", - "/opt/docker-containers/", - }, - use_default_keymaps = true, - hooks = { - before_move = "Neotree close", - } -}) - --- Lazygit Panel -local Terminal = require('toggleterm.terminal').Terminal -local lazygit = Terminal:new({ cmd = "lazygit", hidden = true }) - -function _lazygit_toggle() - lazygit:toggle() -end diff --git a/config/swaylock/config b/config/swaylock/config index a58e2ba..2016e3e 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -1,39 +1,15 @@ -## Default Settings ## - +screenshots clock -datestr=%a, %b %e %Y -image=~/.config/wallpapers/girls-last-tour-chibi-eepi.jpg -grace-no-mouse - -## Text Settings ## - -text-color=8aadf4 -font=IPAGothic - -## Indicator Settings ## - indicator -indicator-radius=140 +indicator-radius=100 indicator-thickness=7 -indicator-x-position=1200 -indicator-y-position=500 - -## Ring Colors ## - -ring-color=a6da95 -ring-clear-color=eed49f -ring-ver-color=8aadf4 -ring-wrong-color=ed8796 - +effect-blur=7x5 +effect-vignette=0.5:0.5 +ring-color=bb00cc +key-hl-color=880033 line-color=00000000 -separator-color=00000000 -key-hl-color=c6a0f6 - -bs-hl-color=ed8796 - -## Inside Colors ## - -inside-color=00000088 -inside-clear-color=eed49f -inside-ver-color=8aadf4 -inside-wrong-color=ed8796 +inside-color 00000088 +separator-color 00000000 +fade-in=0.2 +datestr="%a, %b %e %Y" +greyscale diff --git a/config/vis/colors/my_theme b/config/vis/colors/my_theme deleted file mode 100644 index aa17611..0000000 --- a/config/vis/colors/my_theme +++ /dev/null @@ -1,4 +0,0 @@ -#c6a0f6 -- mauve -#8aadf4 -- blue -#8bd5ca -- unsat green ---#f5bde6 -- pink diff --git a/config/vis/config b/config/vis/config deleted file mode 100644 index fe170e5..0000000 --- a/config/vis/config +++ /dev/null @@ -1,91 +0,0 @@ -##Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20. -visualizer.fps=24 - -##Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. The default scheme is "colors". -colors.scheme=my_theme - -##Available smoothing options are monstercat, sgs, none. -visualizer.spectrum.smoothing.mode=monstercat - -##If set to false the visualizers will use mono mode instead of stereo. Some visualizers will -##behave differently when mono is enabled. For example, spectrum show two sets of bars. -audio.stereo.enabled=true - -##Applies scaling factor to both lorenz and ellipse visualizers. This is useful when the system audio is set -#to a low volume. -visualizer.scaling.multiplier=1.0 - -##Sets the audio sources to use. -##Currently available ones are "mpd", "pulse", "shmem", and "alsa". Defaults to "pulse". -#audio.sources=pulse - -##vis tries to find the correct pulseaudio sink, however this will not work on all systems. -##If pulse audio is not working with vis try switching the audio source. A list can be found by running the -##command pacmd list-sinks | grep -e 'name:' -e 'index' -#audio.pulse.source=0 - -##Defaults to "/tmp/mpd.fifo" -#mpd.fifo.path=/tmp/mpd.fifo - -##Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0. -#visualizer.rotation.secs=10 - -##Configures the samples rate and the cutoff frequencies. -#audio.sampling.frequency=44100 -#audio.low.cutoff.frequency=30 -#audio.high.cutoff.frequency=22050 - - -##Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse. -##Defaults to spectrum,ellipse,lorenz -#visualizers=spectrum,ellipse,lorenz - - -##Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the -##background will be colored instead of the character. Defaults to " ". -#visualizer.spectrum.character=# - -##Spectrum bar width. Defaults to 2. -#visualizer.spectrum.bar.width=2 - -##The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to -##zero to have no space between bars -#visualizer.spectrum.bar.spacing=1 - -##This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none. -##Defaults to "fill" -#visualizer.spectrum.falloff.mode=fill - -##Configures how fast the falloff character falls. This is an exponential falloff so values usually look -##best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95 -#visualizer.spectrum.falloff.weight=0.95 - -##Margins in percent of total screen for spectrum visualizer. All margins default to 0 -#visualizer.spectrum.top.margin=0.30 -#visualizer.spectrum.bottom.margin=0.10 -#visualizer.spectrum.right.margin=0.10 -#visualizer.spectrum.left.margin=0.10 - -##Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false. -#visualizer.spectrum.reversed=false - -##This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing -##effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=1 -#visualizer.sgs.smoothing.points=3 -#visualizer.sgs.smoothing.passes=1 - -##Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the -##background will be colored instead of the character. Defaults to "█". -#visualizer.ellipse.character=# - -##The radius of each color ring in the ellipse visualizer. Defaults to 2. -#visualizer.ellipse.radius=.5 - - -##Configures what character the lorenz visualizer will use. Specifying a space (e.g " ") means the -##background will be colored instead of the character. Defaults to "█". -#visualizer.lorenz.character=# - -##Turns off overriding the user's terminal colors. This is true by default. -#colors.override.terminal=false - diff --git a/config/zshrc b/config/zshrc index 856ed7a..0daeece 100755 --- a/config/zshrc +++ b/config/zshrc @@ -8,30 +8,31 @@ unsetopt PROMPT_SP bindkey -v # End of lines configured by zsh-newuser-install +# Temporary Rebuild shortcut +alias re-scarab="sudo nixos-rebuild --flake '/etc/nixos#scarab'" + +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_STATE_HOME="$HOME/.local/state" + # Aliases -alias c='clear' -alias cd="z" -alias find="fd" -alias gdb="gdb -x /usr/share/pwndbg/gdbinit.py" #pwntools for GDB -alias ghidra="_JAVA_AWT_WM_NONREPARENTING=1 ghidra" -alias icat="kitty +kitten icat" alias kon="ncmpcpp -b ~/.config/ncmpcpp/bindings" -alias l='ls -l' -alias la='ls -la' -alias lg='lazygit' -alias ll='ls -l' -alias lla='ls -la' -alias ls='eza' -alias make="make -j 20" -alias mountUSB="mount ~/ExternalDrive" # Automagically mount and unmount my flashdrive alias myip="curl ifconfig.me" -alias qsus="NIXPKGS_ALLOW_UNFREE=1 nix-shell -p quartus-prime-lite -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fe7ab74a86d78ba00d144aa7a8da8c71a200c563.tar.gz" -alias ssh="TERM=xterm-256color ssh" #Fix foot issue in ssh -alias tree="eza --tree" -alias umountUSB="umount ~/ExternalDrive" -alias unityAvi="~/Documents/Unity/Editors/2019.4.31f1/Editor/Unity -projectPath ~/ExternalDrive/Unity\ Projects/Avatar\ 3.0\ 2019" +alias ghidra="_JAVA_AWT_WM_NONREPARENTING=1 ghidra" +alias ls='eza' alias v="nvim" # Launch neovim with 'v' -alias za="zathura" +alias mountUSB="mount /home/flyingstitchman/ExternalDrive" # Automagically mount and unmount my flashdrive +alias umountUSB="umount /home/flyingstitchman/ExternalDrive" +alias unityAvi="/home/flyingstitchman/Documents/Unity/Editors/2019.4.31f1/Editor/Unity -projectPath ~/ExternalDrive/Unity\ Projects/Avatar\ 3.0\ 2019" +alias ssh="TERM=xterm ssh" #Fix foot issue in ssh +alias gdb="gdb -x /usr/share/pwndbg/gdbinit.py" #pwntools for GDB +alias make="make -j 20" +alias cd="z" +alias imv="imv -b aa77bb" +alias find="fd" +alias tree="eza --tree" +alias icat="kitty +kitten icat" # Automatically get new programs for autocompletion @@ -39,19 +40,6 @@ zshcache_time="$(date +%s%N)" autoload -Uz add-zsh-hook -function osc7-pwd() { - emulate -L zsh # also sets localoptions for us - setopt extendedglob - local LC_ALL=C - printf '\e]2;%s%s\e\' ${PWD//(#m)([^@-Za-z&-;_~])/%${(l:2::0:)$(([##16]#MATCH))}} -} - -function chpwd-osc7-pwd() { - (( ZSH_SUBSHELL )) || osc7-pwd -} -add-zsh-hook -Uz chpwd chpwd-osc7-pwd - - rehash_precmd() { if [[ -a /var/cache/zsh/pacman ]]; then local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)" @@ -91,44 +79,52 @@ compinit # End of lines added by compinstall eval "$(zoxide init zsh)" + +# Default Programs +export EDITOR=nvim + +# Needed for pam_gnupg for ssh keys TO DO +#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export PATH="${PATH}:/home/flyingstitchman/.cargo/bin" +# Ibus +GTK_IM_MODULE=fcitx +QT_IM_MODULE=fcitx +XMODIFIERS=@im=fcitx + # Clean Up -export MBSYNCRC=$XDG_CONFIG_HOME/mbsync/config -export PASSWORD_STORE_DIR=$XDG_CONFIG_HOME/password_store -export NOTMUCH_CONFIG=$XDG_CONFIG_HOME/notmuch/config +export QT_QPA_PLATFORM=wayland +export QT_QPA_PLATFORMTHEME=qt5ct +# Fuck Gnome Devs, All my homies Hate Gnome Devs +#export GDK_DEBUG=1 +export MBSYNCRC=${XDG_CONFIG_HOME:-~/.config}/mbsync/config +export PASSWORD_STORE_DIR=${XDG_CONFIG_HOME:-~/.config}/password_store +export GNUPGHOME=${XDG_DATA_HOME-~/.config}/gnupg +export NOTMUCH_CONFIG=${XDG_CONFIG_HOME-~/.config}/notmuch/config +export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority export KDEHOME="$XDG_CONFIG_HOME"/kde export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle -export GNUPGHOME=$XDG_DATA_HOME/gnupg +export GPG_TTY=$(tty) +export SDL_VIDEODRIVER=wayland export GOPATH="$XDG_DATA_HOME" export GOMODCACHE="$XDG_CACHE_HOME" -export GPG_TTY=$(tty) export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default export DOTNET_CLI_HOME="$XDG_CONFIG_HOME"/dotnet export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export CARGO_HOME="$XDG_DATA_HOME"/cargo +# Nvidia moment +export WLR_NO_HARDWARE_CURSORS=1 -alias dosbox="dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf" -# Nixos Rebuilding -alias rbs="reconfig switch" -alias rbb="reconfig build" +alias dosbox="dosbox -conf "$XDG_CONFIG_HOME"/dosbox/dosbox.conf " -reconfig() { - sudo nixos-rebuild --flake "/etc/nixos#$(cat /etc/hostname)" "$@" -} - -# Home Manager Variables -source ~/.local/state/nix/profiles/home-manager/home-path/etc/profile.d/hm-session-vars.sh # Autostart Hyprland after all environmental Variables have been declared if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then +# export WLR_DRM_DEVICES=/dev/dri/card0 exec Hyprland fi -export QSYS_ROOTDIR="~/.cache/paru/clone/quartus-free/pkg/quartus-free-quartus/opt/intelFPGA/21.1/quartus/sopc_builder/bin" - -# Nix Direnv Support -eval "$(direnv hook zsh)" +export QSYS_ROOTDIR="/home/flyingstitchman/.cache/paru/clone/quartus-free/pkg/quartus-free-quartus/opt/intelFPGA/21.1/quartus/sopc_builder/bin" diff --git a/flake.lock b/flake.lock index d6b2d91..628c13a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,47 +1,28 @@ { "nodes": { - "catppuccin": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1751705516, - "narHash": "sha256-Y099OGYWYHtpYFP4offuV6rldBnpUv4CYk+HwuaQwLU=", - "owner": "catppuccin", - "repo": "nix", - "rev": "719bb50ca2c99bc9c077669a48bfd9815493a11d", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "nix", - "type": "github" - } - }, "flake-compat": { + "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "revCount": 69, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" + "lastModified": 1627913399, + "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" } }, "flake-utils": { - "inputs": { - "systems": "systems" - }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", "type": "github" }, "original": { @@ -57,11 +38,11 @@ ] }, "locked": { - "lastModified": 1751729568, - "narHash": "sha256-ay7O1jjalUxkL23QWLv9C2s8rdVGs3hUOPZClIbUHKs=", + "lastModified": 1712390667, + "narHash": "sha256-ebq+fJZfobqpsAdGDGpxNWSySbQejRwW9cdiil6krCo=", "owner": "nix-community", "repo": "home-manager", - "rev": "f117b383dd591fd579bce5ee7bac07a3fdc1d050", + "rev": "b787726a8413e11b074cde42704b4af32d95545c", "type": "github" }, "original": { @@ -74,11 +55,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1749499850, - "narHash": "sha256-Fyy9ySTJ7jJ7z2h5+KHJU6OUhPJvy12OlVOichkwmZ0=", + "lastModified": 1711757427, + "narHash": "sha256-PqHK0J9YCRKlxpJp+UG+/xpwfIQRPVUPspvbbP3FB2M=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "26faf325d6efb169e2e4a2c435346b46c19d08bc", + "rev": "f7087f8fdbd1309af315ef8c92345320aadc5edf", "type": "github" }, "original": { @@ -89,11 +70,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1751432711, - "narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=", + "lastModified": 1712324865, + "narHash": "sha256-+BatEWd4HlMeK7Ora+gYIkarjxFVCg9oKrIeybHIIX4=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f", + "rev": "f3b959627bca46a9f7052b8fbc464b8323e68c2c", "type": "github" }, "original": { @@ -105,11 +86,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1750776420, - "narHash": "sha256-/CG+w0o0oJ5itVklOoLbdn2dGB0wbZVOoDm4np6w09A=", + "lastModified": 1712163089, + "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30a61f056ac492e3b7cdcb69c1e6abdcf00e39cf", + "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "type": "github" }, "original": { @@ -119,120 +100,48 @@ "type": "github" } }, - "nixpkgs-quartus": { - "locked": { - "lastModified": 1685573264, - "narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "380be19fbd2d9079f677978361792cb25e8a3635", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-22.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-xr": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_3", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1751678927, - "narHash": "sha256-zs13WzaoY3tI/uLAjLH4NX3NxpMnXJPRXHj3Y/gyKuI=", - "owner": "nix-community", - "repo": "nixpkgs-xr", - "rev": "7f9991b2104a43fb7c66a680a98b6ae21328a188", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs-xr", - "type": "github" - } - }, "nixpkgs_2": { "locked": { - "lastModified": 1751637120, - "narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=", + "lastModified": 1628148846, + "narHash": "sha256-V8aZJBROfNDk40cvFjKUnOnL7sF+BYwCQUUpLP8y4uE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3", + "rev": "9a8eb5a464f373e79d19d0ed2e53e0d31f78fe92", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_3": { + "osu-nixos": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2" + }, "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", + "lastModified": 1695759061, + "narHash": "sha256-s9OYi0tzWSjFUaGLnLg08tTm8OEu1uZqGTtKmIRwHic=", + "owner": "Asqiir", + "repo": "osu-nixos", + "rev": "4e0096e1eee74383b9350962d8bff094648a7968", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", + "owner": "Asqiir", + "repo": "osu-nixos", "type": "github" } }, "root": { "inputs": { - "catppuccin": "catppuccin", "home-manager": "home-manager", "mobile-nixos": "mobile-nixos", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", - "nixpkgs-quartus": "nixpkgs-quartus", - "nixpkgs-xr": "nixpkgs-xr" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs-xr", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1750931469, - "narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" + "nixpkgs": "nixpkgs", + "osu-nixos": "osu-nixos" } } }, diff --git a/flake.nix b/flake.nix index 3e59731..eb85aff 100644 --- a/flake.nix +++ b/flake.nix @@ -1,12 +1,12 @@ { description = "System Configuration Flake"; - outputs = inputs@{ - catppuccin, + + + outputs = inputs@{ nixpkgs, - nixpkgs-xr, nixos-hardware, - nixpkgs-quartus, home-manager, + osu-nixos, ... } : { @@ -15,34 +15,39 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - catppuccin.nixosModules.catppuccin + ./packages/default.nix ./hosts/malachite/default.nix ./users/stitchynyan/default.nix - nixpkgs-xr.nixosModules.nixpkgs-xr home-manager.nixosModules.home-manager { home-manager.extraSpecialArgs = {inherit inputs;}; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.stitchynyan = { - imports = [ - catppuccin.homeModules.catppuccin - ./users/stitchynyan/home.nix - ./users/home.nix - ]; - }; + home-manager.users.stitchynyan = import ./users/stitchynyan/home.nix; } ]; }; + scarab = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + { _module.args = { inherit inputs; }; } + (import "${inputs.mobile-nixos}/lib/configuration.nix" { + device = "oneplus-enchilada"; + }) + ./packages/default.nix + ./hosts/scarab/default.nix + ./users/stitchynyan/default.nix + ]; + }; lappy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - catppuccin.nixosModules.catppuccin nixos-hardware.nixosModules.framework-12th-gen-intel + ./packages/default.nix ./hosts/lappy/default.nix ./users/stitchynyan/default.nix @@ -51,13 +56,7 @@ home-manager.extraSpecialArgs = {inherit inputs;}; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.stitchynyan = { - imports = [ - catppuccin.homeModules.catppuccin - ./users/stitchynyan/home.nix - ./users/home.nix - ]; - }; + home-manager.users.stitchynyan = import ./users/stitchynyan/home.nix; } ]; }; @@ -66,27 +65,9 @@ specialArgs = { inherit inputs; }; modules = [ + ./packages/default.nix ./hosts/gemini/default.nix ./users/nyadmin/default.nix - ./users/cirno/default.nix - - home-manager.nixosModules.home-manager - { - home-manager.extraSpecialArgs = {inherit inputs;}; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.nyadmin = import ./users/nyadmin/home.nix; - home-manager.users.cirno = import ./users/cirno/home.nix; - } - ]; - }; - tanzanite = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - - ./hosts/tanzanite/default.nix - ./users/nyadmin/default.nix home-manager.nixosModules.home-manager { @@ -101,7 +82,6 @@ }; inputs = { - catppuccin.url = "github:catppuccin/nix"; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; @@ -111,8 +91,7 @@ flake = false; }; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - nixpkgs-xr.url = "github:nix-community/nixpkgs-xr"; nixos-hardware.url = "github:Nixos/nixos-hardware/master"; - nixpkgs-quartus.url = "github:nixos/nixpkgs/nixos-22.05"; + osu-nixos.url = "github:Asqiir/osu-nixos"; }; } diff --git a/hosts/config/stm32/default.nix b/hosts/config/stm32/default.nix deleted file mode 100644 index 6710199..0000000 --- a/hosts/config/stm32/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, pkgs, config, ...}: - -let - -in -{ - options = { - stitchyconf = { - dev.stm32.enable = lib.mkEnableOption "Enables STM32 Development"; - }; - }; - - config = { - # Group for probe-rs rules - users.groups.plugdev = {}; - - # Udev Files - services.udev.packages = lib.mkIf config.stitchyconf.dev.stm32.enable [ - (pkgs.writeTextFile { - name = "probe-rs-udev"; - destination = "/etc/udev/rules.d/69-probe-rs.rules"; - text = (builtins.readFile ./probe-rs.rules); - })]; - }; -} diff --git a/hosts/config/stm32/probe-rs.rules b/hosts/config/stm32/probe-rs.rules deleted file mode 100644 index 22aa177..0000000 --- a/hosts/config/stm32/probe-rs.rules +++ /dev/null @@ -1,146 +0,0 @@ -# Copy this file to /etc/udev/rules.d/ -# If rules fail to reload automatically, you can refresh udev rules -# with the command "udevadm control --reload" - -# This rules are based on the udev rules from the OpenOCD project, with unsupported probes removed. -# See http://openocd.org/ for more details. -# -# This file is available under the GNU General Public License v2.0 - -ACTION!="add|change", GOTO="probe_rs_rules_end" - -SUBSYSTEM=="gpio", MODE="0660", GROUP="plugdev", TAG+="uaccess" - -SUBSYSTEM!="usb|tty|hidraw", GOTO="probe_rs_rules_end" - -# Please keep this list sorted by VID:PID - -# STMicroelectronics ST-LINK V1 -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# STMicroelectronics ST-LINK/V2 -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# STMicroelectronics ST-LINK/V2.1 -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3752", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# STMicroelectronics STLINK-V3 -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374d", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374e", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3753", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3754", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# SEGGER J-Link -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0101", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0102", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0103", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0104", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0105", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0107", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0108", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1001", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1003", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1004", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1005", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1006", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1007", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1008", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1009", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100a", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100b", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100c", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100d", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100e", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100f", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1010", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1011", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1012", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1013", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1014", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1015", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1016", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1017", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1018", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1019", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101a", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101b", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101c", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101d", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101e", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101f", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1020", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1021", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1022", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1023", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1024", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1025", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1026", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1027", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1028", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1029", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102a", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102b", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102c", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102d", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102e", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102f", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1050", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1051", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1052", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1053", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1054", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1055", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1056", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1057", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1058", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1059", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105a", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105b", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105c", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105d", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105e", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105f", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1060", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1061", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1062", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1063", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1064", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1065", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1066", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1067", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1068", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1069", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106a", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106b", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106c", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106d", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106e", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106f", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# FT232H -ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", MODE="660", GROUP="plugdev", TAG+="uaccess" -# FT2232x -ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="660", GROUP="plugdev", TAG+="uaccess" -# FT4232H -ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# FTDI-based Olimex devices -ATTRS{idVendor}=="0x15ba", ATTRS{idProduct}=="0x0003", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="0x15ba", ATTRS{idProduct}=="0x0004", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="0x15ba", ATTRS{idProduct}=="0x002a", MODE="660", GROUP="plugdev", TAG+="uaccess" -ATTRS{idVendor}=="0x15ba", ATTRS{idProduct}=="0x002b", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# Espressif USB JTAG/serial debug unit -ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="660", GROUP="plugdev", TAG+="uaccess" -# Espressif USB Bridge -ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# CMSIS-DAP compatible adapters -ATTRS{product}=="*CMSIS-DAP*", MODE="660", GROUP="plugdev", TAG+="uaccess" -# WCH Link (CMSIS-DAP compatible adapter) -ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="8011", MODE="660", GROUP="plugdev", TAG+="uaccess" - -LABEL="probe_rs_rules_end" diff --git a/hosts/default.nix b/hosts/default.nix index 69592f6..9063f24 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -6,7 +6,7 @@ let in { options = {}; - imports = [ ../packages/default.nix ../users/default.nix ./config/stm32 ]; + imports = [ ../packages/default.nix ]; config = { hardware = { @@ -15,24 +15,16 @@ in }; boot = { - kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; + #kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; loader = { efi.canTouchEfiVariables = lib.mkDefault true; systemd-boot.enable = lib.mkDefault true; }; }; - programs = { - appimage.binfmt = true; - direnv = { - enable = true; - nix-direnv.enable = true; - }; - }; security.sudo.wheelNeedsPassword = false; security.rtkit.enable = true; services = { - fstrim.enable = true; resolved = { enable = true; dnsovertls = "opportunistic"; @@ -72,30 +64,6 @@ in allowedUDPPorts = [ 22000 ]; }; - services.udev.packages = [ - (pkgs.writeTextFile { - - name = "alterra-udev"; - destination = "/etc/udev/rules.d/92-alterra.rules"; - text = '' - # USB-Blaster - SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666" - SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="0666" - - SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="0666" - - # USB-Blaster II - SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="0666" - SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="0666" - ''; - })]; - - services.openssh = lib.mkIf (config.stitchyconf.form == "server"){ - enable = true; - settings.PasswordAuthentication = false; - settings.KbdInteractiveAuthentication = false; - }; - environment.etc.hosts.mode = "0644"; nix.settings.experimental-features = [ "nix-command" "flakes" ]; }; diff --git a/hosts/gemini/default.nix b/hosts/gemini/default.nix index 1a9cb36..5dfb66c 100644 --- a/hosts/gemini/default.nix +++ b/hosts/gemini/default.nix @@ -18,6 +18,12 @@ networking.hostName = "gemini"; time.timeZone = "America/Los_Angeles"; + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + settings.KbdInteractiveAuthentication = false; + }; + # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ 22 25565 ]; networking.firewall.allowedUDPPorts = [ 51820 ]; diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 804b59f..123528c 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -10,16 +10,15 @@ stitchyconf = { artPkgs.enable = true; - dev.stm32.enable = true; }; services.logind.powerKey = "ignore"; services.logind.powerKeyLongPress = "poweroff"; networking = { - hostName = "lappy"; - networkmanager.enable = true; + hostName = "lappy"; + networkmanager.enable = true; }; - time.timeZone = "America/Los_Angeles"; + time.timeZone = "America/Lost_Angeles"; services.syncthing = { enable = true; @@ -36,16 +35,13 @@ "kernel.yama.ptrace_scope=0" ]; - virtualisation = { - docker.enable = true; - libvirtd.enable = true; - waydroid.enable = true; - }; + virtualisation.libvirtd.enable = true; hardware.bluetooth.enable = true; hardware.bluetooth.settings.General.Experimental = true; - hardware.graphics = { + hardware.opengl = { enable = true; - enable32Bit= true; + driSupport = true; + driSupport32Bit = true; extraPackages = lib.attrVals [ "intel-compute-runtime" "intel-media-driver" @@ -74,7 +70,7 @@ PCIE_ASPM_ON_AC = "default"; PCIE_ASPM_ON_BAT = "powersupersave"; PLATFORM_PROFILE_ON_BAT = "low-power"; - RUNTIME_PM_ON_BAT = "auto"; + RUNTIME_PM_ON_BAT = true; WOL_DISABLE = true; SCHED_POWERSAVE_ON_BAT = true; diff --git a/hosts/lappy/hardware-configuration.nix b/hosts/lappy/hardware-configuration.nix index 48c891e..ea2f74b 100644 --- a/hosts/lappy/hardware-configuration.nix +++ b/hosts/lappy/hardware-configuration.nix @@ -10,28 +10,17 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; + fileSystems."/" = + { device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; fsType = "btrfs"; - options = [ "compress=zstd" "subvol=@nix-root" ]; + options = [ "subvol=@nix-root" ]; }; - "/home" = { - device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; fsType = "btrfs"; - options = [ "compress=zstd" "subvol=@home" ]; + options = [ "subvol=@home" ]; }; - "/nix" = { - device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; - fsType = "btrfs"; - options = [ "compress=zstd" "subvol=@nix-store" "noatime"]; - }; - "/persist" = { - device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; - fsType = "btrfs"; - options = [ "compress=zstd" "subvol=@persist" ]; - }; - }; boot.initrd.luks.devices."luksdev".device = "/dev/disk/by-uuid/100a5596-671b-48ba-a1d1-0723559baf87"; diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 020f10f..08a6ceb 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -1,87 +1,65 @@ -{ config, nixpkgs-xr, pkgs, lib, ... }: +{ config, pkgs, ... }: let - passthrough = pkgs.writeShellApplication { - name = "passthrough.sh"; - runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs; - text = '' - GUEST_NAME="$1" - HOOK_NAME="$2" - STATE_NAME="$3" + passthrough = pkgs.writeShellScript "pasthrough.sh" '' + GUEST_NAME="$1" + HOOK_NAME="$2" + STATE_NAME="$3" - set -x + set -e + set -x + + # For the windows 10 VM + if [[ "$GUEST_NAME" == "win10" ]]; then - # For the windows 10 VM - if [[ "$GUEST_NAME" == "win10" ]]; then + # Prepare hook + if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then - # Prepare hook - if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then + # Remove Hyprland + ${pkgs.busybox}/bin/pkill Hyprland - # Remove Hyprland - #pkill Hyprland + # Unbind VTconsoles + ${pkgs.busybox}/bin/echo 0 > /sys/class/vtconsole/vtcon0/bind + ${pkgs.busybox}/bin/echo 0 > /sys/class/vtconsole/vtcon1/bind - # Unbind VTconsoles - echo 0 > /sys/class/vtconsole/vtcon0/bind - echo 0 > /sys/class/vtconsole/vtcon1/bind + # Unbind EFI-Framebuffer + ${pkgs.busybox}/bin/echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind - # Unbind EFI-Framebuffer - #echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind + # Unload Modules + ${pkgs.busybox}/bin/modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia - # Unbind the GPU from display driver - virsh nodedev-detach pci_0000_03_00_0 - virsh nodedev-detach pci_0000_03_00_1 - virsh nodedev-detach pci_0000_03_00_2 + # Unbind the GPU from display driver + ${pkgs.libvirt}/bin/virsh nodedev-detach pci_0000_01_00_0 + ${pkgs.libvirt}/bin/virsh nodedev-detach pci_0000_01_00_1 - # Unload Modules - modprobe -r amdgpu + # Load VFIO Kernel Module + ${pkgs.busybox}/bin/modprobe vfio_pci - # We love race conditions - sleep 2 + elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then - # Load VFIO Kernel Module - modprobe vfio vfio_pci vfio_iommu_type1 + # Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours) + ${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_0 + ${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_1 - # Performance Governer - for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > "$file"; done + ${pkgs.busybox}/bin/modprobe -r vfio-pci - # Isolating CPU - systemctl set-property --runtime -- user.slice AllowedCPUs=16-19 - systemctl set-property --runtime -- system.slice AllowedCPUs=16-19 - systemctl set-property --runtime -- init.scope AllowedCPUs=16-19 + #bind efi + ${pkgs.busybox}/bin/echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind - elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then + # Reload nvidia modules + ${pkgs.busybox}/bin/modprobe nvidia_drm + ${pkgs.busybox}/bin/modprobe nvidia_modeset + ${pkgs.busybox}/bin/modprobe nvidia_uvm + ${pkgs.busybox}/bin/modprobe nvidia - modprobe -r vfio_iommu_type1 vfio_pci vfio - - # Re-Bind GPU to Host - virsh nodedev-reattach pci_0000_03_00_0 - virsh nodedev-reattach pci_0000_03_00_1 - virsh nodedev-reattach pci_0000_03_00_2 - - # Rebind VT consoles - echo 1 > /sys/class/vtconsole/vtcon0/bind - echo 1 > /sys/class/vtconsole/vtcon1/bind - - sleep 2 - - # Bind Framebuffer - #echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind - - # Reload Modules - modprobe amdgpu - - # Back to On-Demand Scheduler - for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "ondemand" > "$file"; done - - systemctl set-property --runtime -- user.slice AllowedCPUs=0-19 - systemctl set-property --runtime -- system.slice AllowedCPUs=0-19 - systemctl set-property --runtime -- init.scope AllowedCPUs=0-19 - - fi + # Rebind VT consoles + ${pkgs.busybox}/bin/echo 1 > /sys/class/vtconsole/vtcon0/bind + ${pkgs.busybox}/bin/echo 1 > /sys/class/vtconsole/vtcon1/bind fi - ''; - }; + fi + + ''; in { imports = [ @@ -89,34 +67,18 @@ in { ../default.nix ]; virtualisation.libvirtd.hooks.qemu = { - passthrough = "${passthrough}/bin/passthrough.sh"; + passthrough = "${passthrough}"; }; stitchyconf = { artPkgs.enable = true; }; - virtualisation.libvirtd = { - enable = true; - onBoot = "ignore"; - }; + virtualisation.libvirtd.enable = true; hardware = { - opentabletdriver.enable = true; steam-hardware.enable = true; }; - networking.networkmanager.enable = true; - services.syncthing = { - enable = true; - user = "stitchynyan"; - openDefaultPorts = true; - databaseDir = "/home/stitchynyan/.local/share/syncthing"; - dataDir = "/home/stitchynyan"; - }; - - environment.systemPackages = [ - pkgs.wlx-overlay-s ]; - networking.hostName = "malachite"; time.timeZone = "America/Los_Angeles"; diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index 0c23c7f..da77e9a 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -7,12 +7,8 @@ boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" "vfio-pci" ]; - boot.extraModulePackages = lib.attrVals [ "rtl8812au" ] config.boot.kernelPackages; - - # https://gitlab.com/qemu-project/qemu/-/issues/2574 - # Might bisect or something if I get around to it - boot.kernelPackages = pkgs.linuxPackages_6_6; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; boot.kernelParams = [ "loglevel=3" @@ -24,22 +20,22 @@ "/" = { device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13"; fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" ]; + options = [ "subvol=nix" ]; }; "/home" = { device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13"; fsType = "btrfs"; - options = [ "subvol=homes/stitchymain" "compress=zstd" ]; + options = [ "subvol=homes/stitchymain" ]; }; "/nix/store" = { device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13"; fsType = "btrfs"; - options = [ "subvol=store" "noatime" "compress=zstd" ]; + options = [ "subvol=store" ]; }; "/persist" = { device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13"; fsType = "btrfs"; - options = [ "subvol=@persist" "compress=zstd" ]; + options = [ "subvol=@persist" ]; }; "/boot" = { device = "/dev/disk/by-uuid/CB12-5062"; @@ -48,27 +44,27 @@ "/home/stitchynyan/Music" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=music/stitchtunes" "compress=zstd" "x-systemd.automount" ]; + options = [ "subvol=music/stitchtunes" "x-systemd.automount" ]; }; "/home/stitchynyan/Pictures" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=pictures/stitchpics" "compress=zstd" "x-systemd.automount" ]; + options = [ "subvol=pictures/stitchpics" "x-systemd.automount" ]; }; "/home/stitchynyan/Programs/Steam" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=games/stitchgames" "compress=zstd" "x-systemd.automount" ]; + options = [ "subvol=games/stitchgames" "x-systemd.automount" ]; }; "/home/stitchynyan/Videos" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=videos/stitchshows" "compress=zstd" "x-systemd.automount" ]; + options = [ "subvol=videos/stitchshows" "x-systemd.automount" ]; }; "/home/stitchynyan/VirtualMachines" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=virtualmachines/stitchvms" "compress=zstd" "x-systemd.automount" ]; + options = [ "subvol=virtualmachines/stitchvms" "x-systemd.automount" ]; }; }; @@ -80,21 +76,23 @@ swapDevices = [ ]; + services.xserver.videoDrivers = ["nvidia"]; services.xserver.displayManager.lightdm.enable = false; services.monado = { enable = true; defaultRuntime = true; }; - systemd.user.services.monado.environment = { - STEAMVR_LH_ENABLE = "1"; - XRT_COMPOSITOR_COMPUTE = "1"; - }; - - hardware = { - graphics = { + hardware = { + opengl = { enable = true; - enable32Bit = true; + driSupport = true; + driSupport32Bit = true; + }; + nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + package = config.boot.kernelPackages.nvidiaPackages.beta; }; }; diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix new file mode 100644 index 0000000..06ca55b --- /dev/null +++ b/hosts/scarab/default.nix @@ -0,0 +1,101 @@ +{ config, inputs, lib, pkgs, ... }: +let + +in +{ + imports = [ + ../default.nix + #"${inputs.mobile-nixos}/modules/quirks/qualcomm/sdm845-modem.nix" + #"${inputs.mobile-nixos}/modules/quirks/audio.nix" + ]; + + stitchyconf.form = "handheld"; + + mobile = { + beautification = { + silentBoot = lib.mkDefault true; + splash = lib.mkDefault true; + }; + boot.stage-1 = { + kernel.useStrictKernelConfig = true; + networking.enable = true; + }; + quirks = { + audio.alsa-ucm-meld = true; + qualcomm.sdm845-modem.enable = true; + }; + }; + + boot.loader = { + efi.canTouchEfiVariables = false; + systemd-boot.enable = false; + }; + #services.openssh.enable = true; + services.xserver.desktopManager.phosh = { + enable = true; + user = "stitchynyan"; + group = "users"; + }; + + #services.xserver.desktopManager.plasma5 = { + # enable = true; + # mobile.enable = true; + #}; + + programs.firefox.enable = true; + programs.calls.enable = true; + + hardware = { + bluetooth.enable = true; + pulseaudio.enable = lib.mkForce false; + sensor.iio.enable = true; + }; + + networking.networkmanager = { + enable = true; + unmanaged = [ "rndis0" "usb0" ]; + }; + + /*services.pipewire.wireplumber.configPackages = [ + (pkgs.writeTextDir "share/wireplumber/quailcum.lua.d/51-qcom-sdm845.lua" '' + ${builtins.readFile (pkgs.fetchurl { + url = "https://gitlab.com/postmarketOS/pmaports/-/raw/0aa9524204e9c9c002c860b87c972bc2ebf025f3/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua"; + hash = "sha256-56oNJJyuZZe1Iig1xskDuyazw3PbRZtmU/YRFUTqjwk="; + })} + '') + ];*/ + + services.pipewire.wireplumber.configPackages = [ + (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/51-qcom-sdm845.conf" '' + monitor.alsa.rules = [ + { + matches = [ + { + node.name = "~alsa_output.*" + } + ] + actions = { + update-props = { + audio.format = "S16LE" + audio.rate = 48000 + api.alsa.period-size = 4096 + api.alsa.period-num = 6 + api.alsa.headroom = 512 + } + } + } + ] + '') + ]; + + services.openssh = { + enable = true; + settings.PasswordAuthentication = true; + }; + + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "oneplus-sdm845-firmware" + "oneplus-sdm845-firmware-xz" + ]; + system.stateVersion = "23.11"; +} diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix deleted file mode 100644 index 745dadf..0000000 --- a/hosts/tanzanite/default.nix +++ /dev/null @@ -1,164 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: -let - -in { - imports = [ ../default.nix ]; - - stitchyconf = { - form = "server"; - }; - - networking.hostName = "tanzanite"; - time.timeZone = "America/Los_Angeles"; - - virtualisation.docker = { - enable = true; - daemon.settings = { - data-root = "/opt/data/docker-data"; - }; - }; - - security.acme = { - acceptTerms = true; - defaults.email = "stitchy@stitchy.moe"; - defaults.dnsProvider = "porkbun"; - defaults.environmentFile = "/persist/acme/porkbun.tokens"; - certs = { - "turn.stitchy.moe" = {}; - }; - }; - - services.nginx = { - enable = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - clientMaxBodySize = "100m"; - virtualHosts = { - "stitchy.moe" = { - enableACME = true; - forceSSL = true; - root = "/opt/www/stitchy.moe/public"; - extraConfig = '' - add_header 'Access-Control-Allow-Origin' '*' always; - error_page 404 /404.html; - location = /404.html { - internal; - } - location ^~/shaders/ { - alias /opt/www/shader-web-test/; - } - location ^~/files/ { - alias /opt/www/files/; - } - ''; - }; - "gay.stitchy.moe" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:3333"; - }; - }; - "matrix.stitchy.moe" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:9008"; - }; - }; - "syncv3.stitchy.moe" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:8009"; - }; - }; - }; - }; - - networking.firewall = { - allowedTCPPorts = [ 22 80 222 443 3478 5349 ]; - allowedUDPPorts = [ 3478 5349 ]; - allowedUDPPortRanges = [ - { from = 19000; to = 20000; } - ]; - }; - - # Boot Config - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - # Redundant Storage - fileSystems."/opt/data" = { - device = "/dev/disk/by-uuid/0acaee69-07df-45f3-a2f4-65e2f3fda529"; - fsType = "btrfs"; - options = [ "subvol=@data" "compress=zstd" ]; - }; - - fileSystems."/opt/docker-containers" = { - device = "/dev/disk/by-uuid/0acaee69-07df-45f3-a2f4-65e2f3fda529"; - fsType = "btrfs"; - options = [ "subvol=@docker-containers" "compress=zstd" ]; - }; - - fileSystems."/opt/www" = { - device = "/dev/disk/by-uuid/0acaee69-07df-45f3-a2f4-65e2f3fda529"; - fsType = "btrfs"; - options = [ "subvol=@www" "compress=zstd" ]; - }; - - # Non-Redundant Storage - fileSystems."/" = - { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; - fsType = "btrfs"; - options = [ "subvol=@nix-root" "compress=zstd"]; - }; - - fileSystems."/home" = - { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; - fsType = "btrfs"; - options = [ "subvol=@nix-home" "compress=zstd"]; - }; - - fileSystems."/nix/store" = - { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; - fsType = "btrfs"; - options = [ "subvol=@nix" "noatime" "compress=zstd"]; - }; - - fileSystems."/persist" = - { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; - fsType = "btrfs"; - options = [ "subvol=@persist" "compress=zstd"]; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/262D-F161"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/5c007a16-9f0f-42d0-8761-63bea3120f6d"; } - ]; - - # Static Networking - systemd.network.enable = true; - networking.useNetworkd = true; - systemd.network.networks."10-lan" = { - matchConfig.Name = "enp0s31f6"; - address = [ - "192.168.51.3/24" - ]; - routes = [ - { Gateway = "192.168.51.1"; } - ]; - linkConfig.RequiredForOnline = "routable"; - }; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - system.stateVersion = "24.11"; -} diff --git a/packages/default.nix b/packages/default.nix index da54ddc..4f7fe19 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: let artPkgs = lib.attrVals [ @@ -11,35 +11,37 @@ let ] pkgs; handheldPkgs = lib.attrVals [ "chatty" + "fluffychat" + "gnome-console" "gnome-text-editor" "megapixels" ] pkgs; pcPkgs = lib.attrVals [ - "brightnessctl" - "clipman" - "cyrus-sasl-xoauth2" + #osu-lazer "dracula-theme" - "easyeffects" - "gamescope" - "libnotify" - "mutt-wizard" - "powertop" - "prettypst" "wl-clipboard" + "brightnessctl" + "powertop" + "easyeffects" + "mutt-wizard" + "gamescope" + "cyrus-sasl-xoauth2" + "libnotify" + "networkmanager-openvpn" # temporary home manager things - "eww" - "ifuse" - "img2pdf" "inotify-tools" + "eww" "jq" - "libimobiledevice" + "texliveFull" + "pandoc" + "img2pdf" "socat" - "typst" - ] pkgs ++ [ pkgs.wineWowPackages.stableFull ]; + "libimobiledevice" + "ifuse" + ] pkgs ++ [ inputs.osu-nixos pkgs.wineWowPackages.stableFull ]; serverPkgs = lib.attrVals [ #"package" ] pkgs; - in { options = { @@ -55,40 +57,22 @@ in config = { environment.systemPackages = (lib.attrVals [ - "black" - "clang-tools" + "btop" "eza" "fd" - "fzf" "git" "glib" - "glsl_analyzer" "gnumake" "gnupg" - "hugo" - "mypy" - "neofetch" - "nixd" - "p7zip" "pinentry" - "ripgrep" - "rust-analyzer" - "rustfmt" - "rustup" - "tinymist" - "unzip" - "verible" - "vhdl-ls" - "vtsls" + "neofetch" "wget" - "zip" "zoxide" ] pkgs) ++ (lib.optionals config.stitchyconf.artPkgs.enable artPkgs) ++ (lib.optionals (config.stitchyconf.form == "pc") pcPkgs) ++ (lib.optionals (config.stitchyconf.form == "handheld") handheldPkgs) - ++ (lib.optionals (config.stitchyconf.form == "server") serverPkgs) - ++ [ pkgs.nodePackages.prettier ]; + ++ (lib.optionals (config.stitchyconf.form == "server") serverPkgs); # To-do figure out how to section these off programs = { @@ -101,35 +85,14 @@ in customRC = builtins.readFile ../config/nvim/init.vim; packages.myVimPackage = with pkgs.vimPlugins; { start = [ - conform-nvim - bufferline-nvim - cmp-nvim-lsp - cmp_luasnip - gitsigns-nvim - indent-blankline-nvim - lazy-nvim - luasnip - mini-nvim - neo-tree-nvim - nvim-cmp nvim-lspconfig - (nvim-treesitter.withPlugins ( - plugins: with plugins; [ - glsl - javascript - markdown - ] - )) - nvim-web-devicons - render-markdown-nvim - spaceman-nvim - telescope-nvim - telescope-undo-nvim - toggleterm-nvim + nvim-cmp + cmp-nvim-lsp + luasnip + cmp_luasnip tokyonight-nvim - typst-vim vim-lsp-cxx-highlight - which-key-nvim + typst-vim ]; }; }; @@ -156,25 +119,9 @@ in fonts.packages = lib.attrVals [ "noto-fonts" "noto-fonts-emoji" - "noto-fonts-cjk-sans" - "noto-fonts-cjk-serif" "liberation_ttf" + "nerdfonts" "ipafont" - ] pkgs ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); - - fonts.fontconfig.defaultFonts = { - monospace = [ - "Noto Sans Mono" - "IPAGothic" - ]; - sansSerif = [ - "Noto Sans" - "IPAPGothic" - ]; - serif = [ - "Noto Serif" - "IPAPMincho" - ]; - }; + ] pkgs; }; } diff --git a/users/cirno/default.nix b/users/cirno/default.nix deleted file mode 100644 index 45001a8..0000000 --- a/users/cirno/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - - - config = { - - programs = { - firefox.enable = true; - }; - - services = { - desktopManager.plasma6.enable = true; - displayManager.sddm = { - enable = true; - wayland.enable = true; - }; - pipewire = { - alsa.enable = true; - enable = true; - pulse.enable = true; - }; - }; - - users.users.cirno = { - description = "user for guests/cirno people"; - extraGroups = [ "audio" ]; - home = "/home/cirno"; - initialHashedPassword = "$6$2f8vjQbdKyEBqPRT$FrZBZfzpJGqNqLlCyb7CzRNm0wuZwfRI7Qj/dUQlbtLixyJK5Im9AJT7GXmP5StfhZxSbH/wW8nDGPQm98NXV0"; - isNormalUser = true; - shell = pkgs.zsh; - }; - }; -} diff --git a/users/cirno/home.nix b/users/cirno/home.nix deleted file mode 100644 index 2b43031..0000000 --- a/users/cirno/home.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, - nixosConfig, - pkgs, - lib, - inputs, - home-manager, - ... }: - let - - in - { - - home.stateVersion = "24.05"; - home.homeDirectory = "/home/cirno"; - } diff --git a/users/default.nix b/users/default.nix index ecc5e31..00303d3 100644 --- a/users/default.nix +++ b/users/default.nix @@ -6,5 +6,6 @@ mutableUsers = false; users.root.initialHashedPassword = "!"; }; + hardware.pulseaudio.enable = false; }; } diff --git a/users/home.nix b/users/home.nix deleted file mode 100644 index 67a5c6d..0000000 --- a/users/home.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - ... }: -let - -in { - catppuccin = { - enable = true; - flavor = "macchiato"; - fcitx5.enable = false; - gtk.enable = true; - kvantum.enable = false; - }; - - qt = { - enable = true; - platformTheme.name = "qtct"; - }; - - programs = { - btop = { - enable = true; - settings = { - theme_background = false; - }; - }; - imv.enable = true; - lazygit.enable = true; - wlogout.enable = true; - zathura = { - enable = true; - options = { - recolor-keephue = true; - }; - }; - }; - - xdg.enable = true; -} diff --git a/users/nyadmin/default.nix b/users/nyadmin/default.nix index 3057e1a..b9d96ca 100644 --- a/users/nyadmin/default.nix +++ b/users/nyadmin/default.nix @@ -6,7 +6,7 @@ isNormalUser = true; shell = pkgs.zsh; home = "/home/nyadmin"; - description = "nyadministrator~"; + description = "Administrator~"; extraGroups = [ "wheel" "kvm" "libvirt" "docker" ]; initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30"; openssh.authorizedKeys.keys = [ diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index e8b1045..51d9adf 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -4,85 +4,52 @@ imports = [ ../default.nix ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem ( lib.getName pkg) [ - "cudatoolkit" - "nvidia-settings" - "nvidia-x11" "osu-lazer" - "quartus-prime-lite" - "quartus-prime-lite-unwrapped" "steam" "steam-original" "steam-run" - "steam-unwrapped" + "nvidia-x11" + "nvidia-settings" + "cudatoolkit" ]; - nixpkgs.config.permittedInsecurePackages = [ - "olm-3.2.16" - ]; - - hardware = { - opentabletdriver.enable = true; - }; programs = { firefox.enable = true; - hyprland.enable = true; - kdeconnect.enable = true; + hyprland.enable = config.stitchyconf.form == "pc"; + openvpn3.enable = config.stitchyconf.form == "pc"; steam = { - enable = true; + enable = config.stitchyconf.form == "pc"; remotePlay.openFirewall = true; }; - wireshark.enable = true; }; - security.pam.services.swaylock = {}; - services = { avahi = { - enable = config.stitchyconf.form == "pc"; + enable = false; nssmdns4 = true; openFirewall = true; }; blueman.enable = true; - gnome.gnome-keyring.enable = true; + gnome.gnome-keyring.enable = lib.mkIf( config.stitchyconf.form == "pc") true; pipewire = { + enable = lib.mkForce true; alsa.enable = true; - enable = true; + jack.enable = true; pulse.enable = true; }; - printing.enable = true; - usbmuxd.enable = true; + printing.enable = false; + usbmuxd.enable = false; xserver.enable = true; }; + security.pam.services.swaylock = {}; + users.users.stitchynyan = { - description = "Personal user"; - extraGroups = [ "audio" "dialout" "docker" "kvm" "libvirtd" "networkmanager" "plugdev" "wireshark" "wheel" ]; - home = "/home/stitchynyan"; - initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; isNormalUser = true; shell = pkgs.zsh; - }; - - i18n = { - defaultLocale = "ja_JP.UTF-8"; - inputMethod = { - enable = true; - type = "fcitx5"; - fcitx5 = { - waylandFrontend = true; - settings.addons = { - classicui.globalSection = { - Theme = "FluentLight"; - DarkTheme = "FluentDark"; - UseDarkTheme = "True"; - UseAccentColor = "True"; - }; - }; - addons = with pkgs; [ - fcitx5-mozc - fcitx5-fluent - ]; - }; - }; + home = "/home/stitchynyan"; + description = "Personal user"; + extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" ]; + initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; }; } diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 6a0f820..9424baa 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -11,39 +11,35 @@ let ] pkgs; pcPkgs = lib.attrVals [ "activitywatch" - "anki" - "awatcher" "dunst" - "foliate" "foot" "grim" - "hunspell" - "hyprpaper" + "imv" "isync" "kitty" + "hunspell" + "hyprpaper" "libreoffice" "librewolf" "lynx" "mpv" "msmtp" + "mupdf" "neomutt" "networkmanagerapplet" "nheko" "notmuch" - "osu-lazer" - "pass" + "okular" "pavucontrol" + "pass" "playerctl" "prismlauncher" - "pstree" - "qbittorrent" + "qt5ct" "qt6ct" "slurp" - "swayidle" "swaylock-effects" - "tofi" "wofi" - ] pkgs ++ [ pkgs.hunspellDicts.en_US pkgs.kdePackages.okular ]; + ] pkgs ++ [ pkgs.hunspellDicts.en_US ]; in { options = { @@ -53,12 +49,13 @@ in home.packages = with pkgs; [ cider ngspice + hugo kicad #steamvr? procps usbutils - yt-dlp - (python3.withPackages (lib.attrVals [ "matplotlib" "pyflakes" "python-lsp-server" "sympy"])) + (python311.withPackages (lib.attrVals ["sympy" "matplotlib"])) + (octaveFull.withPackages (lib.attrVals ["symbolic"])) ] ++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs) ++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs); @@ -73,13 +70,7 @@ in # To-Do Later home.sessionVariables = { FOO = "BAR"; - }; - gtk.enable = true; - dconf.settings = { - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - }; }; home.file = { @@ -95,36 +86,21 @@ in source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/eww"; recursive = true; }; - "foot" = { - source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/foot"; - recursive = true; - }; "hypr" = { source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/hypr"; recursive = true; }; - "mutt" = { - source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/mutt"; - recursive = true; - }; - "mutt_oauth2.py" = { - source = "${pkgs.neomutt}/share/neomutt/oauth2/mutt_oauth2.py"; - }; "swaylock" = { source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/swaylock"; recursive = true; }; - "vis" = { - source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/vis"; - recursive = true; - }; }; systemd.user.services = { mailsync = { Unit = { Description = "Syncs email"; - After = [ "network-online.target" ]; + After = [ "network-online.target" ]; }; Service = { Type = "oneshot"; @@ -133,7 +109,7 @@ in "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus" "DISPLAY=:0" "MBSYNCRC=/home/stitchynyan/.config/mbsync/config" - "PATH=$PATH:${lib.makeBinPath (lib.attrVals [ "busybox" "cyrus-sasl-xoauth2" "gnupg" "isync" "libnotify" "notmuch" "pass" "perl" "python3" ] pkgs)}" + "PATH=$PATH:${lib.makeBinPath (lib.attrVals [ "busybox" "cyrus-sasl-xoauth2" "gnupg" "isync" "notify" "notmuch" "pass" "perl" "python3" ] pkgs)}" "SASL_PATH=/run/current-system/sw/lib/sasl2" "WAYLAND_DISPLAY=wayland-1" ]; @@ -142,40 +118,22 @@ in }; }; - programs.gpg = { - homedir = "${config.xdg.dataHome}/gnupg"; - }; - - services = { - gpg-agent = { - enable = true; - enableScDaemon = false; - enableSshSupport = true; - defaultCacheTtl = 34560000; - maxCacheTtl = 34560000; - extraConfig = '' - allow-preset-passphrase - pinentry-program /run/current-system/sw/bin/pinentry - ''; - }; - }; - systemd.user.timers = { mailsync = { Unit.Description = "Syncs email"; Timer = { OnBootSec = "1min"; - OnUnitActiveSec = "10min"; + OnUnitActiveSec = "10min"; }; Install.WantedBy = [ "timers.target" ]; }; }; home.pointerCursor = { - name = "phinger-cursors-dark"; + name = "phinger-cursors"; package = pkgs.phinger-cursors; gtk.enable = true; - size = 24; + size = 64; }; # Read the Docs before change