gitea repo
This commit is contained in:
commit
f610209aff
66 changed files with 2439 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/dotfiles/ssh/
|
||||||
|
/dotfiles/i3blocks/config
|
||||||
|
.sops.yaml
|
23
dotfiles/bash_files/all_hosts/bashrc
Normal file
23
dotfiles/bash_files/all_hosts/bashrc
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
#dont put duplicate lines or lines starting with space in the history
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
HISTFILESIZE=-1
|
||||||
|
HISTSIZE=-1
|
||||||
|
export PROMPT_COMMAND='history -a'
|
||||||
|
|
||||||
|
if [ -f ~/.bash_local ]; then
|
||||||
|
. ~/.bash_local
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
PS1="\[\e[32m\][\[\e[m\]\[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]\[\e[32m\]]\[\e[m\]\[\e[34m\]\W\[\e[m\]\[\e[36m\]\\$\[\e[m\] "
|
||||||
|
if [ ! -z "$SSH_CLIENT" ]
|
||||||
|
then
|
||||||
|
PS1="\[\e[32m\][\[\e[m\]\[\e[31m\]\u\[\e[m\]\[\e[31m\]@\[\e[m\]\[\e[31m\]\h\[\e[m\]\[\e[32m\]]\[\e[m\]\[\e[34m\]\W\[\e[m\]\[\e[36m\]\\$\[\e[m\] "
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PATH=$PATH:$HOME/bin
|
||||||
|
|
19
dotfiles/bash_files/all_hosts/config
Normal file
19
dotfiles/bash_files/all_hosts/config
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
alias cp="cp -i" # confirm before overwriting something
|
||||||
|
alias df='df -h' # human-readable sizes
|
||||||
|
alias free='free -m' # show sizes in MB
|
||||||
|
alias du='du -h'
|
||||||
|
alias diff='diff --color=auto'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias ip='ip -color=auto'
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias vm='mv'
|
||||||
|
alias cat='bat -pp'
|
||||||
|
alias ll="ls -lhA"
|
||||||
|
|
||||||
|
rnd() {
|
||||||
|
echo $((RANDOM%10000+1000))
|
||||||
|
}
|
||||||
|
|
||||||
|
### NIX ###
|
||||||
|
alias rebuild="sudo nixos-rebuild switch --flake ~/nixos#$NIXHOST"
|
||||||
|
alias search="nix search nixpkgs"
|
38
dotfiles/bash_files/desk/docker
Normal file
38
dotfiles/bash_files/desk/docker
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
### Docker ###
|
||||||
|
alias dps="docker ps --format '{{.Names}}'"
|
||||||
|
|
||||||
|
d_term(){
|
||||||
|
docker exec -it $1 /bin/bash
|
||||||
|
}
|
||||||
|
|
||||||
|
d_up(){
|
||||||
|
path=~/docker
|
||||||
|
if [[ -z "$1" && $(pwd) == "$path/"* ]]; then
|
||||||
|
docker compose up -d
|
||||||
|
elif [[ -z "$1" && $(pwd) != "$path/"* ]]; then
|
||||||
|
echo "not in compose folder"
|
||||||
|
elif [[ -n "$1" ]]; then
|
||||||
|
if ls "$path" | grep -q "$1"; then
|
||||||
|
(cd "$path/$1" && docker compose up -d)
|
||||||
|
else
|
||||||
|
echo "container $1 not found"
|
||||||
|
ls "$path"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
d_down(){
|
||||||
|
path=~/docker
|
||||||
|
if [[ -z "$1" && $(pwd) == "$path/"* ]]; then
|
||||||
|
docker compose down
|
||||||
|
elif [[ -z "$1" && $(pwd) != "$path/"* ]]; then
|
||||||
|
echo "not in compose folder"
|
||||||
|
elif [[ -n "$1" ]]; then
|
||||||
|
if ls "$path" | grep -q "$1"; then
|
||||||
|
(cd "$path/$1" && docker compose down)
|
||||||
|
else
|
||||||
|
echo "container $1 not found"
|
||||||
|
ls "$path"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
23
dotfiles/bash_files/desk/methods
Normal file
23
dotfiles/bash_files/desk/methods
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
mp(){
|
||||||
|
nohup mousepad $1 </dev/null >/dev/null 2>&1 &
|
||||||
|
disown
|
||||||
|
}
|
||||||
|
|
||||||
|
cs(){
|
||||||
|
# cp -l fullpath fullpath/Documents/cheatsheet
|
||||||
|
# path=~/Documents/cheatsheet
|
||||||
|
path=/solid/dir/reference/cheatsheet/
|
||||||
|
if [[ -z "$1" ]]; then
|
||||||
|
ls $path
|
||||||
|
else
|
||||||
|
if [[ $2 = "-e" ]]; then
|
||||||
|
vim $path/$1
|
||||||
|
else
|
||||||
|
bat -pp $path/$1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
timer(){
|
||||||
|
while true; do printf '%s\r' "$(date)"; done
|
||||||
|
}
|
7
dotfiles/bash_files/desk/shortcuts
Normal file
7
dotfiles/bash_files/desk/shortcuts
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
alias ctllist="systemctl --type=service"
|
||||||
|
alias esc='setxkbmap -option "caps:swapescape"'
|
||||||
|
alias checkip="curl ipinfo.io"
|
||||||
|
alias hold='hold=$(pwd)'
|
||||||
|
|
||||||
|
alias ollama_up="./scripts/VM/VMmanager.sh macvtap; sudo virsh start ollama_vm"
|
||||||
|
|
10
dotfiles/gtk-3.0/bookmarks
Normal file
10
dotfiles/gtk-3.0/bookmarks
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
file:///home/fred/Downloads
|
||||||
|
file:///home/fred/Documents
|
||||||
|
file:///home/fred/scripts
|
||||||
|
file:///nfs
|
||||||
|
file:///solid/dir/reference/cheatsheet
|
||||||
|
file:///solid
|
||||||
|
file:///solid/dir/reference/scratch
|
||||||
|
file:///docker/compose docker
|
||||||
|
file:///solid/job
|
||||||
|
file:///home/fred/nixos
|
217
dotfiles/i3/config
Normal file
217
dotfiles/i3/config
Normal file
|
@ -0,0 +1,217 @@
|
||||||
|
font pango:monospace 8
|
||||||
|
exec --no-startup-id dex --autostart --environment i3
|
||||||
|
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
||||||
|
|
||||||
|
# applets
|
||||||
|
exec --no-startup-id nm-applet
|
||||||
|
exec volumeicon
|
||||||
|
# Use pactl to adjust volume in PulseAudio.
|
||||||
|
set $refresh_i3status killall -SIGUSR1 i3status
|
||||||
|
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
|
||||||
|
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
|
||||||
|
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||||
|
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||||
|
|
||||||
|
# use these keys for focus, movement, and resize directions when reaching for
|
||||||
|
# the arrows is not convenient
|
||||||
|
set $up k
|
||||||
|
set $down j
|
||||||
|
set $left h
|
||||||
|
set $right l
|
||||||
|
|
||||||
|
# use Mouse+Mod1 to drag floating windows to their wanted position
|
||||||
|
floating_modifier Mod1
|
||||||
|
#floating_modifier Mod4
|
||||||
|
# change focus
|
||||||
|
bindsym Mod4+$left focus left
|
||||||
|
bindsym Mod4+$down focus down
|
||||||
|
bindsym Mod4+$up focus up
|
||||||
|
bindsym Mod4+$right focus right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym Mod4+Left focus left
|
||||||
|
bindsym Mod4+Down focus down
|
||||||
|
bindsym Mod4+Up focus up
|
||||||
|
bindsym Mod4+Right focus right
|
||||||
|
|
||||||
|
# move focused window
|
||||||
|
bindsym Control+Shift+$left move left
|
||||||
|
bindsym Control+Shift+$down move down
|
||||||
|
bindsym Control+Shift+$up move up
|
||||||
|
bindsym Control+Shift+$right move right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym Mod4+Shift+Left move left
|
||||||
|
bindsym Mod4+Shift+Down move down
|
||||||
|
bindsym Mod4+Shift+Up move up
|
||||||
|
bindsym Mod4+Shift+Right move right
|
||||||
|
|
||||||
|
# split in horizontal orientation
|
||||||
|
bindsym Mod4+period split h
|
||||||
|
bindsym Mod4+c split h
|
||||||
|
|
||||||
|
# split in vertical orientation
|
||||||
|
bindsym Mod4+comma split v
|
||||||
|
bindsym Mod4+x split v
|
||||||
|
|
||||||
|
# enter fullscreen mode for the focused container
|
||||||
|
bindsym Mod4+g fullscreen toggle
|
||||||
|
|
||||||
|
# toggle tiling / floating
|
||||||
|
bindsym Control+Shift+space floating toggle
|
||||||
|
|
||||||
|
# change focus between tiling / floating windows
|
||||||
|
bindsym Control+space focus mode_toggle
|
||||||
|
|
||||||
|
# move the currently focused window to the scratchpad
|
||||||
|
bindsym Control+Shift+0 move scratchpad
|
||||||
|
|
||||||
|
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||||
|
# If there are multiple scratchpad windows, this command cycles through them.
|
||||||
|
bindsym Control+0 scratchpad show
|
||||||
|
|
||||||
|
# Define scripts folder
|
||||||
|
set $scripts "/home/fred/scripts"
|
||||||
|
|
||||||
|
# Define names for default workspaces for which we configure key bindings later on.
|
||||||
|
# We use variables to avoid repeating the names in multiple places.
|
||||||
|
set $ws1 "1"
|
||||||
|
set $ws2 "2"
|
||||||
|
set $ws3 "3"
|
||||||
|
set $ws4 "4"
|
||||||
|
set $ws5 "5"
|
||||||
|
set $ws6 "6"
|
||||||
|
set $ws7 "7"
|
||||||
|
set $ws8 "8"
|
||||||
|
set $ws9 "9"
|
||||||
|
#set $ws10 "10"
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
bindsym Control+1 workspace number $ws1
|
||||||
|
bindsym Control+2 workspace number $ws2
|
||||||
|
bindsym Control+3 workspace number $ws3
|
||||||
|
bindsym Control+4 workspace number $ws4
|
||||||
|
bindsym Control+5 workspace number $ws5
|
||||||
|
bindsym Control+6 workspace number $ws6
|
||||||
|
bindsym Control+7 workspace number $ws7
|
||||||
|
bindsym Control+8 workspace number $ws8
|
||||||
|
bindsym Control+9 workspace number $ws9
|
||||||
|
#bindsym Control+0 workspace number $ws10
|
||||||
|
|
||||||
|
# move focused container to workspace
|
||||||
|
bindsym Control+Shift+1 move container to workspace number $ws1
|
||||||
|
bindsym Control+Shift+2 move container to workspace number $ws2
|
||||||
|
bindsym Control+Shift+3 move container to workspace number $ws3
|
||||||
|
bindsym Control+Shift+4 move container to workspace number $ws4
|
||||||
|
bindsym Control+Shift+5 move container to workspace number $ws5
|
||||||
|
bindsym Control+Shift+6 move container to workspace number $ws6
|
||||||
|
bindsym Control+Shift+7 move container to workspace number $ws7
|
||||||
|
bindsym Control+Shift+8 move container to workspace number $ws8
|
||||||
|
bindsym Control+Shift+9 move container to workspace number $ws9
|
||||||
|
#bindsym Control+Shift+0 move container to workspace number $ws10
|
||||||
|
|
||||||
|
|
||||||
|
# resize window (you can also use the mouse for that)
|
||||||
|
bindsym Control+Mod4+h resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym Control+Mod4+j resize grow height 10 px or 10 ppt
|
||||||
|
bindsym Control+Mod4+k resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym Control+Mod4+l resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
bindsym Mod4+Button4 resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym Mod4+Button5 resize grow height 10 px or 10 ppt
|
||||||
|
bindsym Mod4+Button6 resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym Mod4+Button7 resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||||
|
# finds out, if available)
|
||||||
|
bar {
|
||||||
|
status_command i3blocks
|
||||||
|
tray_output HDMI-A-0
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
####session management
|
||||||
|
bindsym Mod4+grave exec screens 4
|
||||||
|
bindsym Control+Shift+q kill
|
||||||
|
#bindsym Control+Shift+c reload
|
||||||
|
bindsym Control+Shift+r restart
|
||||||
|
#bindsym Control+Mod1+p exec i3-msg exit
|
||||||
|
bindsym Control+Mod1+p exec xfce4-session-logout --logout
|
||||||
|
bindsym Control+Mod1+bracketright exec i3lock -c 000000
|
||||||
|
bindsym Control+Mod1+Delete exec i3-sensible-terminal -e 'sh $scripts/setup.sh off'
|
||||||
|
bindsym Control+Shift+Delete exec i3-sensible-terminal -e 'sh $scripts/setup.sh reboot'
|
||||||
|
bindsym Control+Mod4+F12 exec i3-sensible-terminal -e 'sh $scripts/VM/VMmanager.sh toggle'
|
||||||
|
bindsym Control+Shift+F12 exec i3-sensible-terminal -e 'sh $scripts/VM/VMmanager.sh reboot'
|
||||||
|
bindsym --release Control+Mod4+v exec "xdotool keyup Control keyup Super click 2"
|
||||||
|
bindsym --release Control+Mod4+d exec "xdotool keyup Control keyup Super type $(date +%y.%m.%d.)"
|
||||||
|
|
||||||
|
####Screenshots
|
||||||
|
bindsym Control+Shift+Print exec xfce4-screenshooter -r
|
||||||
|
bindsym Control+Mod1+Print exec xfce4-screenshooter -w
|
||||||
|
bindsym Print exec xfce4-screenshooter
|
||||||
|
|
||||||
|
####program shortcuts
|
||||||
|
bindsym Mod4+r exec "rofi -modi drun,run -show drun"
|
||||||
|
bindsym Mod1+c exec --no-startup-id rofi -show calc -modi calc -no-show-match -no-sort
|
||||||
|
bindsym Mod4+f exec firefox
|
||||||
|
bindsym Mod4+v exec thunar
|
||||||
|
bindsym Mod4+t exec i3-sensible-terminal
|
||||||
|
bindsym Mod4+a exec xterm -e "ssh -t mf"
|
||||||
|
bindsym Mod4+d workspace number $ws2; exec discord
|
||||||
|
bindsym Mod4+w exec deluge
|
||||||
|
bindsym Mod4+b exec mousepad
|
||||||
|
|
||||||
|
bindsym --release Mod4+u exec sh $scripts/shortcuts.sh searchbar
|
||||||
|
|
||||||
|
####Function keys
|
||||||
|
#bindsym F1 exec playerctl play-pause
|
||||||
|
#bindsym F2 exec playerctl stop
|
||||||
|
#bindsym F3 exec playerctl previous
|
||||||
|
#bindsym F4 exec playerctl next
|
||||||
|
#bindsym F5 exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||||
|
#bindsym F6 exec --no-startup-id pactl set-sink-volume 0 -5%
|
||||||
|
#bindsym F7 exec --no-startup-id pactl set-sink-volume 0 +5%
|
||||||
|
#bindsym --release F8 exec xdotool key Shift+Alt+b
|
||||||
|
#bindsym --release F8 exec xdotool key s
|
||||||
|
#bindsym --release F3 exec xdotool key p
|
||||||
|
#bindsym --release F4 exec xdotool key n
|
||||||
|
#bindsym --release F1 exec xdotool key space
|
||||||
|
|
||||||
|
#########XP-pen
|
||||||
|
#bindsym Mod1+Up exec sh $scripts/remote/xp.sh q_up
|
||||||
|
#bindsym Mod1+Down exec sh $scripts/remote/xp.sh q_down
|
||||||
|
bindsym --release Mod1+1 exec sh $scripts/remote/xp.sh k1
|
||||||
|
bindsym --release Mod1+2 exec sh $scripts/remote/xp.sh k2
|
||||||
|
bindsym --release Mod1+3 exec sh $scripts/remote/xp.sh k3
|
||||||
|
bindsym --release Mod1+4 exec sh $scripts/remote/xp.sh k4
|
||||||
|
bindsym --release Mod1+5 exec sh $scripts/remote/xp.sh k5
|
||||||
|
bindsym --release Mod1+6 exec sh $scripts/remote/xp.sh k6
|
||||||
|
bindsym --release Mod1+7 exec sh $scripts/remote/xp.sh k7
|
||||||
|
bindsym --release Mod1+8 exec sh $scripts/remote/xp.sh k8
|
||||||
|
bindsym --release Mod1+9 exec sh $scripts/remote/xp.sh k9
|
||||||
|
bindsym --release Mod1+0 exec sh $scripts/remote/xp.sh k10
|
||||||
|
|
||||||
|
|
||||||
|
####startup
|
||||||
|
exec --no-startup-id sh $scripts/init.sh
|
||||||
|
#workspace 1 output HDMI-2
|
||||||
|
#workspace 2 output DP-5
|
||||||
|
#workspace 3 output DP-6
|
||||||
|
|
||||||
|
workspace 1 output HDMI-A-0
|
||||||
|
workspace 2 output DisplayPort-1
|
||||||
|
workspace 3 output DisplayPort-2
|
||||||
|
|
||||||
|
exec_always --no-startup-id feh --bg-scale /home/fred/Pictures/wallpaper/800252.png
|
||||||
|
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||||
|
|
||||||
|
exec --no-startup-id xset dpms 0 0 600 &
|
||||||
|
exec --no-startup-id xss-lock -- i3lock -c 000000 &
|
||||||
|
#exec --no-startup-id numlockx o
|
||||||
|
exec_always --no-startup-id exec sh $scripts/setup.sh sync
|
||||||
|
exec --no-startup-id xbindkeys
|
||||||
|
exec --no-startup-id i3-msg 'workspace 3; exec firefox'
|
||||||
|
exec --no-startup-id solaar --window=hide
|
||||||
|
exec --no-startup-id input-remapper-control --command autoload
|
||||||
|
#exec --no-startup-id /usr/lib/pentablet/PenTablet
|
||||||
|
#for_window [class="PenTablet"] move scratchpad
|
23
dotfiles/i3blocks/clean
Normal file
23
dotfiles/i3blocks/clean
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# i3blocks configuration file
|
||||||
|
#
|
||||||
|
# The i3blocks man page describes the usage of the binary,
|
||||||
|
# and its website describes the configuration:
|
||||||
|
#
|
||||||
|
# https://vivien.github.io/i3blocks
|
||||||
|
|
||||||
|
|
||||||
|
# Global properties
|
||||||
|
separator=true
|
||||||
|
separator_block_width=15
|
||||||
|
|
||||||
|
[public-ip]
|
||||||
|
command=wget -qO - icanhazip.com
|
||||||
|
interval=once
|
||||||
|
|
||||||
|
|
||||||
|
[time]
|
||||||
|
command=date '+%m-%d %H:%M'
|
||||||
|
#command=date '+%Y-%m-%d %I:%M'
|
||||||
|
interval=1
|
||||||
|
|
||||||
|
|
27
dotfiles/i3blocks/guest
Normal file
27
dotfiles/i3blocks/guest
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# i3blocks configuration file
|
||||||
|
#
|
||||||
|
# The i3blocks man page describes the usage of the binary,
|
||||||
|
# and its website describes the configuration:
|
||||||
|
#
|
||||||
|
# https://vivien.github.io/i3blocks
|
||||||
|
|
||||||
|
|
||||||
|
# Global properties
|
||||||
|
separator=true
|
||||||
|
separator_block_width=15
|
||||||
|
|
||||||
|
[public-ip]
|
||||||
|
command=wget -qO - icanhazip.com
|
||||||
|
interval=once
|
||||||
|
|
||||||
|
|
||||||
|
[time]
|
||||||
|
command=date '+%m-%d %H:%M'
|
||||||
|
#command=date '+%Y-%m-%d %I:%M'
|
||||||
|
interval=1
|
||||||
|
|
||||||
|
[click]
|
||||||
|
full_text=[Keyboard]
|
||||||
|
command=sh /home/fred/scripts/VM/keyboard_vm.sh
|
||||||
|
color=#FF0000
|
||||||
|
|
27
dotfiles/i3blocks/host
Normal file
27
dotfiles/i3blocks/host
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# i3blocks configuration file
|
||||||
|
#
|
||||||
|
# The i3blocks man page describes the usage of the binary,
|
||||||
|
# and its website describes the configuration:
|
||||||
|
#
|
||||||
|
# https://vivien.github.io/i3blocks
|
||||||
|
|
||||||
|
|
||||||
|
# Global properties
|
||||||
|
separator=true
|
||||||
|
separator_block_width=15
|
||||||
|
|
||||||
|
[public-ip]
|
||||||
|
command=wget -qO - icanhazip.com
|
||||||
|
interval=once
|
||||||
|
|
||||||
|
|
||||||
|
[time]
|
||||||
|
command=date '+%m-%d %H:%M'
|
||||||
|
#command=date '+%Y-%m-%d %I:%M'
|
||||||
|
interval=1
|
||||||
|
|
||||||
|
[click]
|
||||||
|
full_text=[Keyboard]
|
||||||
|
command=sh /home/fred/scripts/VM/keyboard_vm.sh
|
||||||
|
color=#00FF00
|
||||||
|
|
20
dotfiles/nvim/.neoconf.json
Normal file
20
dotfiles/nvim/.neoconf.json
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"lua_ls": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lspconfig": {
|
||||||
|
"lua_ls": {
|
||||||
|
"Lua.format.enable": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
dotfiles/nvim/.stylua.toml
Normal file
7
dotfiles/nvim/.stylua.toml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
column_width = 120
|
||||||
|
line_endings = "Unix"
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
quote_style = "AutoPreferDouble"
|
||||||
|
call_parentheses = "None"
|
||||||
|
collapse_simple_statement = "Always"
|
34
dotfiles/nvim/README.md
Normal file
34
dotfiles/nvim/README.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# AstroNvim Template
|
||||||
|
|
||||||
|
**NOTE:** This is for AstroNvim v5+
|
||||||
|
|
||||||
|
A template for getting started with [AstroNvim](https://github.com/AstroNvim/AstroNvim)
|
||||||
|
|
||||||
|
## 🛠️ Installation
|
||||||
|
|
||||||
|
#### Make a backup of your current nvim and shared folder
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mv ~/.config/nvim ~/.config/nvim.bak
|
||||||
|
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||||
|
mv ~/.local/state/nvim ~/.local/state/nvim.bak
|
||||||
|
mv ~/.cache/nvim ~/.cache/nvim.bak
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Create a new user repository from this template
|
||||||
|
|
||||||
|
Press the "Use this template" button above to create a new repository to store your user configuration.
|
||||||
|
|
||||||
|
You can also just clone this repository directly if you do not want to track your user configuration in GitHub.
|
||||||
|
|
||||||
|
#### Clone the repository
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/<your_user>/<your_repository> ~/.config/nvim
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Start Neovim
|
||||||
|
|
||||||
|
```shell
|
||||||
|
nvim
|
||||||
|
```
|
19
dotfiles/nvim/init.lua
Normal file
19
dotfiles/nvim/init.lua
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
|
||||||
|
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
|
||||||
|
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- validate that lazy is available
|
||||||
|
if not pcall(require, "lazy") then
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
vim.cmd.quit()
|
||||||
|
end
|
||||||
|
|
||||||
|
require "lazy_setup"
|
||||||
|
require "polish"
|
12
dotfiles/nvim/lua/community.lua
Normal file
12
dotfiles/nvim/lua/community.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- AstroCommunity: import any community modules here
|
||||||
|
-- We import this file in `lazy_setup.lua` before the `plugins/` folder.
|
||||||
|
-- This guarantees that the specs are processed before any user plugins.
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"AstroNvim/astrocommunity",
|
||||||
|
{ import = "astrocommunity.pack.lua" },
|
||||||
|
-- import/override with your plugins folder
|
||||||
|
}
|
32
dotfiles/nvim/lua/lazy_setup.lua
Normal file
32
dotfiles/nvim/lua/lazy_setup.lua
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
require("lazy").setup({
|
||||||
|
{
|
||||||
|
"AstroNvim/AstroNvim",
|
||||||
|
version = "^5", -- Remove version tracking to elect for nightly AstroNvim
|
||||||
|
import = "astronvim.plugins",
|
||||||
|
opts = { -- AstroNvim options must be set here with the `import` key
|
||||||
|
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
|
||||||
|
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
|
||||||
|
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
|
||||||
|
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
|
||||||
|
update_notifications = true, -- Enable/disable notification about running `:Lazy update` twice to update pinned plugins
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ import = "community" },
|
||||||
|
{ import = "plugins" },
|
||||||
|
} --[[@as LazySpec]], {
|
||||||
|
-- Configure any other `lazy.nvim` configuration options here
|
||||||
|
install = { colorscheme = { "astrotheme", "habamax" } },
|
||||||
|
ui = { backdrop = 100 },
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins, add more to your liking
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
"netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} --[[@as LazyConfig]])
|
85
dotfiles/nvim/lua/plugins/astrocore.lua
Normal file
85
dotfiles/nvim/lua/plugins/astrocore.lua
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more!
|
||||||
|
-- Configuration documentation can be found with `:h astrocore`
|
||||||
|
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
|
||||||
|
-- as this provides autocomplete and documentation while editing
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"AstroNvim/astrocore",
|
||||||
|
---@type AstroCoreOpts
|
||||||
|
opts = {
|
||||||
|
-- Configure core features of AstroNvim
|
||||||
|
features = {
|
||||||
|
large_buf = { size = 1024 * 256, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
|
||||||
|
autopairs = true, -- enable autopairs at start
|
||||||
|
cmp = true, -- enable completion at start
|
||||||
|
diagnostics = { virtual_text = true, virtual_lines = false }, -- diagnostic settings on startup
|
||||||
|
highlighturl = true, -- highlight URLs at start
|
||||||
|
notifications = true, -- enable notifications at start
|
||||||
|
},
|
||||||
|
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
-- passed to `vim.filetype.add`
|
||||||
|
filetypes = {
|
||||||
|
-- see `:h vim.filetype.add` for usage
|
||||||
|
extension = {
|
||||||
|
foo = "fooscript",
|
||||||
|
},
|
||||||
|
filename = {
|
||||||
|
[".foorc"] = "fooscript",
|
||||||
|
},
|
||||||
|
pattern = {
|
||||||
|
[".*/etc/foo/.*"] = "fooscript",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- vim options can be configured here
|
||||||
|
options = {
|
||||||
|
opt = { -- vim.opt.<key>
|
||||||
|
relativenumber = true, -- sets vim.opt.relativenumber
|
||||||
|
number = true, -- sets vim.opt.number
|
||||||
|
spell = false, -- sets vim.opt.spell
|
||||||
|
signcolumn = "yes", -- sets vim.opt.signcolumn to yes
|
||||||
|
wrap = false, -- sets vim.opt.wrap
|
||||||
|
},
|
||||||
|
g = { -- vim.g.<key>
|
||||||
|
-- configure global vim variables (vim.g)
|
||||||
|
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
|
||||||
|
-- This can be found in the `lua/lazy_setup.lua` file
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Mappings can be configured through AstroCore as well.
|
||||||
|
-- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized
|
||||||
|
mappings = {
|
||||||
|
-- first key is the mode
|
||||||
|
n = {
|
||||||
|
-- second key is the lefthand side of the map
|
||||||
|
|
||||||
|
-- navigate buffer tabs
|
||||||
|
["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
||||||
|
["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
||||||
|
|
||||||
|
-- mappings seen under group name "Buffer"
|
||||||
|
["<Leader>bd"] = {
|
||||||
|
function()
|
||||||
|
require("astroui.status.heirline").buffer_picker(
|
||||||
|
function(bufnr) require("astrocore.buffer").close(bufnr) end
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
desc = "Close buffer from tabline",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- tables with just a `desc` key will be registered with which-key if it's installed
|
||||||
|
-- this is useful for naming menus
|
||||||
|
-- ["<Leader>b"] = { desc = "Buffers" },
|
||||||
|
|
||||||
|
-- setting a mapping to false will disable it
|
||||||
|
-- ["<C-S>"] = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
105
dotfiles/nvim/lua/plugins/astrolsp.lua
Normal file
105
dotfiles/nvim/lua/plugins/astrolsp.lua
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine
|
||||||
|
-- Configuration documentation can be found with `:h astrolsp`
|
||||||
|
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
|
||||||
|
-- as this provides autocomplete and documentation while editing
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"AstroNvim/astrolsp",
|
||||||
|
---@type AstroLSPOpts
|
||||||
|
opts = {
|
||||||
|
-- Configuration table of features provided by AstroLSP
|
||||||
|
features = {
|
||||||
|
codelens = true, -- enable/disable codelens refresh on start
|
||||||
|
inlay_hints = false, -- enable/disable inlay hints on start
|
||||||
|
semantic_tokens = true, -- enable/disable semantic token highlighting
|
||||||
|
},
|
||||||
|
-- customize lsp formatting options
|
||||||
|
formatting = {
|
||||||
|
-- control auto formatting on save
|
||||||
|
format_on_save = {
|
||||||
|
enabled = true, -- enable or disable format on save globally
|
||||||
|
allow_filetypes = { -- enable format on save for specified filetypes only
|
||||||
|
-- "go",
|
||||||
|
},
|
||||||
|
ignore_filetypes = { -- disable format on save for specified filetypes
|
||||||
|
-- "python",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
disabled = { -- disable formatting capabilities for the listed language servers
|
||||||
|
-- disable lua_ls formatting capability if you want to use StyLua to format your lua code
|
||||||
|
-- "lua_ls",
|
||||||
|
},
|
||||||
|
timeout_ms = 1000, -- default format timeout
|
||||||
|
-- filter = function(client) -- fully override the default formatting function
|
||||||
|
-- return true
|
||||||
|
-- end
|
||||||
|
},
|
||||||
|
-- enable servers that you already have installed without mason
|
||||||
|
servers = {
|
||||||
|
-- "pyright"
|
||||||
|
},
|
||||||
|
-- customize language server configuration options passed to `lspconfig`
|
||||||
|
---@diagnostic disable: missing-fields
|
||||||
|
config = {
|
||||||
|
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
|
||||||
|
},
|
||||||
|
-- customize how language servers are attached
|
||||||
|
handlers = {
|
||||||
|
-- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server
|
||||||
|
-- function(server, opts) require("lspconfig")[server].setup(opts) end
|
||||||
|
|
||||||
|
-- the key is the server that is being setup with `lspconfig`
|
||||||
|
-- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server
|
||||||
|
-- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed
|
||||||
|
},
|
||||||
|
-- Configure buffer local auto commands to add when attaching a language server
|
||||||
|
autocmds = {
|
||||||
|
-- first key is the `augroup` to add the auto commands to (:h augroup)
|
||||||
|
lsp_codelens_refresh = {
|
||||||
|
-- Optional condition to create/delete auto command group
|
||||||
|
-- can either be a string of a client capability or a function of `fun(client, bufnr): boolean`
|
||||||
|
-- condition will be resolved for each client on each execution and if it ever fails for all clients,
|
||||||
|
-- the auto commands will be deleted for that buffer
|
||||||
|
cond = "textDocument/codeLens",
|
||||||
|
-- cond = function(client, bufnr) return client.name == "lua_ls" end,
|
||||||
|
-- list of auto commands to set
|
||||||
|
{
|
||||||
|
-- events to trigger
|
||||||
|
event = { "InsertLeave", "BufEnter" },
|
||||||
|
-- the rest of the autocmd options (:h nvim_create_autocmd)
|
||||||
|
desc = "Refresh codelens (buffer)",
|
||||||
|
callback = function(args)
|
||||||
|
if require("astrolsp").config.features.codelens then vim.lsp.codelens.refresh { bufnr = args.buf } end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- mappings to be set up on attaching of a language server
|
||||||
|
mappings = {
|
||||||
|
n = {
|
||||||
|
-- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean
|
||||||
|
gD = {
|
||||||
|
function() vim.lsp.buf.declaration() end,
|
||||||
|
desc = "Declaration of current symbol",
|
||||||
|
cond = "textDocument/declaration",
|
||||||
|
},
|
||||||
|
["<Leader>uY"] = {
|
||||||
|
function() require("astrolsp.toggles").buffer_semantic_tokens() end,
|
||||||
|
desc = "Toggle LSP semantic highlight (buffer)",
|
||||||
|
cond = function(client)
|
||||||
|
return client.supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens ~= nil
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- A custom `on_attach` function to be run after the default `on_attach` function
|
||||||
|
-- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`)
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
-- this would disable semanticTokensProvider for all clients
|
||||||
|
-- client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
39
dotfiles/nvim/lua/plugins/astroui.lua
Normal file
39
dotfiles/nvim/lua/plugins/astroui.lua
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- AstroUI provides the basis for configuring the AstroNvim User Interface
|
||||||
|
-- Configuration documentation can be found with `:h astroui`
|
||||||
|
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
|
||||||
|
-- as this provides autocomplete and documentation while editing
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"AstroNvim/astroui",
|
||||||
|
---@type AstroUIOpts
|
||||||
|
opts = {
|
||||||
|
-- change colorscheme
|
||||||
|
colorscheme = "astrodark",
|
||||||
|
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
|
||||||
|
highlights = {
|
||||||
|
init = { -- this table overrides highlights in all themes
|
||||||
|
-- Normal = { bg = "#000000" },
|
||||||
|
},
|
||||||
|
astrodark = { -- a table of overrides/changes when applying the astrotheme theme
|
||||||
|
-- Normal = { bg = "#000000" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Icons can be configured throughout the interface
|
||||||
|
icons = {
|
||||||
|
-- configure the loading of the lsp in the status line
|
||||||
|
LSPLoading1 = "⠋",
|
||||||
|
LSPLoading2 = "⠙",
|
||||||
|
LSPLoading3 = "⠹",
|
||||||
|
LSPLoading4 = "⠸",
|
||||||
|
LSPLoading5 = "⠼",
|
||||||
|
LSPLoading6 = "⠴",
|
||||||
|
LSPLoading7 = "⠦",
|
||||||
|
LSPLoading8 = "⠧",
|
||||||
|
LSPLoading9 = "⠇",
|
||||||
|
LSPLoading10 = "⠏",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
28
dotfiles/nvim/lua/plugins/mason.lua
Normal file
28
dotfiles/nvim/lua/plugins/mason.lua
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- Customize Mason
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
-- use mason-tool-installer for automatically installing Mason packages
|
||||||
|
{
|
||||||
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
-- overrides `require("mason-tool-installer").setup(...)`
|
||||||
|
opts = {
|
||||||
|
-- Make sure to use the names found in `:Mason`
|
||||||
|
ensure_installed = {
|
||||||
|
-- install language servers
|
||||||
|
"lua-language-server",
|
||||||
|
|
||||||
|
-- install formatters
|
||||||
|
"stylua",
|
||||||
|
|
||||||
|
-- install debuggers
|
||||||
|
"debugpy",
|
||||||
|
|
||||||
|
-- install any other package
|
||||||
|
"tree-sitter-cli",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
24
dotfiles/nvim/lua/plugins/none-ls.lua
Normal file
24
dotfiles/nvim/lua/plugins/none-ls.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- Customize None-ls sources
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- opts variable is the default configuration table for the setup function call
|
||||||
|
-- local null_ls = require "null-ls"
|
||||||
|
|
||||||
|
-- Check supported formatters and linters
|
||||||
|
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
||||||
|
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||||
|
|
||||||
|
-- Only insert new sources, do not replace the existing ones
|
||||||
|
-- (If you wish to replace, use `opts.sources = {}` instead of the `list_insert_unique` function)
|
||||||
|
opts.sources = require("astrocore").list_insert_unique(opts.sources, {
|
||||||
|
-- Set a formatter
|
||||||
|
-- null_ls.builtins.formatting.stylua,
|
||||||
|
-- null_ls.builtins.formatting.prettier,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
15
dotfiles/nvim/lua/plugins/treesitter.lua
Normal file
15
dotfiles/nvim/lua/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- Customize Treesitter
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"lua",
|
||||||
|
"vim",
|
||||||
|
-- add more arguments for adding more treesitter parsers
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
88
dotfiles/nvim/lua/plugins/user.lua
Normal file
88
dotfiles/nvim/lua/plugins/user.lua
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- You can also add or configure plugins by creating files in this `plugins/` folder
|
||||||
|
-- PLEASE REMOVE THE EXAMPLES YOU HAVE NO INTEREST IN BEFORE ENABLING THIS FILE
|
||||||
|
-- Here are some examples:
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
|
||||||
|
-- == Examples of Adding Plugins ==
|
||||||
|
|
||||||
|
"andweeb/presence.nvim",
|
||||||
|
{
|
||||||
|
"ray-x/lsp_signature.nvim",
|
||||||
|
event = "BufRead",
|
||||||
|
config = function() require("lsp_signature").setup() end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- == Examples of Overriding Plugins ==
|
||||||
|
|
||||||
|
-- customize dashboard options
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
opts = {
|
||||||
|
dashboard = {
|
||||||
|
preset = {
|
||||||
|
header = table.concat({
|
||||||
|
" █████ ███████ ████████ ██████ ██████ ",
|
||||||
|
"██ ██ ██ ██ ██ ██ ██ ██",
|
||||||
|
"███████ ███████ ██ ██████ ██ ██",
|
||||||
|
"██ ██ ██ ██ ██ ██ ██ ██",
|
||||||
|
"██ ██ ███████ ██ ██ ██ ██████ ",
|
||||||
|
"",
|
||||||
|
"███ ██ ██ ██ ██ ███ ███",
|
||||||
|
"████ ██ ██ ██ ██ ████ ████",
|
||||||
|
"██ ██ ██ ██ ██ ██ ██ ████ ██",
|
||||||
|
"██ ██ ██ ██ ██ ██ ██ ██ ██",
|
||||||
|
"██ ████ ████ ██ ██ ██",
|
||||||
|
}, "\n"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- You can disable default plugins as follows:
|
||||||
|
{ "max397574/better-escape.nvim", enabled = false },
|
||||||
|
|
||||||
|
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
|
||||||
|
{
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
config = function(plugin, opts)
|
||||||
|
require "astronvim.plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
|
||||||
|
-- add more custom luasnip configuration such as filetype extend or custom snippets
|
||||||
|
local luasnip = require "luasnip"
|
||||||
|
luasnip.filetype_extend("javascript", { "javascriptreact" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
config = function(plugin, opts)
|
||||||
|
require "astronvim.plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
|
||||||
|
-- add more custom autopairs configuration such as custom rules
|
||||||
|
local npairs = require "nvim-autopairs"
|
||||||
|
local Rule = require "nvim-autopairs.rule"
|
||||||
|
local cond = require "nvim-autopairs.conds"
|
||||||
|
npairs.add_rules(
|
||||||
|
{
|
||||||
|
Rule("$", "$", { "tex", "latex" })
|
||||||
|
-- don't add a pair if the next character is %
|
||||||
|
:with_pair(cond.not_after_regex "%%")
|
||||||
|
-- don't add a pair if the previous character is xxx
|
||||||
|
:with_pair(
|
||||||
|
cond.not_before_regex("xxx", 3)
|
||||||
|
)
|
||||||
|
-- don't move right when repeat character
|
||||||
|
:with_move(cond.none())
|
||||||
|
-- don't delete if the next character is xx
|
||||||
|
:with_del(cond.not_after_regex "xx")
|
||||||
|
-- disable adding a newline when you press <cr>
|
||||||
|
:with_cr(cond.none()),
|
||||||
|
},
|
||||||
|
-- disable for .vim files, but it work for another filetypes
|
||||||
|
Rule("a", "a", "-vim")
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
5
dotfiles/nvim/lua/polish.lua
Normal file
5
dotfiles/nvim/lua/polish.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||||
|
|
||||||
|
-- This will run last in the setup process.
|
||||||
|
-- This is just pure lua so anything that doesn't
|
||||||
|
-- fit in the normal config locations above can go here
|
6
dotfiles/nvim/neovim.yml
Normal file
6
dotfiles/nvim/neovim.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
base: lua51
|
||||||
|
|
||||||
|
globals:
|
||||||
|
vim:
|
||||||
|
any: true
|
8
dotfiles/nvim/selene.toml
Normal file
8
dotfiles/nvim/selene.toml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
std = "neovim"
|
||||||
|
|
||||||
|
[rules]
|
||||||
|
global_usage = "allow"
|
||||||
|
if_same_then_else = "allow"
|
||||||
|
incorrect_standard_library_use = "allow"
|
||||||
|
mixed_table = "allow"
|
||||||
|
multiple_statements = "allow"
|
16
dotfiles/qemu/qemu-hooks
Executable file
16
dotfiles/qemu/qemu-hooks
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# note 25/5/31 these exports were included from my arch install, not sure why. disabling for now, if they arent needed the next time I look at this feel free to remove them
|
||||||
|
export XAUTHORITY=/home/fred/.Xauthority
|
||||||
|
export DISPLAY=:0
|
||||||
|
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
||||||
|
|
||||||
|
#guest_name="$1"
|
||||||
|
#libvirt_task="$2"
|
||||||
|
if [[ $2 = "started" ]]; then
|
||||||
|
# on_hook runs inline on VMmanager
|
||||||
|
echo "no-op"
|
||||||
|
elif [[ $2 = "stopped" ]]; then
|
||||||
|
bash /home/fred/scripts/VM/VMmanager.sh off_hook
|
||||||
|
fi
|
||||||
|
|
52
dotfiles/solaar/config.yaml
Normal file
52
dotfiles/solaar/config.yaml
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
- 1.1.14
|
||||||
|
- _NAME: MX Master 3S
|
||||||
|
_absent: [hi-res-scroll, lowres-scroll-mode, onboard_profiles, report_rate, report_rate_extended, pointer_speed, dpi_extended, speed-change, backlight,
|
||||||
|
backlight_level, backlight_duration_hands_out, backlight_duration_hands_in, backlight_duration_powered, backlight-timed, led_control, led_zone_, rgb_control,
|
||||||
|
rgb_zone_, brightness_control, per-key-lighting, fn-swap, persistent-remappable-keys, disable-keyboard-keys, crown-smooth, divert-crown, divert-gkeys,
|
||||||
|
m-key-leds, mr-key-led, multiplatform, gesture2-gestures, gesture2-divert, gesture2-params, sidetone, equalizer, adc_power_management]
|
||||||
|
_battery: 4100
|
||||||
|
_modelId: B03400000000
|
||||||
|
_sensitive: {change-host: false, divert-keys: false, reprogrammable-keys: false, scroll-ratchet: true, thumb-scroll-invert: false, thumb-scroll-mode: false}
|
||||||
|
_serial: 51EA2265
|
||||||
|
_unitId: 51EA2265
|
||||||
|
_wpid: B034
|
||||||
|
change-host: null
|
||||||
|
divert-keys: {82: 0, 83: 0, 86: 0, 195: 1, 196: 1}
|
||||||
|
dpi: 1000
|
||||||
|
hires-scroll-mode: false
|
||||||
|
hires-smooth-invert: false
|
||||||
|
hires-smooth-resolution: false
|
||||||
|
reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 195: 195, 196: 196}
|
||||||
|
scroll-ratchet: 1
|
||||||
|
smart-shift: 1
|
||||||
|
thumb-scroll-invert: true
|
||||||
|
thumb-scroll-mode: false
|
||||||
|
- _NAME: Wireless Keyboard MK270
|
||||||
|
_modelId: Wireless Keyboard MK270
|
||||||
|
_sensitive: {hires-scroll-mode: ignore, hires-smooth-invert: ignore, hires-smooth-resolution: ignore}
|
||||||
|
_serial: '00000000'
|
||||||
|
_unitId: '00000000'
|
||||||
|
_wpid: '4023'
|
||||||
|
fn-swap: false
|
||||||
|
- _NAME: Wireless Mouse M185 new
|
||||||
|
_sensitive: {hires-scroll-mode: ignore, hires-smooth-invert: ignore, hires-smooth-resolution: ignore}
|
||||||
|
_serial: '00000000'
|
||||||
|
_wpid: '4054'
|
||||||
|
divert-keys: {82: 0}
|
||||||
|
lowres-scroll-mode: false
|
||||||
|
pointer_speed: 256
|
||||||
|
reprogrammable-keys: {80: 80, 81: 81, 82: 82}
|
||||||
|
- _NAME: MX Master 3 Wireless Mouse
|
||||||
|
_modelId: B02340820000
|
||||||
|
_sensitive: {hires-scroll-mode: ignore, hires-smooth-invert: ignore, hires-smooth-resolution: ignore}
|
||||||
|
_serial: 73738B2B
|
||||||
|
_unitId: 73738B2B
|
||||||
|
_wpid: '4082'
|
||||||
|
change-host: null
|
||||||
|
divert-keys: {82: 0, 83: 0, 86: 0, 195: 0, 196: 0}
|
||||||
|
dpi: 1000
|
||||||
|
reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 195: 195, 196: 196}
|
||||||
|
scroll-ratchet: 1
|
||||||
|
smart-shift: 1
|
||||||
|
thumb-scroll-invert: false
|
||||||
|
thumb-scroll-mode: false
|
20
dotfiles/solaar/rules.yaml
Normal file
20
dotfiles/solaar/rules.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
%YAML 1.3
|
||||||
|
---
|
||||||
|
- Rule:
|
||||||
|
- KeyIsDown: Mouse Gesture Button
|
||||||
|
- KeyPress:
|
||||||
|
- Alt_L
|
||||||
|
- depress
|
||||||
|
- MouseClick: [left, depress]
|
||||||
|
- Rule:
|
||||||
|
- Key: [Mouse Gesture Button, released]
|
||||||
|
- KeyPress:
|
||||||
|
- Alt_L
|
||||||
|
- release
|
||||||
|
- MouseClick: [left, release]
|
||||||
|
- Rule:
|
||||||
|
- Key: [Smart Shift, pressed]
|
||||||
|
- KeyPress:
|
||||||
|
- [Control_L, Shift_L, Q]
|
||||||
|
- click
|
||||||
|
...
|
90
dotfiles/thunar/uca.xml
Normal file
90
dotfiles/thunar/uca.xml
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<actions>
|
||||||
|
<action>
|
||||||
|
<icon>utilities-terminal</icon>
|
||||||
|
<name>Open Terminal Here</name>
|
||||||
|
<submenu></submenu>
|
||||||
|
<unique-id>1665544021585627-1</unique-id>
|
||||||
|
<command>cd %f && i3-sensible-terminal -hold</command>
|
||||||
|
<description>Example for a custom action</description>
|
||||||
|
<range></range>
|
||||||
|
<patterns>*</patterns>
|
||||||
|
<startup-notify/>
|
||||||
|
<directories/>
|
||||||
|
</action>
|
||||||
|
<action>
|
||||||
|
<icon></icon>
|
||||||
|
<name>Open root here</name>
|
||||||
|
<submenu></submenu>
|
||||||
|
<unique-id>1665876753058215-1</unique-id>
|
||||||
|
<command>sudo thunar %f</command>
|
||||||
|
<description></description>
|
||||||
|
<range></range>
|
||||||
|
<patterns>*</patterns>
|
||||||
|
<directories/>
|
||||||
|
</action>
|
||||||
|
<action>
|
||||||
|
<icon>inode-symlink</icon>
|
||||||
|
<name>Symlink</name>
|
||||||
|
<submenu></submenu>
|
||||||
|
<unique-id>1699833063931640-1</unique-id>
|
||||||
|
<command>ln -Ts %f "$(basename %n | sed "s/\(.*\)\.\(.*\)/\1-sl.\2/")"</command>
|
||||||
|
<description>Create a symlink</description>
|
||||||
|
<range>*</range>
|
||||||
|
<patterns>*</patterns>
|
||||||
|
<directories/>
|
||||||
|
<audio-files/>
|
||||||
|
<image-files/>
|
||||||
|
<other-files/>
|
||||||
|
<text-files/>
|
||||||
|
<video-files/>
|
||||||
|
</action>
|
||||||
|
<action>
|
||||||
|
<icon>drive-harddisk</icon>
|
||||||
|
<name>Hardlink</name>
|
||||||
|
<submenu></submenu>
|
||||||
|
<unique-id>1699833176600678-2</unique-id>
|
||||||
|
<command>ln %f "$(basename %n | sed "s/\(.*\)\.\(.*\)/\1-hl.\2/")"</command>
|
||||||
|
<description>Create a hardlink</description>
|
||||||
|
<range>*</range>
|
||||||
|
<patterns>*</patterns>
|
||||||
|
<directories/>
|
||||||
|
<audio-files/>
|
||||||
|
<image-files/>
|
||||||
|
<other-files/>
|
||||||
|
<text-files/>
|
||||||
|
<video-files/>
|
||||||
|
</action>
|
||||||
|
<action>
|
||||||
|
<icon>applications-utilities</icon>
|
||||||
|
<name>batch hardlinks</name>
|
||||||
|
<submenu></submenu>
|
||||||
|
<unique-id>1732821951376075-1</unique-id>
|
||||||
|
<command>bash -c 'for file in "$@"; do ln "$file" "$(dirname "$file")/hl-$(basename "$file")"; done' -- %F</command>
|
||||||
|
<description></description>
|
||||||
|
<range>*</range>
|
||||||
|
<patterns>*</patterns>
|
||||||
|
<directories/>
|
||||||
|
<audio-files/>
|
||||||
|
<image-files/>
|
||||||
|
<other-files/>
|
||||||
|
<text-files/>
|
||||||
|
<video-files/>
|
||||||
|
</action>
|
||||||
|
<action>
|
||||||
|
<icon>edit-paste</icon>
|
||||||
|
<name>timestamp copy</name>
|
||||||
|
<submenu></submenu>
|
||||||
|
<unique-id>1746467825367729-1</unique-id>
|
||||||
|
<command>~/scripts/copy_with_timestamp.sh %f</command>
|
||||||
|
<description>create copy of file prepended with timestamp</description>
|
||||||
|
<range>*</range>
|
||||||
|
<patterns>*</patterns>
|
||||||
|
<startup-notify/>
|
||||||
|
<audio-files/>
|
||||||
|
<image-files/>
|
||||||
|
<other-files/>
|
||||||
|
<text-files/>
|
||||||
|
<video-files/>
|
||||||
|
</action>
|
||||||
|
</actions>
|
26
dotfiles/volumeicon/volumeicon
Normal file
26
dotfiles/volumeicon/volumeicon
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
[Alsa]
|
||||||
|
card=default
|
||||||
|
channel=Master
|
||||||
|
|
||||||
|
[Notification]
|
||||||
|
show_notification=true
|
||||||
|
notification_type=0
|
||||||
|
|
||||||
|
[StatusIcon]
|
||||||
|
stepsize=5
|
||||||
|
onclick=pavucontrol
|
||||||
|
theme=Default
|
||||||
|
use_panel_specific_icons=false
|
||||||
|
lmb_slider=false
|
||||||
|
mmb_mute=false
|
||||||
|
use_horizontal_slider=false
|
||||||
|
show_sound_level=false
|
||||||
|
use_transparent_background=false
|
||||||
|
|
||||||
|
[Hotkeys]
|
||||||
|
up_enabled=false
|
||||||
|
down_enabled=false
|
||||||
|
mute_enabled=false
|
||||||
|
up=XF86AudioRaiseVolume
|
||||||
|
down=XF86AudioLowerVolume
|
||||||
|
mute=XF86AudioMute
|
84
dotfiles/xbindkeys/xbindkeysrc
Normal file
84
dotfiles/xbindkeys/xbindkeysrc
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
# For the benefit of emacs users: -*- shell-script -*-
|
||||||
|
###########################
|
||||||
|
# xbindkeys configuration #
|
||||||
|
###########################
|
||||||
|
#
|
||||||
|
# Version: 1.8.7
|
||||||
|
#
|
||||||
|
# If you edit this file, do not forget to uncomment any lines
|
||||||
|
# that you change.
|
||||||
|
# The pound(#) symbol may be used anywhere for comments.
|
||||||
|
#
|
||||||
|
# To specify a key, you can use 'xbindkeys --key' or
|
||||||
|
# 'xbindkeys --multikey' and put one of the two lines in this file.
|
||||||
|
#
|
||||||
|
# The format of a command line is:
|
||||||
|
# "command to start"
|
||||||
|
# associated key
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# A list of keys is in /usr/include/X11/keysym.h and in
|
||||||
|
# /usr/include/X11/keysymdef.h
|
||||||
|
# The XK_ is not needed.
|
||||||
|
#
|
||||||
|
# List of modifier:
|
||||||
|
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
|
||||||
|
# Mod3 (CapsLock), Mod4 (win), Mod5 (Scroll).
|
||||||
|
#
|
||||||
|
|
||||||
|
# The release modifier is not a standard X modifier, but you can
|
||||||
|
# use it if you want to catch release events instead of press events
|
||||||
|
|
||||||
|
# By defaults, xbindkeys does not pay attention with the modifiers
|
||||||
|
# NumLock, CapsLock and ScrollLock.
|
||||||
|
# Uncomment the lines above if you want to pay attention to them.
|
||||||
|
|
||||||
|
#keystate_numlock = enable
|
||||||
|
#keystate_capslock = enable
|
||||||
|
#keystate_scrolllock= enable
|
||||||
|
|
||||||
|
#alias reset = "killall xbindkeys; sleep .2; xbindkeys"
|
||||||
|
|
||||||
|
################################
|
||||||
|
# Start of keybinds #
|
||||||
|
################################
|
||||||
|
|
||||||
|
### resize windows with super key + scroll
|
||||||
|
"xdotool key --clearmodifiers Super_L+ctrl+h"
|
||||||
|
Mod4 + b:7
|
||||||
|
|
||||||
|
"xdotool key --clearmodifiers Super_L+ctrl+l"
|
||||||
|
Mod4 + b:6
|
||||||
|
|
||||||
|
"xdotool key --clearmodifiers Super_L+ctrl+j"
|
||||||
|
Mod4 + b:4
|
||||||
|
|
||||||
|
"xdotool key --clearmodifiers Super_L+ctrl+k"
|
||||||
|
Mod4 + b:5
|
||||||
|
|
||||||
|
|
||||||
|
### left and right with scroll wheel
|
||||||
|
#"xdotool key --clearmodifiers Left"
|
||||||
|
#b:7
|
||||||
|
|
||||||
|
#"xdotool key --clearmodifiers Right"
|
||||||
|
#b:6
|
||||||
|
|
||||||
|
|
||||||
|
### switch workspaces with thumbbuttons
|
||||||
|
"sh ~/scripts/workspace_switcher.sh next"
|
||||||
|
b:9
|
||||||
|
|
||||||
|
"sh ~/scripts/workspace_switcher.sh prev"
|
||||||
|
b:8
|
||||||
|
|
||||||
|
"sh ~/scripts/workspace_switcher.sh send_next"
|
||||||
|
Mod4 + b:9
|
||||||
|
|
||||||
|
"sh ~/scripts/workspace_switcher.sh send_prev"
|
||||||
|
Mod4 + b:8
|
||||||
|
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# End of xbindkeys configuration #
|
||||||
|
##################################
|
42
dotfiles/xfce-perchannel-xml/xsettings.xml
Normal file
42
dotfiles/xfce-perchannel-xml/xsettings.xml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<?xml version="1.1" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<channel name="xsettings" version="1.0">
|
||||||
|
<property name="Net" type="empty">
|
||||||
|
<property name="ThemeName" type="string" value="Adwaita-dark"/>
|
||||||
|
<property name="IconThemeName" type="empty"/>
|
||||||
|
<property name="DoubleClickTime" type="empty"/>
|
||||||
|
<property name="DoubleClickDistance" type="empty"/>
|
||||||
|
<property name="DndDragThreshold" type="empty"/>
|
||||||
|
<property name="CursorBlink" type="empty"/>
|
||||||
|
<property name="CursorBlinkTime" type="empty"/>
|
||||||
|
<property name="SoundThemeName" type="empty"/>
|
||||||
|
<property name="EnableEventSounds" type="empty"/>
|
||||||
|
<property name="EnableInputFeedbackSounds" type="empty"/>
|
||||||
|
</property>
|
||||||
|
<property name="Xft" type="empty">
|
||||||
|
<property name="DPI" type="empty"/>
|
||||||
|
<property name="Antialias" type="empty"/>
|
||||||
|
<property name="Hinting" type="empty"/>
|
||||||
|
<property name="HintStyle" type="empty"/>
|
||||||
|
<property name="RGBA" type="empty"/>
|
||||||
|
</property>
|
||||||
|
<property name="Gtk" type="empty">
|
||||||
|
<property name="CanChangeAccels" type="empty"/>
|
||||||
|
<property name="ColorPalette" type="empty"/>
|
||||||
|
<property name="FontName" type="empty"/>
|
||||||
|
<property name="MonospaceFontName" type="empty"/>
|
||||||
|
<property name="IconSizes" type="empty"/>
|
||||||
|
<property name="KeyThemeName" type="empty"/>
|
||||||
|
<property name="MenuImages" type="empty"/>
|
||||||
|
<property name="ButtonImages" type="empty"/>
|
||||||
|
<property name="MenuBarAccel" type="empty"/>
|
||||||
|
<property name="CursorThemeName" type="string" value="Adwaita"/>
|
||||||
|
<property name="CursorThemeSize" type="empty"/>
|
||||||
|
<property name="DecorationLayout" type="string" value="icon,menu:minimize,maximize,close"/>
|
||||||
|
<property name="DialogsUseHeader" type="empty"/>
|
||||||
|
<property name="TitlebarMiddleClick" type="empty"/>
|
||||||
|
</property>
|
||||||
|
<property name="Gdk" type="empty">
|
||||||
|
<property name="WindowScalingFactor" type="empty"/>
|
||||||
|
</property>
|
||||||
|
</channel>
|
2
dotfiles/xprofile/xprofile
Normal file
2
dotfiles/xprofile/xprofile
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# give i3 config access to path
|
||||||
|
export PATH=$PATH:$HOME/bin
|
92
flake.lock
generated
Normal file
92
flake.lock
generated
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"firefox-addons": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"dir": "pkgs/firefox-addons",
|
||||||
|
"lastModified": 1747973023,
|
||||||
|
"narHash": "sha256-v2OgykASspKAyL+hYKlfa9PM4cwlFZ7/WQ1uvd256ko=",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nur-expressions",
|
||||||
|
"rev": "c7ee05a5dc9b52ba7a6a660537fabaf711b7790a",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"dir": "pkgs/firefox-addons",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nur-expressions",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747978958,
|
||||||
|
"narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "7419250703fd5eb50e99bdfb07a86671939103ea",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1747744144,
|
||||||
|
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"firefox-addons": "firefox-addons",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"sops-nix": "sops-nix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sops-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749592509,
|
||||||
|
"narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=",
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "sops-nix",
|
||||||
|
"rev": "50754dfaa0e24e313c626900d44ef431f3210138",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "sops-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
72
flake.nix
Normal file
72
flake.nix
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
{
|
||||||
|
description = "Nixos config flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||||
|
firefox-addons.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, firefox-addons, home-manager, sops-nix, ... }@inputs: {
|
||||||
|
nixosConfigurations = {
|
||||||
|
desk = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
firefox-addons = firefox-addons.packages.x86_64-linux;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./hosts/desk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
vm_ollama = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./hosts/vm_ollama
|
||||||
|
];
|
||||||
|
};
|
||||||
|
vps_fz = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./hosts/vps_fz
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# wip
|
||||||
|
lap = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
firefox-addons = firefox-addons.packages.x86_64-linux;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./hosts/laptop
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# wip
|
||||||
|
htpc = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
firefox-addons = firefox-addons.packages.x86_64-linux;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./hosts/htpc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
12
hosts/desk/boot.nix
Normal file
12
hosts/desk/boot.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
boot.initrd.luks.devices = {
|
||||||
|
"luks-c14a978c-5752-4d1b-beb9-57fb710cd409" = {
|
||||||
|
device = "/dev/disk/by-uuid/c14a978c-5752-4d1b-beb9-57fb710cd409";
|
||||||
|
allowDiscards = true;
|
||||||
|
keyFileSize = 4096;
|
||||||
|
keyFile = "/dev//disk/by-id/usb-Generic_Flash_Disk_C94D5655-0:0";
|
||||||
|
fallbackToPassword = true;
|
||||||
|
preLVM = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
97
hosts/desk/default.nix
Normal file
97
hosts/desk/default.nix
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
{ pkgs, inputs, config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
nfs_opts = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ];
|
||||||
|
hdd_opts = [ "nosuid" "nodev" "nofail" ];
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./boot.nix
|
||||||
|
./hardware.nix
|
||||||
|
./kvm.nix
|
||||||
|
./desk_apps.nix
|
||||||
|
../../modules/common/default.nix
|
||||||
|
../../modules/common/system-d_boot.nix
|
||||||
|
../../modules/networking/ssh.nix
|
||||||
|
../../modules/networking/hosts.nix
|
||||||
|
../../modules/user
|
||||||
|
../../modules/apps/99_i3_config.nix
|
||||||
|
../../modules/dev/docker.nix
|
||||||
|
../../modules/dev/ruby.nix
|
||||||
|
../../modules/misc/polkit.nix
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
config = {
|
||||||
|
user = "fred";
|
||||||
|
host = "desk";
|
||||||
|
sops_file = "home.yaml";
|
||||||
|
|
||||||
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ nfs-utils ddcutil input-remapper ];
|
||||||
|
|
||||||
|
#### NFS's ###
|
||||||
|
services.autofs = {
|
||||||
|
enable = true;
|
||||||
|
timeout = 60;
|
||||||
|
autoMaster = ''
|
||||||
|
/- /etc/autofs/auto.nfs_server --timeout=60
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
environment.etc."autofs/auto.nfs_server" = {
|
||||||
|
text = ''
|
||||||
|
/nfs -rw,soft,rsize=8192,wsize=8192 nfs:/nfs
|
||||||
|
/solid -rw,soft,rsize=8192,wsize=8192 nfs:/solid
|
||||||
|
/docker -rw,soft,rsize=8192,wsize=8192 nfs:/docker
|
||||||
|
'';
|
||||||
|
mode = "0644";
|
||||||
|
};
|
||||||
|
|
||||||
|
### HDD's ###
|
||||||
|
fileSystems."/run/media/fred/2tb" =
|
||||||
|
{ device = "/dev/disk/by-uuid/2967e82b-a83c-4357-9939-1fbcc2618a9a";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = hdd_opts;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/run/media/fred/arch_home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/122e2d4f-3512-4077-a5ee-f80ac6e32300";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = hdd_opts;
|
||||||
|
};
|
||||||
|
fileSystems."/run/media/fred/arch_root" =
|
||||||
|
{ device = "/dev/disk/by-uuid/56a64ba1-5ffa-426d-bca2-ede62c7b2498";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = hdd_opts;
|
||||||
|
};
|
||||||
|
|
||||||
|
# ddcutil detect # get I2C bus #
|
||||||
|
# ddcutil capabilities --bus=7
|
||||||
|
# ddcutil --bus=7 setvcp 60 0x0f
|
||||||
|
hardware.i2c.enable = true;
|
||||||
|
users.users.${config.user} = {
|
||||||
|
extraGroups = [ "i2c" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.tcsd.enable = false; # prevent sysinit-reactiviation.target hang when rebuilding flake
|
||||||
|
services.xserver.displayManager.lightdm.extraSeatDefaults = "display-setup-script = ${pkgs.ddcutil}/bin/ddcutil --bus=7 setvcp 60 0x0f";
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = [ 11357 ]; # ollama-docker
|
||||||
|
networking.firewall.allowedTCPPorts = [ 11357 ]; # ollama-docker
|
||||||
|
networking.enableIPv6 = false;
|
||||||
|
security.pki.certificates = [ (builtins.readFile ../../dotfiles/certs/mfCA.crt) ];
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
}
|
11
hosts/desk/desk_apps.nix
Normal file
11
hosts/desk/desk_apps.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
yt-dlp
|
||||||
|
freetube
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
47
hosts/desk/hardware.nix
Normal file
47
hosts/desk/hardware.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "amdgpu" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/aa4561b3-a61d-4ed9-8847-b88c6fc06525";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/6FD4-7839";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{
|
||||||
|
device = "/var/lib/swapfile";
|
||||||
|
size = 8*1024;
|
||||||
|
}];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
extraPackages = with pkgs; [ amdvlk ];
|
||||||
|
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
43
hosts/desk/kvm.nix
Normal file
43
hosts/desk/kvm.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||||
|
|
||||||
|
virtualisation.libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
qemu.ovmf.enable = true;
|
||||||
|
qemu.runAsRoot = false;
|
||||||
|
onBoot = "ignore";
|
||||||
|
onShutdown = "shutdown";
|
||||||
|
qemu.vhostUserPackages = with pkgs; [ virtiofsd ];
|
||||||
|
hooks.qemu."qemu-hooks" = pkgs.writeShellScript "qemu-hooks" ''
|
||||||
|
export PATH="${lib.makeBinPath [
|
||||||
|
pkgs.bash
|
||||||
|
pkgs.xorg.xset
|
||||||
|
pkgs.coreutils
|
||||||
|
pkgs.util-linux
|
||||||
|
pkgs.i3
|
||||||
|
pkgs.xorg.xrandr
|
||||||
|
pkgs.ddcutil
|
||||||
|
]}:''$PATH"
|
||||||
|
${builtins.readFile ../../dotfiles/qemu/qemu-hooks }
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
users.groups.libvirtd.members = [ "${config.user}" ];
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
boot.kernelParams = [ "amd_iommu=on" "pcie_aspm=off" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "amdgpu" "vfio-pci" ];
|
||||||
|
boot.initrd.preDeviceCommands = ''
|
||||||
|
DEVS="0000:06:00.0 0000:06:00.1"
|
||||||
|
for DEV in $DEVS; do
|
||||||
|
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
|
||||||
|
done
|
||||||
|
modprobe -i vfio-pci
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
1
hosts/htpc/default.nix
Normal file
1
hosts/htpc/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# TODO
|
1
hosts/laptop/default.nix
Normal file
1
hosts/laptop/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# TODO
|
4
hosts/vm_ollama/boot.nix
Normal file
4
hosts/vm_ollama/boot.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
}
|
28
hosts/vm_ollama/default.nix
Normal file
28
hosts/vm_ollama/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ pkgs, inputs, config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./boot.nix
|
||||||
|
./hardware.nix
|
||||||
|
./ollama.nix
|
||||||
|
../../modules/common/default.nix
|
||||||
|
../../modules/common/system-d_boot.nix
|
||||||
|
../../modules/networking/ssh.nix
|
||||||
|
../../modules/networking/hosts.nix
|
||||||
|
../../modules/user
|
||||||
|
../../modules/apps/00_tui_base.nix
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
user = "ollama";
|
||||||
|
host = "vm_ollama";
|
||||||
|
sops_file = "home.yaml";
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
security.pki.certificates = [ (builtins.readFile ../../dotfiles/certs/mfCA.crt) ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
38
hosts/vm_ollama/hardware.nix
Normal file
38
hosts/vm_ollama/hardware.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" "virtio_pci" "xhci_pci" "virtio_scsi" "sr_mod" "virtio_blk" "amdgpu" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
services.qemuGuest.enable = true;
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/a1324d7d-aa2d-4fc8-9ec7-797ef1537c30";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/69C2-3355";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
39
hosts/vm_ollama/ollama.nix
Normal file
39
hosts/vm_ollama/ollama.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
config = {
|
||||||
|
|
||||||
|
fileSystems."/mnt/ollama_models" =
|
||||||
|
{ device = "ollama_models";
|
||||||
|
fsType = "virtiofs";
|
||||||
|
options = [ "nosuid" "nodev" "nofail" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
rocmPackages_6.clr.icd
|
||||||
|
rocmPackages_6.rocminfo
|
||||||
|
rocmPackages_6.rocm-smi
|
||||||
|
rocmPackages_6.rocm-device-libs
|
||||||
|
radeontop
|
||||||
|
clinfo
|
||||||
|
amdvlk
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.ollama.extraGroups = [ "render" "video" ];
|
||||||
|
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
acceleration = "rocm";
|
||||||
|
host = "0.0.0.0";
|
||||||
|
port = 11357;
|
||||||
|
openFirewall = true;
|
||||||
|
models = "/mnt/ollama_models/";
|
||||||
|
rocmOverrideGfx = "10.3.0";
|
||||||
|
environmentVariables = {
|
||||||
|
OLLAMA_KEEP_ALIVE="15m";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.variables.OLLAMA_HOST = "0.0.0.0:11357";
|
||||||
|
};
|
||||||
|
}
|
18
hosts/vps_fz/boot.nix
Normal file
18
hosts/vps_fz/boot.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.device = "/dev/vda";
|
||||||
|
boot.loader.grub.useOSProber = false;
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-c2ab1085-f8ec-49df-a26b-ece597abc3b7".device = "/dev/disk/by-uuid/c2ab1085-f8ec-49df-a26b-ece597abc3b7";
|
||||||
|
# Setup keyfile
|
||||||
|
boot.initrd.secrets = {
|
||||||
|
"/boot/crypto_keyfile.bin" = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.loader.grub.enableCryptodisk = true;
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-938c9dc1-9c55-4152-bc69-4d8770518c90".keyFile = "/boot/crypto_keyfile.bin";
|
||||||
|
boot.initrd.luks.devices."luks-c2ab1085-f8ec-49df-a26b-ece597abc3b7".keyFile = "/boot/crypto_keyfile.bin";
|
||||||
|
# boot.loader.systemd-boot.enable = true;
|
||||||
|
# boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
}
|
35
hosts/vps_fz/default.nix
Normal file
35
hosts/vps_fz/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ pkgs, inputs, config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./boot.nix
|
||||||
|
./hardware.nix
|
||||||
|
./server_config.nix
|
||||||
|
../../modules/common
|
||||||
|
../../modules/networking/ssh.nix
|
||||||
|
../../modules/user
|
||||||
|
../../modules/apps/00_tui_base.nix
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
### USER ###
|
||||||
|
user = "vps_fz";
|
||||||
|
host = "vps_fz";
|
||||||
|
sops_file = "vps_fz.yaml";
|
||||||
|
|
||||||
|
|
||||||
|
### NETWORKING ###
|
||||||
|
networking.enableIPv6 = false;
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = [ 80 443 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
35
hosts/vps_fz/hardware.nix
Normal file
35
hosts/vps_fz/hardware.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/0b1c3bc9-4332-4950-bc20-20e7eb8aa003";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-938c9dc1-9c55-4152-bc69-4d8770518c90".device = "/dev/disk/by-uuid/938c9dc1-9c55-4152-bc69-4d8770518c90";
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/7961b651-0b10-4fbf-a429-8e53a2b67b34"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
40
hosts/vps_fz/server_config.nix
Normal file
40
hosts/vps_fz/server_config.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ pkgs, inputs, config, lib, ... }: {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
# fail2ban
|
||||||
|
services.fail2ban.enable = true;
|
||||||
|
services.openssh.settings.LogLevel = "VERBOSE";
|
||||||
|
|
||||||
|
|
||||||
|
# caddy
|
||||||
|
services.caddy = {
|
||||||
|
enable = true;
|
||||||
|
configFile = ../../dotfiles/caddy/Caddyfile;
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
|
||||||
|
# gitea
|
||||||
|
sops.secrets."gitea_dbpass" = {
|
||||||
|
owner = "gitea";
|
||||||
|
group = "gitea";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gitea = {
|
||||||
|
enable = true;
|
||||||
|
database = {
|
||||||
|
type = "postgres";
|
||||||
|
passwordFile = config.sops.secrets."gitea_dbpass".path;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = "gitea.fredzernia.com";
|
||||||
|
ROOT_URL = "https://gitea.fredzernia.com";
|
||||||
|
HTTP_PORT = 7904;
|
||||||
|
};
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
94
modules/apps/00_tui_base.nix
Normal file
94
modules/apps/00_tui_base.nix
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
# basic tui apps and configs for headless setup
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
mergedBashFiles = pkgs.symlinkJoin {
|
||||||
|
name = "merged-bash-files";
|
||||||
|
paths = [
|
||||||
|
../../dotfiles/bash_files/all_hosts
|
||||||
|
../../dotfiles/bash_files/${config.host}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
environment.variables = {
|
||||||
|
NIXHOST = "${config.host}";
|
||||||
|
EDITOR = "nvim";
|
||||||
|
BAT_THEME = "gruvbox-dark";
|
||||||
|
};
|
||||||
|
system.tools.nixos-option.enable = true;
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
bat
|
||||||
|
git
|
||||||
|
htop
|
||||||
|
nixpkgs-fmt
|
||||||
|
nodejs # astronvim ls, formatters, etc
|
||||||
|
ripgrep # text search in nvim
|
||||||
|
jq
|
||||||
|
file
|
||||||
|
wget
|
||||||
|
unzip
|
||||||
|
rclone
|
||||||
|
killall
|
||||||
|
tree
|
||||||
|
lm_sensors
|
||||||
|
autogen
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
vimAlias = true;
|
||||||
|
viAlias = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs; [
|
||||||
|
tmuxPlugins.continuum
|
||||||
|
tmuxPlugins.resurrect
|
||||||
|
tmuxPlugins.sensible
|
||||||
|
];
|
||||||
|
};
|
||||||
|
xdg.configFile.nvim = {
|
||||||
|
recursive = true;
|
||||||
|
source = ../../dotfiles/nvim;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
".profile" = {
|
||||||
|
text = ''
|
||||||
|
source ~/.bashrc
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.file = {
|
||||||
|
".bashrc" = {
|
||||||
|
text = ''
|
||||||
|
BASH_DIR=~/.bash_files
|
||||||
|
|
||||||
|
# Check if the directory exists
|
||||||
|
if [ -d "$BASH_DIR" ]; then
|
||||||
|
# Loop through each file in the directory
|
||||||
|
for file in "$BASH_DIR"/*; do
|
||||||
|
# Check if it's a regular file (not a directory)
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
# Source the file
|
||||||
|
. "$file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.file.".bash_files" = {
|
||||||
|
recursive = true;
|
||||||
|
source = mergedBashFiles;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
17
modules/apps/01_tui_advance.nix
Normal file
17
modules/apps/01_tui_advance.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# advanced tui apps beyond the scope of basic headless
|
||||||
|
{ config, ... }: {
|
||||||
|
|
||||||
|
imports = [ ./00_tui_base.nix ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
tealdeer
|
||||||
|
gocryptfs
|
||||||
|
pciutils
|
||||||
|
usbutils
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
51
modules/apps/02_gui_base_apps.nix
Normal file
51
modules/apps/02_gui_base_apps.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
# normal gui apps for any DE
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
|
imports = [ ./55_firefox.nix ./01_tui_advance.nix ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Adwaita:dark";
|
||||||
|
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
keepassxc
|
||||||
|
solaar
|
||||||
|
obsidian
|
||||||
|
signal-desktop
|
||||||
|
discord
|
||||||
|
steam
|
||||||
|
vlc
|
||||||
|
mpv
|
||||||
|
tigervnc
|
||||||
|
deluge-gtk
|
||||||
|
libreoffice
|
||||||
|
hunspell
|
||||||
|
hunspellDicts.en_US
|
||||||
|
ungoogled-chromium
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile.solaar = {
|
||||||
|
recursive = true;
|
||||||
|
source = ../../dotfiles/solaar;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
input-remapper
|
||||||
|
gparted
|
||||||
|
];
|
||||||
|
|
||||||
|
services.input-remapper.enable = true;
|
||||||
|
hardware.logitech.wireless.enable = true;
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerd-fonts.droid-sans-mono
|
||||||
|
hack-font
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
93
modules/apps/55_firefox.nix
Normal file
93
modules/apps/55_firefox.nix
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
{ config, pkgs, firefox-addons, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
autoconfigCfg = pkgs.writeText "autoconfig.cfg" ''
|
||||||
|
var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
|
||||||
|
/* set new tab page */
|
||||||
|
try {
|
||||||
|
ChromeUtils.defineESModuleGetters(this, {
|
||||||
|
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||||
|
});
|
||||||
|
var newTabURL = "https://mainframe.local/mainframe.html";
|
||||||
|
AboutNewTab.newTabURL = newTabURL;
|
||||||
|
} catch(e){Cu.reportError(e);} // report errors in the Browser Console
|
||||||
|
'';
|
||||||
|
|
||||||
|
autoconfigJs = pkgs.writeText "autoconfig.js" ''
|
||||||
|
pref("general.config.filename", "autoconfig.cfg");
|
||||||
|
pref("general.config.obscure_value", 0);
|
||||||
|
pref("general.config.sandbox_enabled", false);
|
||||||
|
'';
|
||||||
|
|
||||||
|
firefoxWithAutoconfig = pkgs.firefox.overrideAttrs (oldAttrs: {
|
||||||
|
buildCommand = oldAttrs.buildCommand + ''
|
||||||
|
# Copy autoconfig files to the Firefox installation
|
||||||
|
cp ${autoconfigJs} $out/lib/firefox/defaults/pref/autoconfig.js
|
||||||
|
cp ${autoconfigCfg} $out/lib/firefox/autoconfig.cfg
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
in {
|
||||||
|
config = {
|
||||||
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = firefoxWithAutoconfig;
|
||||||
|
profiles.default = {
|
||||||
|
settings = {
|
||||||
|
"browser.startup.homepage" = "https://mainframe.local/mainframe.html";
|
||||||
|
"sidebar.verticalTabs" = true;
|
||||||
|
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||||
|
"browser.contentblocking.category" = { Value = "strict"; Status = "locked"; };
|
||||||
|
"toolkit.telemetry.server" = "127.0.0.1";
|
||||||
|
"toolkit.telemetry.server_owner" = "localhost";
|
||||||
|
"extensions.pocket.enabled" = false;
|
||||||
|
"extensions.screenshots.disabled" = true;
|
||||||
|
"browser.topsites.contile.enabled" = false;
|
||||||
|
"browser.formfill.enable" = false;
|
||||||
|
"browser.search.suggest.enabled" = false;
|
||||||
|
"browser.search.suggest.enabled.private" = false;
|
||||||
|
"browser.urlbar.suggest.searches" = false;
|
||||||
|
"browser.urlbar.showSearchSuggestionsFirst" = false;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.snippets" = false;
|
||||||
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
||||||
|
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
|
||||||
|
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
|
||||||
|
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
|
||||||
|
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||||
|
"browser.newtabpage.activity-stream.system.showSponsored" = false;
|
||||||
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||||
|
|
||||||
|
};
|
||||||
|
extensions.packages = with firefox-addons; [
|
||||||
|
noscript
|
||||||
|
ublock-origin
|
||||||
|
sponsorblock
|
||||||
|
];
|
||||||
|
};
|
||||||
|
policies = {
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
};
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableFirefoxAccounts = true;
|
||||||
|
DisableAccounts = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
|
OverrideFirstRunPage = "";
|
||||||
|
OverridePostUpdatePage = "";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
|
||||||
|
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||||
|
SearchBar = "unified"; # alternative: "separate"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
119
modules/apps/99_i3_config.nix
Normal file
119
modules/apps/99_i3_config.nix
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
# i3 config
|
||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
imports = [ ./02_gui_base_apps.nix ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
users.users.${config.user} = {
|
||||||
|
extraGroups = [ "networkmanager" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
security.pam.services.i3lock.enable = true;
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
home-manager.users.${config.user} = { pkgs, config, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
xorg.setxkbmap
|
||||||
|
xbindkeys
|
||||||
|
xdotool
|
||||||
|
networkmanagerapplet
|
||||||
|
arandr
|
||||||
|
volumeicon
|
||||||
|
xclip
|
||||||
|
feh
|
||||||
|
xorg.xev
|
||||||
|
xfce.xfce4-screenshooter
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs; [
|
||||||
|
rofi-calc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile.i3 = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/i3";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile.i3blocks = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/i3blocks";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile.volumeicon = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/volumeicon";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".xbindkeysrc" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/xbindkeys/xbindkeysrc";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."gtk-3.0" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/gtk-3.0";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".xprofile" = {
|
||||||
|
source = ../../dotfiles/xprofile/xprofile;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/Thunar/uca.xml" = {
|
||||||
|
source = ../../dotfiles/thunar/uca.xml;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/xfce4/xfconf/xfce-perchannel-xml" = {
|
||||||
|
recursive = true;
|
||||||
|
source = ../../dotfiles/xfce-perchannel-xml;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
".Xresources" = {
|
||||||
|
text = ''
|
||||||
|
Xcursor.size: 16
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
displayManager = {
|
||||||
|
defaultSession = "xfce+i3"; # move this to host specific config?
|
||||||
|
};
|
||||||
|
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
videoDrivers = [ "amdgpu" ];
|
||||||
|
xkb.layout = "us";
|
||||||
|
|
||||||
|
desktopManager = {
|
||||||
|
xterm.enable = false;
|
||||||
|
xfce = {
|
||||||
|
enable = true;
|
||||||
|
noDesktop = true;
|
||||||
|
enableXfwm = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
windowManager = {
|
||||||
|
i3 = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
i3status
|
||||||
|
i3lock
|
||||||
|
i3blocks
|
||||||
|
rofi
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
pulseaudio.enable = false;
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
security.rtkit.enable = true; # needed for pipewire/PA
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
34
modules/common/default.nix
Normal file
34
modules/common/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
user = lib.mkOption {
|
||||||
|
default = "${config.user}";
|
||||||
|
description = "user";
|
||||||
|
};
|
||||||
|
|
||||||
|
host = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "host";
|
||||||
|
};
|
||||||
|
|
||||||
|
sops_file = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "SOPS filename";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
services.cron.enable = true;
|
||||||
|
|
||||||
|
# sops
|
||||||
|
environment.systemPackages = with pkgs; [ sops ];
|
||||||
|
sops.age.keyFile = "${config.users.users.${config.user}.home}/.config/sops/age/keys.txt";
|
||||||
|
sops.defaultSopsFile = ../../secrets/${config.sops_file};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
5
modules/common/system-d_boot.nix
Normal file
5
modules/common/system-d_boot.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
}
|
||||||
|
|
21
modules/dev/docker.nix
Normal file
21
modules/dev/docker.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
docker-compose
|
||||||
|
ctop
|
||||||
|
];
|
||||||
|
};
|
||||||
|
users.extraUsers.${config.user}.extraGroups = [ "docker" ];
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
rootless = {
|
||||||
|
#enable = false;
|
||||||
|
enable = true;
|
||||||
|
setSocketVariable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
15
modules/dev/ruby.nix
Normal file
15
modules/dev/ruby.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
ruby_3_4
|
||||||
|
#bundler
|
||||||
|
];
|
||||||
|
};
|
||||||
|
environment.variables = {
|
||||||
|
RUBY_VERSION = "3.4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
16
modules/misc/polkit.nix
Normal file
16
modules/misc/polkit.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
security.polkit.enable = true;
|
||||||
|
security.polkit.extraConfig = ''
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if ((action.id == "org.xfce.thunar" ||
|
||||||
|
action.id == "org.freedesktop.policykit.exec" ||
|
||||||
|
action.id == "org.gnome.gparted" ||
|
||||||
|
action.id == "org.freedesktop.udisks2.filesystem-mount-system") &&
|
||||||
|
subject.isInGroup("wheel"))
|
||||||
|
{
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
}
|
28
modules/networking/ssh.nix
Normal file
28
modules/networking/ssh.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 1876 ];
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sops.secrets."ssh_pubkeys" = {
|
||||||
|
path = "/home/${config.user}/.ssh/authorized_keys";
|
||||||
|
owner = "${config.user}";
|
||||||
|
group = "users";
|
||||||
|
mode = "0600";
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = { pkgs, config, ... }: {
|
||||||
|
home.file.".ssh/config" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/ssh/${config.home.username}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
15
modules/user/default.nix
Normal file
15
modules/user/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
config = {
|
||||||
|
home-manager.users.${config.user} = { pkgs, ... }: {
|
||||||
|
home.stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.${config.user} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "${config.user}";
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
25
secrets/home.yaml
Normal file
25
secrets/home.yaml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
ssh_pubkeys: ENC[AES256_GCM,data:nw/z2/N5NH2qHw5uBod388wxWBu4Xr8ntaOyDQxsktlL4liNtDlb9DtW2E8GNqxuqp8KvI4bkrfZSRW1pqL6uNwp136kpLow3x6qH4EOJMqMnuSyLvM3xW7C367v//w2xRse++iwxe9d9nFPpvN+BGyir4JgRoWPeJk65bvA82IZr5BQYU7icKSPxrvBTO0EJk3A2Te1U9K9AZ3/geulQgBWr6XTXa6DIh2dRlG0bsH9WvrG9z60WAUpC27wqVg2KZymkDHeBppszCkkYQwsmdQU2zokjlHB15iEf9Y4OWQROUYMkwjUsy7SOm/9GabOtun2lgnxTzIAqH7S81pymMvPgqlxXi9zoozWO2RE25ypczTLW4HE6OKTnRbJvaPT,iv:o4g6VBjgXVfYdmqihqiVcqcZwAnswN9tVgkwm51ksIY=,tag:LxV9Nc/J7W+TA/kFMWKzOA==,type:str]
|
||||||
|
sops:
|
||||||
|
age:
|
||||||
|
- recipient: age1e5f5y457qf8v47f8zef0xk60hvxnljkun00em9f24m2r74lfgumsf89lm8
|
||||||
|
enc: |
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAzbzlyTmpvU09IZUwvMVNp
|
||||||
|
NlgzQlRsWk9QbnU5djgyUGxjS3JBeDh1aWdZCjBjeUE2Nnl1aDlPeFEvaFhsTHRF
|
||||||
|
K0dRZTVBV3c1aXoxbitwaG1hWE1pM3cKLS0tIDZ4Y1RwM1VSQ3lpdVN5Y0YwUVc2
|
||||||
|
NHpXTGx5NThKZjdWU2c5QWYrelZidjQKxoY2YwzxcJKUR+1MViB6xzrrbUrZKWbF
|
||||||
|
k7d0DQfC070T5Qja4l4EaZprYYVY28eXMBtZdkf/dLn463qk5AS+Vw==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
- recipient: age1wssgsgxq52nwx9wely9xlzf4g0dplpe04gfrwxz6rxdjn9lyzq8sxfzt3r
|
||||||
|
enc: |
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnUVRSdFBUMnJnSytXK2Rt
|
||||||
|
RHpQWVVCK2k0dE5xejU1TUQrYWExUTJnckV3Ckl3UlorYmE5d0lRNUpjVE9XbnJu
|
||||||
|
UWFXbFViNDlDV0RPVmQrTzkyZGR6OFEKLS0tIE1lQmVjTWdDRTZsOVJUalJQYzMy
|
||||||
|
cE5VcS85SzB4K3RKVDFKVEhZR2tPYUkKZ1Lj92EQ6kgoNJQvpTDLoKdufzWqCDZp
|
||||||
|
WGtSglrYX4D/z/M0p2U+JJOfPQqsjo9KYWfxMmv4mNztOnKW1iG0xg==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
lastmodified: "2025-06-11T18:49:56Z"
|
||||||
|
mac: ENC[AES256_GCM,data:kbrjaEdFa5WJG72pFx6cBO/nkzqyxp2yVzH/liShU7FBcD1KgLu003gmVVdS8zZEUyE0GffZMsfp+zOy+vQt04rDm1Awa+dSAGyqXK+vWvphCcqFGgMy6I64D25NBKkpRM1lWGZ3vXOd+OO6B98Wh+zV2JY9KuO+Kf4pYcfu/I8=,iv:wIHAii+nQdaD/mVKq8cAg6HRdxPhA5LsJ8+YRX4jvn8=,tag:KMOBLAO49bBMqbBly97x/A==,type:str]
|
||||||
|
unencrypted_suffix: _unencrypted
|
||||||
|
version: 3.10.2
|
17
secrets/vps_fz.yaml
Normal file
17
secrets/vps_fz.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
gitea_dbpass: ENC[AES256_GCM,data:fCr60VtS0NaLaZb0baj5aS7ZFqAgcoCK0/QaCuI6,iv:JK3NmhXptiGGEydC6G8gKcHWKphTIQe29Ljfxgd3gC0=,tag:UzVLAz8n/H37LBjL3nYcaw==,type:str]
|
||||||
|
ssh_pubkeys: ENC[AES256_GCM,data:+zh43NXbTTaHuhk9CkK3vHXc3yJabxGU9gKs3LXWIqO91oeO4jNRYJzjKtp9pFCz9tUzIwMEurNexA2Xf6lC+D58LbVbC+zqZTH4OEa4eolmYn+LtkU=,iv:J4kHaO5fyIKvydFYrkfSQblDJqdMO4y3h27dRsvt1wk=,tag:me8BuYv/os31f7Yfw62/tQ==,type:str]
|
||||||
|
sops:
|
||||||
|
age:
|
||||||
|
- recipient: age10my3wq83rrm6eqn3t37nxfjhzg5rpqr56laze6uf5zqqdwvwcylsafsuer
|
||||||
|
enc: |
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBQVVY2Ky9OTTZCdU01MjhE
|
||||||
|
UUxYM3h1TUtNU0hNd0MzSlNYM1VBbXBCcjBzCkQzK2RuYXNzTHh4dEZ5MHEzL3Bm
|
||||||
|
YTZKQ1lnbjJOU2h6K1A4aXkzbUcyTUkKLS0tIEFRd3ZXLzdZTWZMRFJ1ajZvR3lB
|
||||||
|
R0Z0d1Q5WmlMais5S3REWUg5TlAxeEUKuuzMJrqqCd4yTC13969FCtT9bgl9Xtqe
|
||||||
|
hF/omw/YfEqRDfLmDxXrQnVwir+Az8n37qhrS67CqSLdHqALQlRLMA==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
lastmodified: "2025-06-11T22:27:06Z"
|
||||||
|
mac: ENC[AES256_GCM,data:5jgaAWW7NeuJGujWBvPxFqtweYOyq3PnhxLa/8KkKsMSWqN6r9zEskR8yFsnWs67HTlqn0gH2h0LZHxXUF587p7dDNLFopCI6j/MNkYLAPENuG7cU17Wl/ygbtM/3MIH/Dhvqt4Ldr9cbDnlZdF50Zug9mD24vfXWqgy1uJvzvA=,iv:qnJTuZtLZAH6TzgpLxvLnmPv8m7lQat974IU8GbWos8=,tag:TAvdhmC9vK7O+1PpqqTvSQ==,type:str]
|
||||||
|
unencrypted_suffix: _unencrypted
|
||||||
|
version: 3.10.2
|
Loading…
Add table
Add a link
Reference in a new issue