Compare commits
86 commits
oneplus/sc
...
master
Author | SHA1 | Date | |
---|---|---|---|
00f735aa4f | |||
1149888ef8 | |||
2f1b3fc090 | |||
deb0db6ec0 | |||
205575056c | |||
8fd1741c7f | |||
071f45d111 | |||
64d37c19da | |||
c87558574d | |||
f66ed49776 | |||
a1885849a2 | |||
ab9794ced1 | |||
ea053ca45d | |||
d98e01928e | |||
97e544b3f2 | |||
f60c305e7e | |||
5544f0d6c0 | |||
4818be44d3 | |||
97886fa0f0 | |||
5a37fd5165 | |||
59ad109068 | |||
38c9117551 | |||
0effd94182 | |||
8bff5db0f5 | |||
0283dea2e6 | |||
0c12e52353 | |||
bfeae72f73 | |||
aa269aa681 | |||
0376b2eb94 | |||
89cd96a5c5 | |||
8fe62f295f | |||
ec823cbbad | |||
76f7c6695a | |||
19069aba44 | |||
a17eb40eae | |||
93571017f7 | |||
81b214586f | |||
eb73cf9c03 | |||
c75f696013 | |||
d9e21b23bd | |||
095e9f29fa | |||
75b6e32ce2 | |||
53dbae8493 | |||
2d5b5cb37d | |||
a1c38f605d | |||
e2ddc10b22 | |||
1fd1838d3f | |||
57132cc602 | |||
230ef0165b | |||
7f89cb0a37 | |||
a90cb37e69 | |||
d249ab216f | |||
0e60d4acac | |||
33f4d22664 | |||
4cd16133e9 | |||
c7b07f2130 | |||
8b19a173fe | |||
78de462017 | |||
3ec1ba5f9b | |||
4d66a5e231 | |||
7545885942 | |||
53ef1f28c6 | |||
c4e46d0a28 | |||
d73ecb1bdb | |||
e1aa67dbb2 | |||
3aeda379d5 | |||
9ec7fb3c67 | |||
3c6cc3e1d2 | |||
34f8e2640f | |||
54e9588487 | |||
00cb1bbe74 | |||
f44ccff64f | |||
f7199197c6 | |||
fa48674845 | |||
b27b33d13e | |||
67de9c5169 | |||
230958bd8f | |||
a6c4098a5c | |||
97a6ae026e | |||
aea964c745 | |||
0a8c6eb54e | |||
9a4993661b | |||
40a8d3b711 | |||
101d47fa29 | |||
8d69eb76d6 | |||
16ae890458 |
35 changed files with 1332 additions and 527 deletions
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
temp/
|
||||||
|
result
|
||||||
|
*.png
|
||||||
|
*.jpg
|
||||||
|
*.bak
|
|
@ -45,6 +45,9 @@
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cal {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.clock {
|
.clock {
|
||||||
background-color: #536;
|
background-color: #536;
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
;;;; (defpoll time :interval "1s" 'date +%s')
|
;; VARIABLE DEFINITIONS
|
||||||
|
|
||||||
(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 workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
|
||||||
(deflisten current_workspace :initial "..." "bash ~/.config/eww/scripts/get-active-workspace")
|
(deflisten current_workspace :initial "..." "bash ~/.config/eww/scripts/get-active-workspace")
|
||||||
(deflisten urgent_workspace :initial "..." "bash ~/.config/eww/scripts/get-urgent-workspaces")
|
(deflisten urgent_workspace :initial "..." "bash ~/.config/eww/scripts/get-urgent-workspaces")
|
||||||
|
@ -21,6 +19,21 @@
|
||||||
(label :text "${workspace.id}")
|
(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"
|
(box :halign "center"
|
||||||
|
@ -43,33 +56,42 @@
|
||||||
:val {EWW_BATTERY.BAT1.capacity}
|
:val {EWW_BATTERY.BAT1.capacity}
|
||||||
:char ""))
|
: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 []
|
(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}
|
(circle :prog {vol * 7/10}
|
||||||
:sty "font-size: 12; margin-right: 2px;"
|
:sty "font-size: 12; margin-right: 2px;"
|
||||||
:val {vol + 1 - 1}
|
:val {vol + 1 - 1}
|
||||||
:char ""))
|
:char "")))
|
||||||
|
|
||||||
(defpoll micvol :interval "1m" "wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print $2}'")
|
|
||||||
|
|
||||||
(defwidget mic []
|
(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}
|
(circle :prog {micvol * 70}
|
||||||
:sty "margin-left: 1px;"
|
:sty "margin-left: 1px;"
|
||||||
:val {micvol *100}
|
:val {micvol *100}
|
||||||
:char ""))
|
: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 []
|
(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}
|
(circle :prog {(backlight / 960) * 7/10}
|
||||||
:sty "font-size: 12; margin-right: 3px;"
|
:sty "font-size: 12; margin-right: 3px;"
|
||||||
:val {round( backlight / 960, 0) - 1}
|
:val {round( backlight / 960, 0) - 1}
|
||||||
:char ""))
|
:char "")))
|
||||||
|
|
||||||
(defwidget power []
|
(defwidget power []
|
||||||
(box :class "power" :valign "end" "⏻"))
|
(box :class "power" :valign "end" "⏻"))
|
||||||
|
|
||||||
|
(defwidget tray []
|
||||||
|
(systray :orientation "v" :icon-size 20))
|
||||||
|
|
||||||
|
|
||||||
|
;; Upper Level Widgets
|
||||||
|
|
||||||
|
|
||||||
(defwidget bar []
|
(defwidget bar []
|
||||||
(centerbox :orientation "vertical"
|
(centerbox :orientation "vertical"
|
||||||
:halign "center"
|
:halign "center"
|
||||||
|
@ -81,17 +103,34 @@
|
||||||
(mic)
|
(mic)
|
||||||
(volume)
|
(volume)
|
||||||
(battery)
|
(battery)
|
||||||
|
(tray)
|
||||||
(power))))
|
(power))))
|
||||||
|
|
||||||
|
(defwidget cal []
|
||||||
|
(box
|
||||||
|
:class "cal"
|
||||||
|
(eventbox
|
||||||
|
:onhoverlost "eww close cal"
|
||||||
|
(calendar))))
|
||||||
|
|
||||||
|
|
||||||
|
;; Windows
|
||||||
|
|
||||||
(defwindow bar
|
(defwindow bar
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:geometry (geometry :x "4px"
|
:geometry (geometry :x "4px"
|
||||||
:y "1%"
|
|
||||||
:width "2.5%"
|
|
||||||
:height "98%"
|
:height "98%"
|
||||||
:anchor "left center")
|
:anchor "left center")
|
||||||
:stacking "fg"
|
:stacking "fg"
|
||||||
:exclusive true
|
:exclusive true
|
||||||
:class "bar"
|
:class "bar"
|
||||||
(bar))
|
(bar))
|
||||||
|
|
||||||
|
(defwindow cal
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry :x "4px"
|
||||||
|
:anchor "left center")
|
||||||
|
:stacking "fg"
|
||||||
|
:exclusive false
|
||||||
|
:class "bar"
|
||||||
|
(cal))
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
||||||
|
|
||||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
socat -u UNIX-CONNECT:/run/user/1000/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
||||||
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
||||||
|
|
20
config/foot/foot.ini
Normal file
20
config/foot/foot.ini
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# -*- conf -*-
|
||||||
|
|
||||||
|
font=monospace:size=10
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
alpha = .65
|
||||||
|
foreground=dcdccc
|
||||||
|
background=393052
|
||||||
|
|
||||||
|
[cursor]
|
||||||
|
color=111111 dcdccc
|
||||||
|
|
||||||
|
[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
|
|
@ -1,32 +1,39 @@
|
||||||
# Binding Config File for Hyprland
|
# Binding Config File for Hyprland
|
||||||
|
|
||||||
# Main Bindings
|
# Main Bindings
|
||||||
#
|
|
||||||
# Foot, you done goofed
|
|
||||||
bind=ALT,RETURN,exec,foot
|
|
||||||
#bind=ALT,RETURN,exec,kitty
|
|
||||||
|
|
||||||
bind=ALT,Q,killactive,
|
# Programs
|
||||||
bind=SUPER,M,exec,hyprctl dispatch exit 0
|
bind=ALT,A,exec,footclient nvim
|
||||||
|
bind=ALT,B,exec,swaylock
|
||||||
bind=ALT,E,exec,dolphin
|
bind=ALT,E,exec,dolphin
|
||||||
bind=ALT,V,togglefloating,
|
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
|
bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images
|
||||||
bind=ALTSHIFT,F,fullscreen,1
|
|
||||||
|
|
||||||
|
# Basic Actions
|
||||||
|
bind=ALT,Q,killactive,
|
||||||
|
bind=ALT,V,togglefloating,
|
||||||
bind=ALTSHIFT,M,fullscreen,0
|
bind=ALTSHIFT,M,fullscreen,0
|
||||||
bind=,Print,exec,grim -g "$(slurp)" -t jpeg - | wl-copy
|
bind=SUPER,M,exec,hyprctl dispatch exit 0
|
||||||
bind=SHIFT,Print,exec,grim -g "$(slurp)" -t jpeg Downloads/screenshot.jpeg
|
|
||||||
|
# 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
|
||||||
|
|
||||||
# trigger when the switch is toggled
|
# trigger when the switch is toggled
|
||||||
bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale
|
bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Games
|
# Games
|
||||||
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,C,exec,"/home/flyingstitchman/Documents/Games/Celeste/Celeste"
|
||||||
bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley"
|
bind=ALTSHIFT,O,exec,osu\!
|
||||||
bind=ALTSHIFT,R,exec,"/home/flyingstitchman/Documents/Games/factorio/bin/x64/factorio"
|
bind=ALTSHIFT,R,exec,"/home/flyingstitchman/Documents/Games/factorio/bin/x64/factorio"
|
||||||
|
bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley"
|
||||||
|
bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe"
|
||||||
|
|
||||||
|
|
||||||
# Window Moving
|
# Window Moving
|
||||||
|
@ -58,6 +65,16 @@ bind=ALTSHIFT,k,swapwindow, u
|
||||||
bind=ALTSHIFT,h,swapwindow, l
|
bind=ALTSHIFT,h,swapwindow, l
|
||||||
bind=ALTSHIFT,l,swapwindow, r
|
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
|
# Switch Workspace Bindings
|
||||||
bind=ALT,1,workspace,1
|
bind=ALT,1,workspace,1
|
||||||
bind=ALT,2,workspace,2
|
bind=ALT,2,workspace,2
|
||||||
|
@ -82,24 +99,16 @@ bind=ALTSHIFT,8,movetoworkspace,8
|
||||||
bind=ALTSHIFT,9,movetoworkspace,9
|
bind=ALTSHIFT,9,movetoworkspace,9
|
||||||
bind=ALTSHIFT,10,movetoworkspace,0
|
bind=ALTSHIFT,10,movetoworkspace,0
|
||||||
|
|
||||||
# Submap for resizing windows
|
## Resizing Windows ##
|
||||||
bind=ALT,R,submap,resize # will switch to a submap called resize
|
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=resize # will start a submap called "resize"
|
binde=SUPERSHIFT,L,resizeactive,50 0
|
||||||
|
binde=SUPERSHIFT,H,resizeactive,-50 0
|
||||||
binde=,L,resizeactive,10 0
|
binde=SUPERSHIFT,K,resizeactive,0 -50
|
||||||
binde=,H,resizeactive,-10 0
|
binde=SUPERSHIFT,J,resizeactive,0 50
|
||||||
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)
|
# Submap to disable all keybinds (for blender)
|
||||||
bind=ALT,U,submap,clean
|
bind=ALT,U,submap,clean
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
# Executable Startup File for Hyprland
|
# Executable Startup File for Hyprland
|
||||||
#exec-once=uclampset -M 10 waybar
|
#exec-once=uclampset -M 10 waybar
|
||||||
exec-once=eww open bar
|
exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh
|
||||||
exec-once=swayidle
|
exec-once=aw-server
|
||||||
exec-once=hyprpaper
|
exec-once=awatcher
|
||||||
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=dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus
|
||||||
exec-once=dunst
|
exec-once=dunst
|
||||||
exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh
|
exec-once=eww open bar
|
||||||
exec-once=fcitx5
|
exec-once=fcitx5
|
||||||
#exec-once=~/.config/hypr/portal.sh
|
exec-once=foot -s
|
||||||
|
exec-once=hyprpaper
|
||||||
|
exec-once=swayidle
|
||||||
exec-once=systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
exec-once=systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
exec-once=wl-paste -p --watch wl-copy -pc
|
exec-once=wl-paste -t text --watch clipman store --no-persist
|
||||||
|
|
|
@ -51,17 +51,11 @@ decoration {
|
||||||
passes=3
|
passes=3
|
||||||
ignore_opacity=false
|
ignore_opacity=false
|
||||||
new_optimizations=true
|
new_optimizations=true
|
||||||
|
noise=.03
|
||||||
|
vibrancy=.2
|
||||||
|
vibrancy_darkness=0.5
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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
|
# Other
|
||||||
rounding=15
|
rounding=15
|
||||||
inactive_opacity=.8
|
inactive_opacity=.8
|
||||||
|
@ -71,14 +65,15 @@ decoration {
|
||||||
animations {
|
animations {
|
||||||
enabled=true
|
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, 7, myBezier
|
animation = windows, 1, 1, fast
|
||||||
animation = windowsOut, 1, 7, default, popin 80%
|
animation = windowsOut, 1, 7, default, popin 80%
|
||||||
animation = border, 1, 10, default
|
animation = border, 1, 10, default
|
||||||
animation = borderangle, 1, 8, default
|
animation = borderangle, 1, 8, default
|
||||||
animation = fade, 1, 7, default
|
animation = fade, 1, 3, default
|
||||||
animation = workspaces, 1, 6, default
|
animation = workspaces, 1, 1, fast
|
||||||
|
animation = specialWorkspace, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
dwindle {
|
dwindle {
|
||||||
|
@ -86,12 +81,9 @@ dwindle {
|
||||||
preserve_split=true
|
preserve_split=true
|
||||||
}
|
}
|
||||||
|
|
||||||
master {
|
|
||||||
new_is_master=true
|
|
||||||
}
|
|
||||||
|
|
||||||
misc {
|
misc {
|
||||||
layers_hog_keyboard_focus=true
|
layers_hog_keyboard_focus=true
|
||||||
|
middle_click_paste=true
|
||||||
vfr=1
|
vfr=1
|
||||||
vrr=on
|
vrr=on
|
||||||
disable_hyprland_logo=true
|
disable_hyprland_logo=true
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
preload = ~/.config/wallpapers/wallpaper.png
|
preload = ~/.config/wallpapers/current_wallpaper.png
|
||||||
|
|
||||||
|
|
||||||
wallpaper = eDP-1,~/.config/wallpapers/wallpaper.png
|
wallpaper = eDP-1,~/.config/wallpapers/current_wallpaper.png
|
||||||
wallpaper = DP-1,~/.config/wallpapers/wallpaper.png
|
wallpaper = DP-1,~/.config/wallpapers/current_wallpaper.png
|
||||||
wallpaper = DP-2,~/.config/wallpapers/wallpaper.png
|
wallpaper = DP-2,~/.config/wallpapers/current_wallpaper.png
|
||||||
wallpaper = DP-3,~/.config/wallpapers/wallpaper.png
|
wallpaper = DP-3,~/.config/wallpapers/current_wallpaper.png
|
||||||
wallpaper = DP-4,~/.config/wallpapers/wallpaper.png
|
wallpaper = DP-4,~/.config/wallpapers/current_wallpaper.png
|
||||||
|
wallpaper = HDMI-A-1,~/.config/wallpapers/current_wallpaper.png
|
||||||
splash=false
|
splash=false
|
||||||
ipc = off
|
ipc = off
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
monitor=eDP-1,2256x1504@60,0x0,1.5
|
monitor=eDP-1,2256x1504@60,0x0,1.5
|
||||||
#monitor=DP-2,1024x786,2256x0,1
|
#monitor=DP-2,1024x786,2256x0,1
|
||||||
workspace=eDP-1,1
|
workspace=eDP-1,1
|
||||||
#monitor=DP-1,preferred,auto,1
|
|
||||||
#monitor=DP-2,preferred,auto,1
|
# Auto Monitor Rule
|
||||||
#monitor=DP-3,preferred,auto,1
|
monitor = , preferred, auto, 1
|
||||||
#monitor=DP-4,preferred,auto,1
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/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 &
|
|
|
@ -1,10 +1,13 @@
|
||||||
# Window Rule Config File
|
# Window Rule Config File
|
||||||
|
|
||||||
# WLogout Configuration
|
# Application Fixes
|
||||||
# Might move to separate file cause screen resolutions whack
|
# Foot Fullscreen Transparency Fix
|
||||||
|
windowrulev2 = syncfullscreen 0, initialClass:(footclient), initialTitle:(foot)
|
||||||
|
|
||||||
windowrule=nofocus,ibus,^(Ibus-ui-gtk3)$
|
windowrule=nofocus,ibus,^(Ibus-ui-gtk3)$
|
||||||
|
|
||||||
|
# WLogout Configuration
|
||||||
|
# Might move to separate file cause screen resolutions whack
|
||||||
windowrule=move 720 222,wlogout
|
windowrule=move 720 222,wlogout
|
||||||
windowrule=size 2000 1000,wlogout
|
windowrule=size 2000 1000,wlogout
|
||||||
windowrule=tile,xyz
|
windowrule=tile,xyz
|
||||||
|
|
|
@ -1,155 +1,9 @@
|
||||||
" (Neo)vim Configuration
|
" (Neo)vim Configuration
|
||||||
" By Flying_Stitchman
|
" By Flying_Stitchman 4 Jan 2022
|
||||||
" 4 Jan 2022
|
|
||||||
|
|
||||||
" Basic Configuration
|
" nvim builtin option config
|
||||||
|
luafile /etc/nixos/config/nvim/lua/options.lua
|
||||||
syntax on
|
" nvim keymapping
|
||||||
set spell
|
luafile /etc/nixos/config/nvim/lua/keymap.lua
|
||||||
set hlsearch
|
" Main Config stuffs
|
||||||
set ignorecase
|
luafile /etc/nixos/config/nvim/nvim.lua
|
||||||
set number relativenumber
|
|
||||||
set noswapfile
|
|
||||||
inoremap jk <ESC>
|
|
||||||
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({
|
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
|
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
|
|
||||||
-- C-b (back) C-f (forward) for snippet placeholder navigation.
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
},
|
|
||||||
['<Tab>'] = 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' }),
|
|
||||||
['<S-Tab>'] = 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
|
|
||||||
|
|
153
config/nvim/lua/keymap.lua
Normal file
153
config/nvim/lua/keymap.lua
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
-- Keymap File
|
||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
-- jk exit from insert mode
|
||||||
|
map("i", "jk", "<cmd>noh<cr><Esc>", { silent = true })
|
||||||
|
map({"n", "x"}, "<Esc>", "<cmd>noh<cr><Esc>", { silent = true })
|
||||||
|
|
||||||
|
----
|
||||||
|
-- Movements
|
||||||
|
----
|
||||||
|
|
||||||
|
-- More powerful J and K (use 6j/6k)
|
||||||
|
-- Via Pseudometa (https://nanotipsforvim.prose.sh/motion-setup--hjkl-as-amplified-hjkl)
|
||||||
|
map({ "n", "x" }, "<S-j>", "6j")
|
||||||
|
map({ "n", "x" }, "<S-k>", "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 <ctrl> hjkl keys
|
||||||
|
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
|
||||||
|
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window", remap = true })
|
||||||
|
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window", remap = true })
|
||||||
|
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window", remap = true })
|
||||||
|
|
||||||
|
-- Move between buffers
|
||||||
|
map("n", "<S-h>", "<cmd>BufferLineCyclePrev<CR>", { desc = "Move buffer left", silent = true })
|
||||||
|
map("n", "<S-l>", "<cmd>BufferLineCycleNext<CR>", { desc = "Move buffer right", silent = true })
|
||||||
|
map("n", "<leader><", "<cmd>BufferLineMovePrev<CR>", { desc = "Move buffer left", silent = true })
|
||||||
|
map("n", "<leader>>", "<cmd>BufferLineMoveNext<CR>", { desc = "Move buffer right", silent = true })
|
||||||
|
|
||||||
|
-- ToggleTerm Bindings
|
||||||
|
map("n", "<leader>a", "<cmd>ToggleTerm name=main<CR>", { desc = "Floating Terminal", silent = true })
|
||||||
|
|
||||||
|
-- Undotree
|
||||||
|
map("n", "<leader>fu", "<cmd>Telescope undo<cr>")
|
||||||
|
----
|
||||||
|
-- Cool Macros
|
||||||
|
----
|
||||||
|
|
||||||
|
-- Quit All
|
||||||
|
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
|
||||||
|
|
||||||
|
-- Copy and paste from system clipboard
|
||||||
|
map({ "n", "x" }, "<Leader>y", '"+y', { desc = "Yank to system clipboard", silent = true })
|
||||||
|
map({ "n", "x" }, "<Leader>p", '"+p', { desc = "Paste after from system clipboard", silent = true })
|
||||||
|
map({ "n", "x" }, "<Leader>P", '"+P', { desc = "Paste before from system clipboard", silent = true })
|
||||||
|
|
||||||
|
-- Neotree
|
||||||
|
map("n", "<leader>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" }, "<leader>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", "<leader>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", "<leader><space>", telescope_git_fallback, { desc = "Find files (git/fallback, cwd)" })
|
||||||
|
map("n", "<leader>ff", telescope_files, { desc = "Find files (cwd)" })
|
||||||
|
map("n", "<leader>fo", telescope_oldfiles, { desc = "Find files (cwd)" })
|
||||||
|
map("n", "<leader>/", telescope_live_grep, { desc = "Live grep (cwd)" })
|
||||||
|
map("n", "<leader>,", require("telescope.builtin").buffers, { desc = "Find buffers" })
|
||||||
|
map("n", "<leader>\"", 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" }, "<Down>", "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" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
-- Auto Re-highlight After Indent
|
||||||
|
map("v", "<", "<gv")
|
||||||
|
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", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
||||||
|
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to left window" })
|
||||||
|
map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to lower window" })
|
||||||
|
map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to upper window" })
|
||||||
|
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
|
||||||
|
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||||
|
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||||
|
|
||||||
|
|
45
config/nvim/lua/options.lua
Normal file
45
config/nvim/lua/options.lua
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
-- 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
|
||||||
|
vim.cmd("colorscheme tokyonight")
|
||||||
|
vim.cmd("hi Comment guifg=#e69dc5")
|
||||||
|
vim.cmd("hi Linenr guifg=#a672f3")
|
169
config/nvim/nvim.lua
Normal file
169
config/nvim/nvim.lua
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
-- This will need some refactoring as it is mostly a
|
||||||
|
-- copy and paste from the previous single-file .vim config
|
||||||
|
|
||||||
|
require'lspconfig'.rust_analyzer.setup{}
|
||||||
|
require'lspconfig'.texlab.setup{}
|
||||||
|
require'lspconfig'.svls.setup{}
|
||||||
|
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', 'tinymist', 'rust_analyzer', 'vhdl_ls', 'vtsls' }
|
||||||
|
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({
|
||||||
|
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
|
||||||
|
-- C-b (back) C-f (forward) for snippet placeholder navigation.
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
|
['<Tab>'] = 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' }),
|
||||||
|
['<S-Tab>'] = 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 = {
|
||||||
|
css = { "prettier", },
|
||||||
|
html = { "prettier", },
|
||||||
|
javascript = { "prettier", },
|
||||||
|
python = { "black" },
|
||||||
|
},
|
||||||
|
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",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
43
config/zshrc
43
config/zshrc
|
@ -7,7 +7,6 @@ unsetopt autocd beep notify
|
||||||
unsetopt PROMPT_SP
|
unsetopt PROMPT_SP
|
||||||
bindkey -v
|
bindkey -v
|
||||||
# End of lines configured by zsh-newuser-install
|
# End of lines configured by zsh-newuser-install
|
||||||
|
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
export XDG_CACHE_HOME="$HOME/.cache"
|
export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
|
@ -18,6 +17,10 @@ alias kon="ncmpcpp -b ~/.config/ncmpcpp/bindings"
|
||||||
alias myip="curl ifconfig.me"
|
alias myip="curl ifconfig.me"
|
||||||
alias ghidra="_JAVA_AWT_WM_NONREPARENTING=1 ghidra"
|
alias ghidra="_JAVA_AWT_WM_NONREPARENTING=1 ghidra"
|
||||||
alias ls='eza'
|
alias ls='eza'
|
||||||
|
alias l='ls -l'
|
||||||
|
alias la='ls -la'
|
||||||
|
alias ll='ls -l'
|
||||||
|
alias lla='ls -la'
|
||||||
alias v="nvim" # Launch neovim with 'v'
|
alias v="nvim" # Launch neovim with 'v'
|
||||||
alias mountUSB="mount /home/flyingstitchman/ExternalDrive" # Automagically mount and unmount my flashdrive
|
alias mountUSB="mount /home/flyingstitchman/ExternalDrive" # Automagically mount and unmount my flashdrive
|
||||||
alias umountUSB="umount /home/flyingstitchman/ExternalDrive"
|
alias umountUSB="umount /home/flyingstitchman/ExternalDrive"
|
||||||
|
@ -30,6 +33,16 @@ alias imv="imv -b aa77bb"
|
||||||
alias find="fd"
|
alias find="fd"
|
||||||
alias tree="eza --tree"
|
alias tree="eza --tree"
|
||||||
alias icat="kitty +kitten icat"
|
alias icat="kitty +kitten icat"
|
||||||
|
alias qsus="NIXPKGS_ALLOW_UNFREE=1 nix-shell -p quartus-prime-lite -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fe7ab74a86d78ba00d144aa7a8da8c71a200c563.tar.gz"
|
||||||
|
|
||||||
|
# thanks fire :3
|
||||||
|
alias c='clear'
|
||||||
|
alias lg='lazygit'
|
||||||
|
# Future fire, this is for a meme.
|
||||||
|
nya() {
|
||||||
|
args=$(echo $@ | sed 's/nya/git/g')
|
||||||
|
git $args 2>&1 >/dev/null | sed 's/git/nya/g' | sed 's/GIT/NYA/g' | sed 's/Git/Nya/g'
|
||||||
|
}
|
||||||
|
|
||||||
# Automatically get new programs for autocompletion
|
# Automatically get new programs for autocompletion
|
||||||
|
|
||||||
|
@ -37,6 +50,19 @@ zshcache_time="$(date +%s%N)"
|
||||||
|
|
||||||
autoload -Uz add-zsh-hook
|
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() {
|
rehash_precmd() {
|
||||||
if [[ -a /var/cache/zsh/pacman ]]; then
|
if [[ -a /var/cache/zsh/pacman ]]; then
|
||||||
local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)"
|
local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)"
|
||||||
|
@ -84,9 +110,7 @@ export EDITOR=nvim
|
||||||
#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
export PATH="${PATH}:/home/flyingstitchman/.cargo/bin"
|
export PATH="${PATH}:/home/flyingstitchman/.cargo/bin"
|
||||||
|
|
||||||
# Ibus
|
# Fcitx for Xwayland
|
||||||
GTK_IM_MODULE=fcitx
|
|
||||||
QT_IM_MODULE=fcitx
|
|
||||||
XMODIFIERS=@im=fcitx
|
XMODIFIERS=@im=fcitx
|
||||||
|
|
||||||
# Clean Up
|
# Clean Up
|
||||||
|
@ -96,11 +120,11 @@ export QT_QPA_PLATFORMTHEME=qt5ct
|
||||||
#export GDK_DEBUG=1
|
#export GDK_DEBUG=1
|
||||||
export MBSYNCRC=${XDG_CONFIG_HOME:-~/.config}/mbsync/config
|
export MBSYNCRC=${XDG_CONFIG_HOME:-~/.config}/mbsync/config
|
||||||
export PASSWORD_STORE_DIR=${XDG_CONFIG_HOME:-~/.config}/password_store
|
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 NOTMUCH_CONFIG=${XDG_CONFIG_HOME-~/.config}/notmuch/config
|
||||||
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
|
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
|
||||||
export KDEHOME="$XDG_CONFIG_HOME"/kde
|
export KDEHOME="$XDG_CONFIG_HOME"/kde
|
||||||
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
|
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
|
||||||
|
export GNUPGHOME=${XDG_DATA_HOME-~/.config}/gnupg
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
export SDL_VIDEODRIVER=wayland
|
export SDL_VIDEODRIVER=wayland
|
||||||
export GOPATH="$XDG_DATA_HOME"
|
export GOPATH="$XDG_DATA_HOME"
|
||||||
|
@ -111,12 +135,15 @@ export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default
|
||||||
export DOTNET_CLI_HOME="$XDG_CONFIG_HOME"/dotnet
|
export DOTNET_CLI_HOME="$XDG_CONFIG_HOME"/dotnet
|
||||||
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
||||||
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
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 "
|
alias dosbox="dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf"
|
||||||
|
alias rbs="reconfig switch"
|
||||||
|
alias rbb="reconfig build"
|
||||||
|
|
||||||
|
reconfig() {
|
||||||
|
sudo nixos-rebuild --flake "/etc/nixos#$(cat /etc/hostname)" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
# Autostart Hyprland after all environmental Variables have been declared
|
# Autostart Hyprland after all environmental Variables have been declared
|
||||||
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||||
|
|
149
flake.lock
149
flake.lock
|
@ -1,28 +1,29 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1627913399,
|
"lastModified": 1696426674,
|
||||||
"narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=",
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
"owner": "edolstra",
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
"repo": "flake-compat",
|
"revCount": 57,
|
||||||
"rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2",
|
"type": "tarball",
|
||||||
"type": "github"
|
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "edolstra",
|
"type": "tarball",
|
||||||
"repo": "flake-compat",
|
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1623875721,
|
"lastModified": 1731533236,
|
||||||
"narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -38,11 +39,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710349883,
|
"lastModified": 1734093295,
|
||||||
"narHash": "sha256-bjbdS2mC76xNJwt1d/uZa+JdHR8CCyYbF4Ey/NgOJus=",
|
"narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2f0db7d418e781354d8a3c50e611e3b1cd413087",
|
"rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -55,11 +56,11 @@
|
||||||
"mobile-nixos": {
|
"mobile-nixos": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710655727,
|
"lastModified": 1733700802,
|
||||||
"narHash": "sha256-TOJraNC9vW2gP/ov1RBD+J61pUEJm4q7481Iu6G4ieo=",
|
"narHash": "sha256-YuhtFJLVW3d3zr5+VoyApm6PUFoIHhOCi+VOfi2LNzA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "mobile-nixos",
|
"repo": "mobile-nixos",
|
||||||
"rev": "8c59592e8d44c1b30be3fa4e6df7938fa9672be3",
|
"rev": "0532a626e69fa9451e50297011008851527b9259",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -68,13 +69,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733861262,
|
||||||
|
"narHash": "sha256-+jjPup/ByS0LEVIrBbt7FnGugJgLeG9oc+ivFASYn2U=",
|
||||||
|
"owner": "Nixos",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "cf737e2eba82b603f54f71b10cb8fd09d22ce3f5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Nixos",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710272261,
|
"lastModified": 1734119587,
|
||||||
"narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
|
"narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2",
|
"rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -84,38 +101,56 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs-quartus": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1628148846,
|
"lastModified": 1685573264,
|
||||||
"narHash": "sha256-V8aZJBROfNDk40cvFjKUnOnL7sF+BYwCQUUpLP8y4uE=",
|
"narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9a8eb5a464f373e79d19d0ed2e53e0d31f78fe92",
|
"rev": "380be19fbd2d9079f677978361792cb25e8a3635",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-22.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"osu-nixos": {
|
"nixpkgs-xr": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695759061,
|
"lastModified": 1734226209,
|
||||||
"narHash": "sha256-s9OYi0tzWSjFUaGLnLg08tTm8OEu1uZqGTtKmIRwHic=",
|
"narHash": "sha256-6QO56uh1J853+zj7iv5RoFTQLgk6nL0BKshMfWyE7vI=",
|
||||||
"owner": "Asqiir",
|
"owner": "nix-community",
|
||||||
"repo": "osu-nixos",
|
"repo": "nixpkgs-xr",
|
||||||
"rev": "4e0096e1eee74383b9350962d8bff094648a7968",
|
"rev": "402eb3d51b418ebd128e2e579952cc0afda53cee",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Asqiir",
|
"owner": "nix-community",
|
||||||
"repo": "osu-nixos",
|
"repo": "nixpkgs-xr",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733940404,
|
||||||
|
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -123,8 +158,46 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"mobile-nixos": "mobile-nixos",
|
"mobile-nixos": "mobile-nixos",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"osu-nixos": "osu-nixos"
|
"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": 1733761991,
|
||||||
|
"narHash": "sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "0ce9d149d99bc383d1f2d85f31f6ebd146e46085",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
44
flake.nix
44
flake.nix
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
description = "System Configuration Flake";
|
description = "System Configuration Flake";
|
||||||
|
|
||||||
|
|
||||||
outputs = inputs@{
|
outputs = inputs@{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
nixpkgs-xr,
|
||||||
|
nixos-hardware,
|
||||||
|
nixpkgs-quartus,
|
||||||
home-manager,
|
home-manager,
|
||||||
osu-nixos,
|
|
||||||
...
|
...
|
||||||
} : {
|
} : {
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
./packages/default.nix
|
./packages/default.nix
|
||||||
./hosts/malachite/default.nix
|
./hosts/malachite/default.nix
|
||||||
./users/stitchynyan/default.nix
|
./users/stitchynyan/default.nix
|
||||||
|
nixpkgs-xr.nixosModules.nixpkgs-xr
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
|
@ -32,6 +33,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
nixos-hardware.nixosModules.framework-12th-gen-intel
|
||||||
|
|
||||||
./packages/default.nix
|
./packages/default.nix
|
||||||
./hosts/lappy/default.nix
|
./hosts/lappy/default.nix
|
||||||
|
@ -54,6 +56,26 @@
|
||||||
./packages/default.nix
|
./packages/default.nix
|
||||||
./hosts/gemini/default.nix
|
./hosts/gemini/default.nix
|
||||||
./users/nyadmin/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 = [
|
||||||
|
|
||||||
|
./packages/default.nix
|
||||||
|
./hosts/tanzanite/default.nix
|
||||||
|
./users/nyadmin/default.nix
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
|
@ -68,17 +90,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
mobile-nixos = {
|
|
||||||
url = "github:nixos/mobile-nixos";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
nixpkgs = {
|
|
||||||
url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
||||||
};
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
osu-nixos.url = "github:Asqiir/osu-nixos";
|
mobile-nixos = {
|
||||||
|
url = "github:nixos/mobile-nixos";
|
||||||
|
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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,26 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.appimage.binfmt = true;
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.xserver.displayManager.lightdm.enable = false;
|
services = {
|
||||||
|
fstrim.enable = true;
|
||||||
|
resolved = {
|
||||||
|
enable = true;
|
||||||
|
dnsovertls = "opportunistic";
|
||||||
|
fallbackDns = [
|
||||||
|
"2620:fe::10#dns10.quad9.net"
|
||||||
|
"2620:fe::fe:10#dns10.quad9.net"
|
||||||
|
"9.9.9.10#dns10.quad9.net"
|
||||||
|
"149.112.112.10#dns10.quad9.net"
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
xserver.displayManager.lightdm.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
# Wireguard stuff, to-do make better
|
# Wireguard stuff, to-do make better
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
|
@ -49,6 +66,30 @@ in
|
||||||
allowedUDPPorts = [ 22000 ];
|
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";
|
environment.etc.hosts.mode = "0644";
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,12 +18,6 @@
|
||||||
networking.hostName = "gemini";
|
networking.hostName = "gemini";
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings.PasswordAuthentication = false;
|
|
||||||
settings.KbdInteractiveAuthentication = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [ 22 25565 ];
|
networking.firewall.allowedTCPPorts = [ 22 25565 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||||
|
|
|
@ -12,77 +12,79 @@
|
||||||
artPkgs.enable = true;
|
artPkgs.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.nixos.tags = [ "Nya_Beginnings" ];
|
|
||||||
|
|
||||||
services.logind.powerKey = "ignore";
|
services.logind.powerKey = "ignore";
|
||||||
services.logind.powerKeyLongPress = "poweroff";
|
services.logind.powerKeyLongPress = "poweroff";
|
||||||
services.resolved = {
|
|
||||||
enable = true;
|
|
||||||
dnsovertls = "opportunistic";
|
|
||||||
fallbackDns = [
|
|
||||||
"2620:fe::10#dns10.quad9.net"
|
|
||||||
"2620:fe::fe:10#dns10.quad9.net"
|
|
||||||
"9.9.9.10#dns10.quad9.net"
|
|
||||||
"149.112.112.10#dns10.quad9.net"
|
|
||||||
];
|
|
||||||
extraConfig = ''
|
|
||||||
DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "lappy";
|
hostName = "lappy";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
};
|
};
|
||||||
time.timeZone = "America/Lost_Angeles";
|
time.timeZone = "America/Lost_Angeles";
|
||||||
|
|
||||||
boot.kernelParams = [
|
services.syncthing = {
|
||||||
#"intel_pstate=no_hwp"
|
|
||||||
"kernel.yama.ptrace_scope=0"
|
|
||||||
#"mem_sleep_default=deep"
|
|
||||||
"acpi_osi=\"!Windows 2020\""
|
|
||||||
"module_blacklist=hid_sensor_hub"
|
|
||||||
"intel_iommu=on"
|
|
||||||
"iommu=pt"
|
|
||||||
"nvme.noacpi=1"
|
|
||||||
#"i915.enable_guc=7"
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.opengl = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
user = "stitchynyan";
|
||||||
driSupport32Bit = true;
|
openDefaultPorts = true;
|
||||||
extraPackages = with pkgs; [
|
databaseDir = "/home/stitchynyan/.local/share/syncthing";
|
||||||
intel-compute-runtime
|
dataDir = "/home/stitchynyan";
|
||||||
intel-media-driver
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.extraConfig =
|
boot.kernelParams = [
|
||||||
"AllowedCPUs=8-15"
|
#"i915.enable_guc=7"
|
||||||
;
|
"intel_iommu=on"
|
||||||
|
"iommu=pt"
|
||||||
|
"kernel.yama.ptrace_scope=0"
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation = {
|
||||||
|
docker.enable = true;
|
||||||
|
libvirtd.enable = true;
|
||||||
|
waydroid.enable = true;
|
||||||
|
};
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.settings.General.Experimental = true;
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit= true;
|
||||||
|
extraPackages = lib.attrVals [
|
||||||
|
"intel-compute-runtime"
|
||||||
|
"intel-media-driver"
|
||||||
|
] pkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.extraConfig = "AllowedCPUs=8-15";
|
||||||
|
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
||||||
TLP_DEFAULT_MODE = "BAT";
|
|
||||||
TLP_PERSISTENT_DEFAULT = 1;
|
|
||||||
|
|
||||||
CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
|
|
||||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||||
|
CPU_HWP_DYN_BOOST_ON_BAT = false;
|
||||||
|
CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
|
||||||
|
|
||||||
CPU_MIN_PERF_ON_AC = 0;
|
CPU_MIN_PERF_ON_AC = 0;
|
||||||
CPU_MAX_PERF_ON_AC = 100;
|
CPU_MAX_PERF_ON_AC = 100;
|
||||||
CPU_MIN_PERF_ON_BAT = 0;
|
CPU_MIN_PERF_ON_BAT = 0;
|
||||||
CPU_MAX_PERF_ON_BAT = 50;
|
CPU_MAX_PERF_ON_BAT = 50;
|
||||||
|
|
||||||
|
INTEL_GPU_MAX_FREQ_ON_BAT = 800;
|
||||||
|
INTEL_GPU_BOOST_FREQ_ON_BAT = 1000;
|
||||||
|
|
||||||
|
NMI_WATCHDOG = false;
|
||||||
|
PCIE_ASPM_ON_AC = "default";
|
||||||
|
PCIE_ASPM_ON_BAT = "powersupersave";
|
||||||
|
PLATFORM_PROFILE_ON_BAT = "low-power";
|
||||||
|
RUNTIME_PM_ON_BAT = "auto";
|
||||||
|
WOL_DISABLE = true;
|
||||||
|
SCHED_POWERSAVE_ON_BAT = true;
|
||||||
|
|
||||||
|
USB_AUTOSUSPEND = true;
|
||||||
|
|
||||||
|
TLP_DEFAULT_MODE = "BAT";
|
||||||
|
TLP_PERSISTENT_DEFAULT = 1;
|
||||||
|
|
||||||
#Optional helps save long term battery health
|
#Optional helps save long term battery health
|
||||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||||
STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging
|
STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,16 +10,22 @@
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems = {
|
||||||
{ device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4";
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@nix-root" ];
|
options = [ "compress=zstd" "subvol=@nix-root" ];
|
||||||
};
|
};
|
||||||
|
"/home" = {
|
||||||
fileSystems."/home" =
|
device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4";
|
||||||
{ device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4";
|
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@home" ];
|
options = [ "compress=zstd" "subvol=@home" ];
|
||||||
|
};
|
||||||
|
"/nix" = {
|
||||||
|
device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "compress=zstd" "subvol=@nix-store" "noatime"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luksdev".device = "/dev/disk/by-uuid/100a5596-671b-48ba-a1d1-0723559baf87";
|
boot.initrd.luks.devices."luksdev".device = "/dev/disk/by-uuid/100a5596-671b-48ba-a1d1-0723559baf87";
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, nixpkgs-xr, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
passthrough = pkgs.writeShellScript "pasthrough.sh" ''
|
passthrough = pkgs.writeShellApplication {
|
||||||
|
name = "passthrough.sh";
|
||||||
|
runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs;
|
||||||
|
text = ''
|
||||||
GUEST_NAME="$1"
|
GUEST_NAME="$1"
|
||||||
HOOK_NAME="$2"
|
HOOK_NAME="$2"
|
||||||
STATE_NAME="$3"
|
STATE_NAME="$3"
|
||||||
|
|
||||||
set -e
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# For the windows 10 VM
|
# For the windows 10 VM
|
||||||
|
@ -15,51 +17,71 @@ let
|
||||||
if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then
|
if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then
|
||||||
|
|
||||||
# Remove Hyprland
|
# Remove Hyprland
|
||||||
${pkgs.busybox}/bin/pkill Hyprland
|
#pkill Hyprland
|
||||||
|
|
||||||
# Unbind VTconsoles
|
# Unbind VTconsoles
|
||||||
${pkgs.busybox}/bin/echo 0 > /sys/class/vtconsole/vtcon0/bind
|
echo 0 > /sys/class/vtconsole/vtcon0/bind
|
||||||
${pkgs.busybox}/bin/echo 0 > /sys/class/vtconsole/vtcon1/bind
|
echo 0 > /sys/class/vtconsole/vtcon1/bind
|
||||||
|
|
||||||
# Unbind EFI-Framebuffer
|
# Unbind EFI-Framebuffer
|
||||||
${pkgs.busybox}/bin/echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
|
#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
|
# Unbind the GPU from display driver
|
||||||
${pkgs.libvirt}/bin/virsh nodedev-detach pci_0000_01_00_0
|
virsh nodedev-detach pci_0000_03_00_0
|
||||||
${pkgs.libvirt}/bin/virsh nodedev-detach pci_0000_01_00_1
|
virsh nodedev-detach pci_0000_03_00_1
|
||||||
|
virsh nodedev-detach pci_0000_03_00_2
|
||||||
|
|
||||||
|
# Unload Modules
|
||||||
|
modprobe -r amdgpu
|
||||||
|
|
||||||
|
# We love race conditions
|
||||||
|
sleep 2
|
||||||
|
|
||||||
# Load VFIO Kernel Module
|
# Load VFIO Kernel Module
|
||||||
${pkgs.busybox}/bin/modprobe vfio_pci
|
modprobe vfio vfio_pci vfio_iommu_type1
|
||||||
|
|
||||||
|
# Performance Governer
|
||||||
|
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > "$file"; done
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then
|
elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then
|
||||||
|
|
||||||
# Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours)
|
modprobe -r vfio_iommu_type1 vfio_pci vfio
|
||||||
${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_0
|
|
||||||
${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_1
|
|
||||||
|
|
||||||
${pkgs.busybox}/bin/modprobe -r vfio-pci
|
# Re-Bind GPU to Host
|
||||||
|
virsh nodedev-reattach pci_0000_03_00_0
|
||||||
#bind efi
|
virsh nodedev-reattach pci_0000_03_00_1
|
||||||
${pkgs.busybox}/bin/echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
|
virsh nodedev-reattach pci_0000_03_00_2
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Rebind VT consoles
|
# Rebind VT consoles
|
||||||
${pkgs.busybox}/bin/echo 1 > /sys/class/vtconsole/vtcon0/bind
|
echo 1 > /sys/class/vtconsole/vtcon0/bind
|
||||||
${pkgs.busybox}/bin/echo 1 > /sys/class/vtconsole/vtcon1/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
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
|
@ -67,18 +89,34 @@ in {
|
||||||
../default.nix
|
../default.nix
|
||||||
];
|
];
|
||||||
virtualisation.libvirtd.hooks.qemu = {
|
virtualisation.libvirtd.hooks.qemu = {
|
||||||
passthrough = "${passthrough}";
|
passthrough = "${passthrough}/bin/passthrough.sh";
|
||||||
};
|
};
|
||||||
|
|
||||||
stitchyconf = {
|
stitchyconf = {
|
||||||
artPkgs.enable = true;
|
artPkgs.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
onBoot = "ignore";
|
||||||
|
};
|
||||||
hardware = {
|
hardware = {
|
||||||
|
opentabletdriver.enable = true;
|
||||||
steam-hardware.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";
|
networking.hostName = "malachite";
|
||||||
|
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" "vfio-pci" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = lib.attrVals [ "rtl8812au" ] config.boot.kernelPackages;
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"loglevel=3"
|
"loglevel=3"
|
||||||
|
@ -20,22 +20,22 @@
|
||||||
"/" =
|
"/" =
|
||||||
{ device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13";
|
{ device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=nix" ];
|
options = [ "subvol=nix" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
"/home" = {
|
"/home" = {
|
||||||
device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13";
|
device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=homes/stitchymain" ];
|
options = [ "subvol=homes/stitchymain" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
"/nix/store" = {
|
"/nix/store" = {
|
||||||
device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13";
|
device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=store" ];
|
options = [ "subvol=store" "noatime" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
"/persist" = {
|
"/persist" = {
|
||||||
device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13";
|
device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@persist" ];
|
options = [ "subvol=@persist" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/CB12-5062";
|
device = "/dev/disk/by-uuid/CB12-5062";
|
||||||
|
@ -44,27 +44,27 @@
|
||||||
"/home/stitchynyan/Music" = {
|
"/home/stitchynyan/Music" = {
|
||||||
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=music/stitchtunes" "x-systemd.automount" ];
|
options = [ "subvol=music/stitchtunes" "compress=zstd" "x-systemd.automount" ];
|
||||||
};
|
};
|
||||||
"/home/stitchynyan/Pictures" = {
|
"/home/stitchynyan/Pictures" = {
|
||||||
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=pictures/stitchpics" "x-systemd.automount" ];
|
options = [ "subvol=pictures/stitchpics" "compress=zstd" "x-systemd.automount" ];
|
||||||
};
|
};
|
||||||
"/home/stitchynyan/Programs/Steam" = {
|
"/home/stitchynyan/Programs/Steam" = {
|
||||||
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=games/stitchgames" "x-systemd.automount" ];
|
options = [ "subvol=games/stitchgames" "compress=zstd" "x-systemd.automount" ];
|
||||||
};
|
};
|
||||||
"/home/stitchynyan/Videos" = {
|
"/home/stitchynyan/Videos" = {
|
||||||
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=videos/stitchshows" "x-systemd.automount" ];
|
options = [ "subvol=videos/stitchshows" "compress=zstd" "x-systemd.automount" ];
|
||||||
};
|
};
|
||||||
"/home/stitchynyan/VirtualMachines" = {
|
"/home/stitchynyan/VirtualMachines" = {
|
||||||
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=virtualmachines/stitchvms" "x-systemd.automount" ];
|
options = [ "subvol=virtualmachines/stitchvms" "compress=zstd" "x-systemd.automount" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -76,23 +76,21 @@
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
services.xserver.displayManager.lightdm.enable = false;
|
services.xserver.displayManager.lightdm.enable = false;
|
||||||
services.monado = {
|
services.monado = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultRuntime = true;
|
defaultRuntime = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
systemd.user.services.monado.environment = {
|
||||||
opengl = {
|
STEAMVR_LH_ENABLE = "1";
|
||||||
enable = true;
|
XRT_COMPOSITOR_COMPUTE = "1";
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
};
|
||||||
nvidia = {
|
|
||||||
modesetting.enable = true;
|
hardware = {
|
||||||
powerManagement.enable = true;
|
graphics = {
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
157
hosts/tanzanite/default.nix
Normal file
157
hosts/tanzanite/default.nix
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
{ 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;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"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";
|
||||||
|
}
|
|
@ -15,31 +15,40 @@ let
|
||||||
"megapixels"
|
"megapixels"
|
||||||
] pkgs;
|
] pkgs;
|
||||||
pcPkgs = lib.attrVals [
|
pcPkgs = lib.attrVals [
|
||||||
#osu-lazer
|
|
||||||
"dracula-theme"
|
|
||||||
"wl-clipboard"
|
|
||||||
"brightnessctl"
|
"brightnessctl"
|
||||||
"powertop"
|
"clipman"
|
||||||
"easyeffects"
|
|
||||||
"mutt-wizard"
|
|
||||||
"gamescope"
|
|
||||||
"cyrus-sasl-xoauth2"
|
"cyrus-sasl-xoauth2"
|
||||||
|
"dracula-theme"
|
||||||
|
"easyeffects"
|
||||||
|
"gamescope"
|
||||||
"libnotify"
|
"libnotify"
|
||||||
"networkmanager-openvpn"
|
"mutt-wizard"
|
||||||
|
"powertop"
|
||||||
|
"wl-clipboard"
|
||||||
# temporary home manager things
|
# temporary home manager things
|
||||||
"inotify-tools"
|
|
||||||
"eww"
|
"eww"
|
||||||
"jq"
|
|
||||||
"texliveFull"
|
|
||||||
"pandoc"
|
|
||||||
"img2pdf"
|
|
||||||
"socat"
|
|
||||||
"libimobiledevice"
|
|
||||||
"ifuse"
|
"ifuse"
|
||||||
] pkgs ++ [ inputs.osu-nixos pkgs.wineWowPackages.stableFull ];
|
"img2pdf"
|
||||||
|
"inotify-tools"
|
||||||
|
"jq"
|
||||||
|
"libimobiledevice"
|
||||||
|
"socat"
|
||||||
|
"typst"
|
||||||
|
] pkgs ++ [ pkgs.wineWowPackages.stableFull ];
|
||||||
serverPkgs = lib.attrVals [
|
serverPkgs = lib.attrVals [
|
||||||
#"package"
|
#"package"
|
||||||
] pkgs;
|
] pkgs;
|
||||||
|
|
||||||
|
spaceman-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
name = "spaceman-nvim";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "FireIsGood";
|
||||||
|
repo = "spaceman.nvim";
|
||||||
|
rev = "7910d202073bcc5f567481426f771b3737451dd9";
|
||||||
|
hash = "sha256-VvKce2uiFzv0TjoJfEX461p9tY9aE237Xr1q/Lw3Utw=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -55,22 +64,41 @@ in
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages = (lib.attrVals [
|
environment.systemPackages = (lib.attrVals [
|
||||||
|
"black"
|
||||||
"btop"
|
"btop"
|
||||||
|
"clang-tools"
|
||||||
"eza"
|
"eza"
|
||||||
"fd"
|
"fd"
|
||||||
|
"fzf"
|
||||||
"git"
|
"git"
|
||||||
"glib"
|
"glib"
|
||||||
|
"glsl_analyzer"
|
||||||
"gnumake"
|
"gnumake"
|
||||||
"gnupg"
|
"gnupg"
|
||||||
"pinentry"
|
"hugo"
|
||||||
|
"lazygit"
|
||||||
|
"mypy"
|
||||||
"neofetch"
|
"neofetch"
|
||||||
|
"nixd"
|
||||||
|
"p7zip"
|
||||||
|
"pinentry"
|
||||||
|
"ripgrep"
|
||||||
|
"rust-analyzer"
|
||||||
|
"rustfmt"
|
||||||
|
"rustup"
|
||||||
|
"tinymist"
|
||||||
|
"unzip"
|
||||||
|
"vhdl-ls"
|
||||||
|
"vtsls"
|
||||||
"wget"
|
"wget"
|
||||||
|
"zip"
|
||||||
"zoxide"
|
"zoxide"
|
||||||
] pkgs)
|
] pkgs)
|
||||||
++ (lib.optionals config.stitchyconf.artPkgs.enable artPkgs)
|
++ (lib.optionals config.stitchyconf.artPkgs.enable artPkgs)
|
||||||
++ (lib.optionals (config.stitchyconf.form == "pc") pcPkgs)
|
++ (lib.optionals (config.stitchyconf.form == "pc") pcPkgs)
|
||||||
++ (lib.optionals (config.stitchyconf.form == "handheld") handheldPkgs)
|
++ (lib.optionals (config.stitchyconf.form == "handheld") handheldPkgs)
|
||||||
++ (lib.optionals (config.stitchyconf.form == "server") serverPkgs);
|
++ (lib.optionals (config.stitchyconf.form == "server") serverPkgs)
|
||||||
|
++ [ pkgs.nodePackages.prettier ];
|
||||||
|
|
||||||
# To-do figure out how to section these off
|
# To-do figure out how to section these off
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -83,14 +111,35 @@ in
|
||||||
customRC = builtins.readFile ../config/nvim/init.vim;
|
customRC = builtins.readFile ../config/nvim/init.vim;
|
||||||
packages.myVimPackage = with pkgs.vimPlugins; {
|
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
start = [
|
start = [
|
||||||
nvim-lspconfig
|
conform-nvim
|
||||||
nvim-cmp
|
bufferline-nvim
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
luasnip
|
|
||||||
cmp_luasnip
|
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
|
||||||
tokyonight-nvim
|
tokyonight-nvim
|
||||||
vim-lsp-cxx-highlight
|
|
||||||
typst-vim
|
typst-vim
|
||||||
|
vim-lsp-cxx-highlight
|
||||||
|
which-key-nvim
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -118,8 +167,22 @@ in
|
||||||
"noto-fonts"
|
"noto-fonts"
|
||||||
"noto-fonts-emoji"
|
"noto-fonts-emoji"
|
||||||
"liberation_ttf"
|
"liberation_ttf"
|
||||||
"nerdfonts"
|
|
||||||
"ipafont"
|
"ipafont"
|
||||||
] pkgs;
|
] 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"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
34
users/cirno/default.nix
Normal file
34
users/cirno/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
15
users/cirno/home.nix
Normal file
15
users/cirno/home.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config,
|
||||||
|
nixosConfig,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
home-manager,
|
||||||
|
... }:
|
||||||
|
let
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
home.homeDirectory = "/home/cirno";
|
||||||
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
home = "/home/nyadmin";
|
home = "/home/nyadmin";
|
||||||
description = "Administrator~";
|
description = "nyadministrator~";
|
||||||
extraGroups = [ "wheel" "kvm" "libvirt" "docker" ];
|
extraGroups = [ "wheel" "kvm" "libvirt" "docker" ];
|
||||||
initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30";
|
initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
|
|
|
@ -4,51 +4,74 @@
|
||||||
imports = [ ../default.nix ];
|
imports = [ ../default.nix ];
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||||
builtins.elem ( lib.getName pkg) [
|
builtins.elem ( lib.getName pkg) [
|
||||||
|
"cudatoolkit"
|
||||||
|
"nvidia-settings"
|
||||||
|
"nvidia-x11"
|
||||||
"osu-lazer"
|
"osu-lazer"
|
||||||
|
"quartus-prime-lite"
|
||||||
|
"quartus-prime-lite-unwrapped"
|
||||||
"steam"
|
"steam"
|
||||||
"steam-original"
|
"steam-original"
|
||||||
"steam-run"
|
"steam-run"
|
||||||
"nvidia-x11"
|
"steam-unwrapped"
|
||||||
"nvidia-settings"
|
|
||||||
"cudatoolkit"
|
|
||||||
];
|
];
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
"olm-3.2.16"
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
opentabletdriver.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
openvpn3.enable = true;
|
kdeconnect.enable = true;
|
||||||
steam = {
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
};
|
};
|
||||||
|
wireshark.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
avahi = {
|
avahi = {
|
||||||
enable = true;
|
enable = config.stitchyconf.form == "pc";
|
||||||
nssmdns4 = true;
|
nssmdns4 = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
gnome.gnome-keyring.enable = true;
|
gnome.gnome-keyring.enable = true;
|
||||||
pipewire = {
|
pipewire = {
|
||||||
|
alsa.enable = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
alsa.enable = true;
|
|
||||||
};
|
};
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
usbmuxd.enable = true;
|
usbmuxd.enable = true;
|
||||||
xserver.enable = true;
|
xserver.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
security.pam.services.swaylock = {};
|
|
||||||
|
|
||||||
users.users.stitchynyan = {
|
users.users.stitchynyan = {
|
||||||
|
description = "Personal user";
|
||||||
|
extraGroups = [ "audio" "dialout" "docker" "kvm" "libvirtd" "networkmanager" "wireshark" "wheel" ];
|
||||||
|
home = "/home/stitchynyan";
|
||||||
|
initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
home = "/home/stitchynyan";
|
};
|
||||||
description = "Personal user";
|
|
||||||
extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" ];
|
i18n = {
|
||||||
initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3";
|
defaultLocale = "ja_JP.UTF-8";
|
||||||
|
inputMethod = {
|
||||||
|
enable = true;
|
||||||
|
type = "fcitx5";
|
||||||
|
fcitx5.addons = with pkgs; [
|
||||||
|
fcitx5-mozc
|
||||||
|
fcitx5-nord
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,34 +11,40 @@ let
|
||||||
] pkgs;
|
] pkgs;
|
||||||
pcPkgs = lib.attrVals [
|
pcPkgs = lib.attrVals [
|
||||||
"activitywatch"
|
"activitywatch"
|
||||||
|
"anki"
|
||||||
|
"awatcher"
|
||||||
"dunst"
|
"dunst"
|
||||||
|
"foliate"
|
||||||
"foot"
|
"foot"
|
||||||
"grim"
|
"grim"
|
||||||
|
"hunspell"
|
||||||
|
"hyprpaper"
|
||||||
"imv"
|
"imv"
|
||||||
"isync"
|
"isync"
|
||||||
"kitty"
|
"kitty"
|
||||||
"hunspell"
|
|
||||||
"hyprpaper"
|
|
||||||
"libreoffice"
|
"libreoffice"
|
||||||
"librewolf"
|
"librewolf"
|
||||||
"lynx"
|
"lynx"
|
||||||
"mpv"
|
"mpv"
|
||||||
"msmtp"
|
"msmtp"
|
||||||
"mupdf"
|
|
||||||
"neomutt"
|
"neomutt"
|
||||||
"networkmanagerapplet"
|
"networkmanagerapplet"
|
||||||
"nheko"
|
"nheko"
|
||||||
"notmuch"
|
"notmuch"
|
||||||
"okular"
|
"okular"
|
||||||
"pavucontrol"
|
"osu-lazer"
|
||||||
"pass"
|
"pass"
|
||||||
|
"pavucontrol"
|
||||||
"playerctl"
|
"playerctl"
|
||||||
"prismlauncher"
|
"prismlauncher"
|
||||||
"qt5ct"
|
"pstree"
|
||||||
|
"qbittorrent"
|
||||||
"qt6ct"
|
"qt6ct"
|
||||||
"slurp"
|
"slurp"
|
||||||
"swaylock-effects"
|
"swaylock-effects"
|
||||||
|
"tofi"
|
||||||
"wofi"
|
"wofi"
|
||||||
|
"zathura"
|
||||||
] pkgs ++ [ pkgs.hunspellDicts.en_US ];
|
] pkgs ++ [ pkgs.hunspellDicts.en_US ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -49,13 +55,12 @@ in
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
cider
|
cider
|
||||||
ngspice
|
ngspice
|
||||||
hugo
|
|
||||||
kicad
|
kicad
|
||||||
#steamvr?
|
#steamvr?
|
||||||
procps
|
procps
|
||||||
usbutils
|
usbutils
|
||||||
(python311.withPackages (lib.attrVals ["sympy" "matplotlib"]))
|
yt-dlp
|
||||||
(octaveFull.withPackages (lib.attrVals ["symbolic"]))
|
(python3.withPackages (lib.attrVals [ "matplotlib" "pyflakes" "python-lsp-server" "sympy"]))
|
||||||
]
|
]
|
||||||
++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs)
|
++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs)
|
||||||
++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs);
|
++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs);
|
||||||
|
@ -86,6 +91,10 @@ in
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/eww";
|
source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/eww";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
|
"foot" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/foot";
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
"hypr" = {
|
"hypr" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/hypr";
|
source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/hypr";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
@ -118,6 +127,24 @@ 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 = {
|
systemd.user.timers = {
|
||||||
mailsync = {
|
mailsync = {
|
||||||
Unit.Description = "Syncs email";
|
Unit.Description = "Syncs email";
|
||||||
|
@ -130,10 +157,10 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = "phinger-cursors";
|
name = "phinger-cursors-dark";
|
||||||
package = pkgs.phinger-cursors;
|
package = pkgs.phinger-cursors;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
size = 64;
|
size = 24;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Read the Docs before change
|
# Read the Docs before change
|
||||||
|
|
Loading…
Reference in a new issue