diff --git a/dotfiles/foot/catppuccin-frappe.ini b/dotfiles/foot/catppuccin-frappe.ini deleted file mode 100755 index 6bb7093..0000000 --- a/dotfiles/foot/catppuccin-frappe.ini +++ /dev/null @@ -1,34 +0,0 @@ -[colors] -cursor=232634 f2d5cf -foreground=c6d0f5 -background=303446 - -regular0=51576d -regular1=e78284 -regular2=a6d189 -regular3=e5c890 -regular4=8caaee -regular5=f4b8e4 -regular6=81c8be -regular7=b5bfe2 - -bright0=626880 -bright1=e78284 -bright2=a6d189 -bright3=e5c890 -bright4=8caaee -bright5=f4b8e4 -bright6=81c8be -bright7=a5adce - -16=ef9f76 -17=f2d5cf - -selection-foreground=c6d0f5 -selection-background=4f5369 - -search-box-no-match=232634 e78284 -search-box-match=c6d0f5 414559 - -jump-labels=232634 ef9f76 -urls=8caaee diff --git a/dotfiles/foot/catppuccin-latte.ini b/dotfiles/foot/catppuccin-latte.ini deleted file mode 100755 index f5e1051..0000000 --- a/dotfiles/foot/catppuccin-latte.ini +++ /dev/null @@ -1,34 +0,0 @@ -[colors-light] -cursor=eff1f5 dc8a78 -foreground=4c4f69 -background=eff1f5 - -regular0=5c5f77 -regular1=d20f39 -regular2=40a02b -regular3=df8e1d -regular4=1e66f5 -regular5=ea76cb -regular6=179299 -regular7=acb0be - -bright0=6c6f85 -bright1=d20f39 -bright2=40a02b -bright3=df8e1d -bright4=1e66f5 -bright5=ea76cb -bright6=179299 -bright7=bcc0cc - -16=fe640b -17=dc8a78 - -selection-foreground=4c4f69 -selection-background=ccced7 - -search-box-no-match=dce0e8 d20f39 -search-box-match=4c4f69 ccd0da - -jump-labels=dce0e8 fe640b -urls=1e66f5 diff --git a/dotfiles/foot/catppuccin-macchiato.ini b/dotfiles/foot/catppuccin-macchiato.ini deleted file mode 100755 index 0a4a718..0000000 --- a/dotfiles/foot/catppuccin-macchiato.ini +++ /dev/null @@ -1,34 +0,0 @@ -[colors] -cursor=181926 f4dbd6 -foreground=cad3f5 -background=24273a - -regular0=494d64 -regular1=ed8796 -regular2=a6da95 -regular3=eed49f -regular4=8aadf4 -regular5=f5bde6 -regular6=8bd5ca -regular7=b8c0e0 - -bright0=5b6078 -bright1=ed8796 -bright2=a6da95 -bright3=eed49f -bright4=8aadf4 -bright5=f5bde6 -bright6=8bd5ca -bright7=a5adcb - -16=f5a97f -17=f4dbd6 - -selection-foreground=cad3f5 -selection-background=454a5f - -search-box-no-match=181926 ed8796 -search-box-match=cad3f5 363a4f - -jump-labels=181926 f5a97f -urls=8aadf4 diff --git a/dotfiles/foot/catppuccin-mocha.ini b/dotfiles/foot/catppuccin-mocha.ini deleted file mode 100755 index 201f91c..0000000 --- a/dotfiles/foot/catppuccin-mocha.ini +++ /dev/null @@ -1,34 +0,0 @@ -[colors-dark] -cursor=11111b f5e0dc -foreground=cdd6f4 -background=1e1e2e - -regular0=45475a -regular1=f38ba8 -regular2=a6e3a1 -regular3=f9e2af -regular4=89b4fa -regular5=f5c2e7 -regular6=94e2d5 -regular7=bac2de - -bright0=585b70 -bright1=f38ba8 -bright2=a6e3a1 -bright3=f9e2af -bright4=89b4fa -bright5=f5c2e7 -bright6=94e2d5 -bright7=a6adc8 - -16=fab387 -17=f5e0dc - -selection-foreground=cdd6f4 -selection-background=414356 - -search-box-no-match=11111b f38ba8 -search-box-match=cdd6f4 313244 - -jump-labels=11111b fab387 -urls=89b4fa diff --git a/dotfiles/foot/dank-colors.ini b/dotfiles/foot/dank-colors.ini deleted file mode 100755 index 355fa0e..0000000 --- a/dotfiles/foot/dank-colors.ini +++ /dev/null @@ -1,25 +0,0 @@ -[colors-dark] -foreground=e4e2e1 -background=131313 -selection-foreground=e4e2e1 -selection-background=11201d -cursor = 131313 b9cac5 - -regular0=131313 -regular1=e89268 -regular2=65ca6a -regular3=fcf071 -regular4=acbfba -regular5=4f5d59 -regular6=b9cac5 -regular7=c7d4d0 -bright0=798380 -bright1=ffbe9f -bright2=9df2a2 -bright3=fff7a5 -bright4=ceded9 -bright5=effffa -bright6=f5fffc -bright7=f8fffd - -dim-blend-towards=black diff --git a/dotfiles/foot/foot.ini b/dotfiles/foot/foot.ini deleted file mode 100755 index d204548..0000000 --- a/dotfiles/foot/foot.ini +++ /dev/null @@ -1,20 +0,0 @@ -[main] -font=JetBrains Mono:size=12 -pad=15x15 -include=~/.config/foot/paper-color.ini -include=~/.config/foot/matugen.ini - -[csd] -size=0 - -[cursor] -blink=true -style=beam - -[key-bindings] -show-urls-copy=Control+Shift+y -show-urls-launch=Control+Shift+g -color-theme-toggle=Control+comma - -[mouse] -hide-when-typing=yes diff --git a/dotfiles/foot/matugen.ini b/dotfiles/foot/matugen.ini deleted file mode 100755 index e6518ac..0000000 --- a/dotfiles/foot/matugen.ini +++ /dev/null @@ -1,2 +0,0 @@ -initial-color-theme=dark - diff --git a/dotfiles/foot/paper-color.ini b/dotfiles/foot/paper-color.ini deleted file mode 100755 index 0993492..0000000 --- a/dotfiles/foot/paper-color.ini +++ /dev/null @@ -1,49 +0,0 @@ -# -*- conf -*- -# PaperColorDark -# Palette based on https://github.com/NLKNguyen/papercolor-theme - -[colors-dark] -cursor=1c1c1c eeeeee -background=1c1c1c -foreground=eeeeee -regular0=1c1c1c # black -regular1=af005f # red -regular2=5faf00 # green -regular3=d7af5f # yellow -regular4=5fafd7 # blue -regular5=808080 # magenta -regular6=d7875f # cyan -regular7=d0d0d0 # white -bright0=bcbcbc # bright black -bright1=5faf5f # bright red -bright2=afd700 # bright green -bright3=af87d7 # bright yellow -bright4=ffaf00 # bright blue -bright5=ff5faf # bright magenta -bright6=00afaf # bright cyan -bright7=5f8787 # bright white -# selection-foreground=1c1c1c -# selection-background=af87d7 - -[colors-light] -cursor=eeeeee 444444 -background=eeeeee -foreground=444444 -regular0=eeeeee # black -regular1=af0000 # red -regular2=008700 # green -regular3=5f8700 # yellow -regular4=0087af # blue -regular5=878787 # magenta -regular6=005f87 # cyan -regular7=764e37 # white -bright0=bcbcbc # bright black -bright1=d70000 # bright red -bright2=d70087 # bright green -bright3=8700af # bright yellow -bright4=d75f00 # bright blue -bright5=d75f00 # bright magenta -bright6=4c7a5d # bright cyan -bright7=005faf # bright white -# selection-foreground=eeeeee -# selection-background=0087af diff --git a/dotfiles/neomutt/bindings.neomuttrc b/dotfiles/neomutt/bindings.neomuttrc deleted file mode 100755 index 833af0d..0000000 --- a/dotfiles/neomutt/bindings.neomuttrc +++ /dev/null @@ -1,16 +0,0 @@ - -# compose - -macro index,pager go "mbsync $my_account && notmuch new" "Sync this account" -macro index,pager gO "mbsync -a && notmuch new" "Sync all accounts" - -bind index,pager / noop -macro index,pager // "folder:/$my_account/" "Find in account" -macro index,pager g/ "" "Find in all accounts" -macro index,pager /! "folder:+$my_account/$my_nm_spoolfile" "Find in inbox" -macro index,pager /< "folder:+$my_account/$my_nm_record" "Find in sent" -macro index,pager /> "folder:+$my_account/$my_nm_mbox" "Find in archive" -macro index,pager /d "folder:+$my_account/$my_nm_postponed" "Find in drafts" -macro index,pager /t "folder:+$my_account/$my_nm_trash" "Find in trash" -macro index,pager /j "folder:+$my_account/$my_nm_junk" "Find in junk" - diff --git a/dotfiles/neomutt/colors.neomuttrc b/dotfiles/neomutt/colors.neomuttrc deleted file mode 100755 index 424a3e0..0000000 --- a/dotfiles/neomutt/colors.neomuttrc +++ /dev/null @@ -1,27 +0,0 @@ -# color index_flags brightmagenta default '.*' -# color index_date cyan default -color header brightblack default ".*" -color header brightgreen default "^(Subject)" -color header yellow default "^(From|To|CC|BCC)" -color header blue default "^Date" -color message cyan default -color error red default -color tilde black default -color normal default default -color attachment brightblack default -color search black yellow -color quoted green default -color quoted1 blue default -color quoted2 cyan default -color quoted3 yellow default -color quoted4 red default -color quoted5 brightred default -color signature cyan default -color underline black default -color body blue default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses -color body blue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL -color body red default "(BAD signature)" -color body green default "(Good signature)" -color body brightblack default "^gpg: .*" -color body green default "^gpg: Good signature .*" -color body red default "^gpg: BAD signature from.*" diff --git a/dotfiles/neomutt/config.neomuttrc b/dotfiles/neomutt/config.neomuttrc deleted file mode 100755 index f7408be..0000000 --- a/dotfiles/neomutt/config.neomuttrc +++ /dev/null @@ -1,43 +0,0 @@ -# External - -set my_download_folder = ~/tmp - -# Status bar - -set status_chars = "✔↻٪A" -unset help - -# Index - -set index_format = "%-25.25F %<[y?%<[7d?%<[d?%[ %H:%M]&%[%a %H:%M]>&%[%d.%m. %Hh]>&%[%d.%m.%Y]> %Z %?X?▼ &?%s" -set strict_threads -set send_charset = "utf-8:iso-8859-1:us-ascii" -set charset = "utf-8" - -# Pager view - -set pager_index_lines = 10 -set pager_context = 3 -set pager_stop -set smart_wrap -set menu_scroll -set tilde -unset markers -ignore * -unignore from: to: cc: bcc: date: subject: -unhdr_order * -hdr_order from: to: cc: bcc: date: subject: -alternative_order text/plain text/enriched text/html -auto_view text/html - -# Attachments - -set rfc2047_parameters -set attach_save_dir = $my_download_folder - -# Alias - -set alias_file = ~/.local/share/neomutt/aliases.neomuttrc -source $alias_file - -source colors.neomuttrc diff --git a/dotfiles/niri/config.kdl b/dotfiles/niri/config.kdl deleted file mode 100755 index bf021a7..0000000 --- a/dotfiles/niri/config.kdl +++ /dev/null @@ -1,203 +0,0 @@ -/-output "eDP-1" { - mode "1920x1080@120.030" - scale 2 - transform "normal" - position x=1280 y=0 -} - -layout { - preset-column-widths { - proportion 0.381966 - proportion 0.5 - proportion 0.618034 - } - default-column-width { proportion 0.5; } -} - -environment { - TERMINAL "foot" - XDG_CURRENT_DESKTOP "niri" -} - -hotkey-overlay { - skip-at-startup -} - -prefer-no-csd - -screenshot-path "~/media/img/screenshots/screenshot_%Y-%m-%d_%H-%M-%S.png" - -// debug { -// honor-xdg-activation-with-invalid-serial -// } - -recent-windows { - binds { - Super+Tab { next-window scope="output"; } - Super+Shift+Tab { previous-window scope="output"; } - Super+grave { next-window filter="app-id"; } - Super+Shift+grave { previous-window filter="app-id"; } - } -} - -animations { - - workspace-switch { - spring damping-ratio=0.9 stiffness=2000 epsilon=0.001 - } - - window-open { - duration-ms 50 - curve "ease-out-expo" - } - - window-close { - duration-ms 50 - curve "ease-out-quad" - } - - horizontal-view-movement { - spring damping-ratio=0.9 stiffness=2000 epsilon=0.001 - } - - window-movement { - // spring damping-ratio=0.75 stiffness=323 epsilon=0.0001 - spring damping-ratio=0.9 stiffness=2000 epsilon=0.001 - } - - window-resize { - spring damping-ratio=0.9 stiffness=2000 epsilon=0.001 - } - - config-notification-open-close { - spring damping-ratio=0.9 stiffness=2000 epsilon=0.001 - } - - screenshot-ui-open { - duration-ms 50 - curve "ease-out-quad" - } - - overview-open-close { - spring damping-ratio=0.9 stiffness=2000 epsilon=0.001 - } -} - -input { - keyboard { - xkb { - layout "us,de,th" - variant "altgr-intl" - options "grp:alt_space_toggle" - } - numlock - } - - touchpad { - tap - natural-scroll - click-method "clickfinger" - } - - trackball { - natural-scroll - accel-speed -0.3 - } - - mouse { - } - - trackpoint { - } - - // warp-mouse-to-focus - focus-follows-mouse max-scroll-amount="0%" -} - -layer-rule { - match namespace="^quickshell$" - place-within-backdrop false -} - -layer-rule { - match namespace="dms:blurwallpaper" - place-within-backdrop true -} - -window-rule { - match app-id=r#"^org\.wezfurlong\.wezterm$"# - default-column-width {} -} - -window-rule { - match app-id=r#"^org\.gnome\."# - draw-border-with-background false - geometry-corner-radius 12 - clip-to-geometry true -} - -window-rule { - match app-id=r#"^gnome-control-center$"# - match app-id=r#"^pavucontrol$"# - match app-id=r#"^nm-connection-editor$"# - default-column-width { proportion 0.5; } - open-floating false -} - -window-rule { - match app-id=r#"^gnome-calculator$"# - match app-id=r#"^galculator$"# - match app-id=r#"^blueman-manager$"# - match app-id=r#"^org\.gnome\.Nautilus$"# - match app-id=r#"^xdg-desktop-portal$"# - open-floating true -} - -window-rule { - match app-id=r#"^steam$"# title=r#"^notificationtoasts_\d+_desktop$"# - default-floating-position x=10 y=10 relative-to="bottom-right" - open-focused false -} - -window-rule { - match app-id=r#"^org\.wezfurlong\.wezterm$"# - match app-id="Alacritty" - match app-id="zen" - match app-id="com.mitchellh.ghostty" - match app-id="kitty" - draw-border-with-background false -} - -window-rule { - match app-id=r#"firefox$"# title="^Picture-in-Picture$" - match app-id="zoom" - open-floating true -} - -window-rule { - match app-id="firefox" - default-column-width {} - open-on-workspace "browser" -} - -window-rule { - match app-id=r#"org.quickshell$"# - open-floating true -} - -window-rule { - match app-id=r#"org.quickshell$"# title="^Settings$" - open-floating false -} - -// include optional=true "user-config.kdl" -include "user-config.kdl" - - -// Include dms files -include "dms/colors.kdl" -include "dms/layout.kdl" -include "dms/alttab.kdl" -include "dms/outputs.kdl" -include "dms/cursor.kdl" -include "dms/binds.kdl" diff --git a/dotfiles/niri/dms/alttab.kdl b/dotfiles/niri/dms/alttab.kdl deleted file mode 100755 index 6708e41..0000000 --- a/dotfiles/niri/dms/alttab.kdl +++ /dev/null @@ -1,10 +0,0 @@ -// ! DO NOT EDIT ! - // ! AUTO-GENERATED BY DMS ! - // ! CHANGES WILL BE OVERWRITTEN ! - // ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! - - recent-windows { - highlight { - corner-radius 9 - } - } diff --git a/dotfiles/niri/dms/binds.kdl b/dotfiles/niri/dms/binds.kdl deleted file mode 100755 index 5af1fc6..0000000 --- a/dotfiles/niri/dms/binds.kdl +++ /dev/null @@ -1,115 +0,0 @@ -binds { - Ctrl+Alt+Delete hotkey-overlay-title="Task Manager" { spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; } - Ctrl+XF86AudioLowerVolume allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "decrement" "3"; } - Ctrl+XF86AudioRaiseVolume allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "increment" "3"; } - Mod+Backspace hotkey-overlay-title="Lock Screen" { spawn "dms" "ipc" "call" "lock" "lock"; } - Mod+Comma hotkey-overlay-title="Settings" { spawn "dms" "ipc" "call" "settings" "focusOrToggle"; } - Mod+Ctrl+R hotkey-overlay-title="Rename Workspace" { spawn "dms" "ipc" "call" "workspace-rename" "open"; } - Mod+N hotkey-overlay-title="Notification Center" { spawn "dms" "ipc" "call" "notifications" "toggle"; } - Mod+O hotkey-overlay-title="Show dash overview" { spawn "dms" "ipc" "call" "dash" "toggle" ""; } - Mod+P hotkey-overlay-title="Show dash music" { spawn "dms" "ipc" "call" "dash" "toggle" "media"; } - Mod+Shift+W hotkey-overlay-title="Create window rule" { spawn "dms" "ipc" "call" "window-rules" "toggle"; } - Mod+Slash hotkey-overlay-title="Application Launcher" { spawn "dms" "ipc" "call" "spotlight" "toggle"; } - Mod+T hotkey-overlay-title="Task Manager" { spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; } - Mod+W hotkey-overlay-title="Show dash weather" { spawn "dms" "ipc" "call" "dash" "toggle" "weather"; } - Mod+Y hotkey-overlay-title="Browse Wallpapers" { spawn "dms" "ipc" "call" "dankdash" "wallpaper"; } - Super+X hotkey-overlay-title="Power Menu: Toggle" { spawn "dms" "ipc" "call" "powermenu" "toggle"; } - XF86AudioLowerVolume allow-when-locked=true { spawn "dms" "ipc" "call" "audio" "decrement" "3"; } - XF86AudioMicMute allow-when-locked=true { spawn "dms" "ipc" "call" "audio" "micmute"; } - XF86AudioMute allow-when-locked=true { spawn "dms" "ipc" "call" "audio" "mute"; } - XF86AudioNext allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "next"; } - XF86AudioPause allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "playPause"; } - XF86AudioPlay allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "playPause"; } - XF86AudioPrev allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "previous"; } - XF86AudioRaiseVolume allow-when-locked=true { spawn "dms" "ipc" "call" "audio" "increment" "3"; } - XF86MonBrightnessDown allow-when-locked=true { spawn "dms" "ipc" "call" "brightness" "decrement" "5" ""; } - XF86MonBrightnessUp allow-when-locked=true { spawn "dms" "ipc" "call" "brightness" "increment" "5" ""; } - Mod+1 { focus-workspace 1; } - Mod+2 { focus-workspace 2; } - Mod+3 { focus-workspace 3; } - Mod+4 { focus-workspace 4; } - Mod+5 { focus-workspace 5; } - Mod+6 { focus-workspace 6; } - Mod+7 { focus-workspace 7; } - Mod+8 { focus-workspace 8; } - Mod+9 { focus-workspace 9; } - Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } - Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } - Mod+D { focus-workspace-down; } - Mod+J { focus-window-or-workspace-down; } - Mod+K { focus-window-or-workspace-up; } - Mod+Shift+1 { move-column-to-workspace 1; } - Mod+Shift+2 { move-column-to-workspace 2; } - Mod+Shift+3 { move-column-to-workspace 3; } - Mod+Shift+4 { move-column-to-workspace 4; } - Mod+Shift+5 { move-column-to-workspace 5; } - Mod+Shift+6 { move-column-to-workspace 6; } - Mod+Shift+7 { move-column-to-workspace 7; } - Mod+Shift+8 { move-column-to-workspace 8; } - Mod+Shift+9 { move-column-to-workspace 9; } - Mod+Shift+D { move-workspace-down; } - Mod+Shift+J { move-window-down-or-to-workspace-down; } - Mod+Shift+K { move-window-up-or-to-workspace-up; } - Mod+Shift+U { move-workspace-up; } - Mod+U { focus-workspace-up; } - Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } - Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } - Mod+B hotkey-overlay-title="Open Browser" { spawn "nirius" "focus-or-spawn" "-a" "^firefox$" "firefox"; } - Mod+C { center-column; } - Mod+Ctrl+C { center-visible-columns; } - Mod+Ctrl+End { move-column-to-last; } - Mod+Ctrl+H { focus-monitor-left; } - Mod+Ctrl+Home { move-column-to-first; } - Mod+Ctrl+J { focus-monitor-down; } - Mod+Ctrl+K { focus-monitor-up; } - Mod+Ctrl+L { focus-monitor-right; } - Mod+Ctrl+Shift+H { move-column-to-monitor-left; } - Mod+Ctrl+Shift+J { move-column-to-monitor-down; } - Mod+Ctrl+Shift+K { move-column-to-monitor-up; } - Mod+Ctrl+Shift+L { move-column-to-monitor-right; } - Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } - Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } - Mod+Ctrl+WheelScrollLeft { move-column-left; } - Mod+Ctrl+WheelScrollRight { move-column-right; } - Mod+End { focus-column-last; } - Mod+Equal { set-column-width "+10%"; } - Mod+Escape { fullscreen-window; } - Mod+F hotkey-overlay-title="Open Files" { spawn "nirius" "focus-or-spawn" "-t" "^vifm" "foot" "--" "-e" "vifm"; } - Mod+G { switch-focus-between-floating-and-tiling; } - Mod+H { focus-column-left; } - Mod+Home { focus-column-first; } - Mod+L { focus-column-right; } - Mod+M hotkey-overlay-title="Open Mail" { spawn "nirius" "focus-or-spawn" "-t" "^neomutt" "foot" "--" "-e" "neomutt"; } - Mod+Minus { set-column-width "-10%"; } - Mod+Print { screenshot-window; } - Mod+Q repeat=false { close-window; } - Mod+R { switch-preset-column-width; } - Mod+Shift+BracketLeft { consume-or-expel-window-left; } - Mod+Shift+BracketRight { consume-or-expel-window-right; } - Mod+Shift+Equal { set-window-height "+10%"; } - Mod+Shift+G { toggle-window-floating; } - Mod+Shift+H { move-column-left; } - Mod+Shift+L { move-column-right; } - Mod+Shift+Minus { set-window-height "-10%"; } - Mod+Shift+Period { expel-window-from-column; } - Mod+Shift+R { expand-column-to-available-width; } - Mod+Shift+T { toggle-column-tabbed-display; } - Mod+Shift+V { reset-window-height; } - Mod+Shift+WheelScrollDown { focus-column-right; } - Mod+Shift+WheelScrollUp { focus-column-left; } - Mod+Shift+Z { maximize-window-to-edges; } - Mod+V { switch-preset-window-height; } - Mod+WheelScrollLeft { focus-column-left; } - Mod+WheelScrollRight { focus-column-right; } - Mod+XF86Launch1 { screenshot-window; } - Mod+Z { maximize-column; } - Mod+Ctrl+P { power-off-monitors; } - Ctrl+Print { screenshot-screen; } - Ctrl+XF86Launch1 { screenshot-screen; } - Print { screenshot; } - XF86Launch1 { screenshot; } - Mod+Shift+Q { quit; } - Mod+Return hotkey-overlay-title="Open Terminal" { spawn "foot"; } - Mod+Shift+Slash { show-hotkey-overlay; } - Mod+Space repeat=false { toggle-overview; } -} diff --git a/dotfiles/niri/dms/colors.kdl b/dotfiles/niri/dms/colors.kdl deleted file mode 100755 index 8352dc1..0000000 --- a/dotfiles/niri/dms/colors.kdl +++ /dev/null @@ -1,39 +0,0 @@ -// ! Auto-generated file. Do not edit directly. -// Remove `include "dms/colors.kdl"` from your config to override. - -layout { - background-color "transparent" - - focus-ring { - active-color "#b9cac5" - inactive-color "#8c9290" - urgent-color "#ffb4ab" - } - - border { - active-color "#b9cac5" - inactive-color "#8c9290" - urgent-color "#ffb4ab" - } - - shadow { - color "#00000070" - } - - tab-indicator { - active-color "#b9cac5" - inactive-color "#8c9290" - urgent-color "#ffb4ab" - } - - insert-hint { - color "#b9cac580" - } -} - -recent-windows { - highlight { - active-color "#11201d" - urgent-color "#ffb4ab" - } -} diff --git a/dotfiles/niri/dms/cursor.kdl b/dotfiles/niri/dms/cursor.kdl deleted file mode 100755 index cd14ec9..0000000 --- a/dotfiles/niri/dms/cursor.kdl +++ /dev/null @@ -1,11 +0,0 @@ -// ! DO NOT EDIT ! -// ! AUTO-GENERATED BY DMS ! -// ! CHANGES WILL BE OVERWRITTEN ! -// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! - -cursor { - xcursor-theme "phinger-cursors-dark" - xcursor-size 24 - hide-when-typing - hide-after-inactive-ms 5000 -} \ No newline at end of file diff --git a/dotfiles/niri/dms/layout.kdl b/dotfiles/niri/dms/layout.kdl deleted file mode 100755 index b339058..0000000 --- a/dotfiles/niri/dms/layout.kdl +++ /dev/null @@ -1,22 +0,0 @@ -// ! DO NOT EDIT ! - // ! AUTO-GENERATED BY DMS ! - // ! CHANGES WILL BE OVERWRITTEN ! - // ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! - - layout { - gaps 6 - - border { - width 2 - } - - focus-ring { - width 2 - } - } - window-rule { - geometry-corner-radius 9 - clip-to-geometry true - tiled-state true - draw-border-with-background false - } diff --git a/dotfiles/niri/dms/outputs.kdl b/dotfiles/niri/dms/outputs.kdl deleted file mode 100755 index 3863ba7..0000000 --- a/dotfiles/niri/dms/outputs.kdl +++ /dev/null @@ -1,20 +0,0 @@ -// Auto-generated by DMS - do not edit manually - -output "DP-3" { - mode "3840x2160@59.997" - scale 1.75 - position x=0 y=0 -} - -output "DP-1" { - mode "3840x2160@59.997" - scale 1.75 - position x=0 y=0 -} - -output "eDP-1" { - mode "1920x1200@60.026" - scale 1.25 - position x=2194 y=274 -} - diff --git a/dotfiles/niri/dms/windowrules.kdl b/dotfiles/niri/dms/windowrules.kdl deleted file mode 100755 index e69de29..0000000 diff --git a/dotfiles/niri/dms/wpblur.kdl b/dotfiles/niri/dms/wpblur.kdl deleted file mode 100755 index 3d58802..0000000 --- a/dotfiles/niri/dms/wpblur.kdl +++ /dev/null @@ -1,9 +0,0 @@ -// ! DO NOT EDIT ! -// ! AUTO-GENERATED BY DMS ! -// ! CHANGES WILL BE OVERWRITTEN ! -// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! - -layer-rule { - match namespace="dms:blurwallpaper" - place-within-backdrop true -} diff --git a/dotfiles/tmux/tmux.conf b/dotfiles/tmux/tmux.conf deleted file mode 100644 index c8cbfb4..0000000 --- a/dotfiles/tmux/tmux.conf +++ /dev/null @@ -1,45 +0,0 @@ -# Key bindings -bind C-l next-window -bind C-h previous-window -bind C-b last-window -bind n new-window -bind C-n new-window -c '#{pane_current_path}' -bind v split-window -h -bind C-v split-window -hc '#{pane_current_path}' -bind s split-window -v -bind C-s split-window -vc '#{pane_current_path}' -bind h select-pane -L -bind j select-pane -D -bind k select-pane -U -bind l select-pane -R -bind -r H resize-pane -L 5 -bind -r J resize-pane -D 5 -bind -r K resize-pane -U 5 -bind -r L resize-pane -R 5 -bind c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'" -bind C-c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'" - -# Layouts -bind f new-window -c '#{pane_current_path}' vifm -bind R source rloft.conf - -# Unbind -unbind p -unbind '"' -unbind % - -# Eye candy -set-option -g status-right "" -set-option -g status-left "" -set-option -g status-justify "centre" -# set-option -g status-style fg=magenta -# set-option -g pane-border-style fg=brightwhite -set-option -g pane-active-border-style fg=magenta -# set-option -g window-status-current-style bg=brightwhite - -# Some more specifics -set-option -g focus-events on -set -g base-index 1 -setw -g pane-base-index 1 -set -g default-terminal "tmux-256color" -set -as terminal-features ",xterm-256color:RGB" diff --git a/flake.lock b/flake.lock index 0a05880..c213931 100644 --- a/flake.lock +++ b/flake.lock @@ -1,25 +1,24 @@ { "nodes": { - "firefox-addons": { + "flake-parts": { "inputs": { - "nixpkgs": [ - "nixpkgs-unstable" + "nixpkgs-lib": [ + "nur", + "nixpkgs" ] }, "locked": { - "dir": "pkgs/firefox-addons", - "lastModified": 1776052978, - "narHash": "sha256-WR0Svwg/JreBNW006qjHET6RRRmmjWCMfrkS5JmDZK8=", - "owner": "rycee", - "repo": "nur-expressions", - "rev": "6c0e7f01d9315f4806a187c2ec58d0f3b6961876", - "type": "gitlab" + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" }, "original": { - "dir": "pkgs/firefox-addons", - "owner": "rycee", - "repo": "nur-expressions", - "type": "gitlab" + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" } }, "home-manager": { @@ -29,11 +28,11 @@ ] }, "locked": { - "lastModified": 1775425411, - "narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=", + "lastModified": 1767910483, + "narHash": "sha256-MOU5YdVu4DVwuT5ztXgQpPuRRBjSjUGIdUzOQr9iQOY=", "owner": "nix-community", "repo": "home-manager", - "rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe", + "rev": "82fb7dedaad83e5e279127a38ef410bcfac6d77c", "type": "github" }, "original": { @@ -43,33 +42,13 @@ "type": "github" } }, - "home-manager-unstable": { - "inputs": { - "nixpkgs": [ - "nixpkgs-unstable" - ] - }, - "locked": { - "lastModified": 1776046499, - "narHash": "sha256-Wzc4nn07/0RL21ypPHRzNDQZcjhIC8LaYo7QJQjM5T4=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "287f84846c1eb3b72c986f5f6bebcff0bd67440d", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1775811116, - "narHash": "sha256-t+HZK42pB6N+i5RGbuy7Xluez/VvWbembBdvzsc23Ss=", + "lastModified": 1768028080, + "narHash": "sha256-50aDK+8eLvsLK39TzQhKNq50/HcXyP4hyxOYoPoVxjo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "54170c54449ea4d6725efd30d719c5e505f1c10e", + "rev": "d03088749a110d52a4739348f39a63f84bb0be14", "type": "github" }, "original": { @@ -79,50 +58,46 @@ "type": "github" } }, - "nixpkgs-unstable": { + "nixpkgs_2": { "locked": { - "lastModified": 1775710090, - "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=", - "owner": "NixOS", + "lastModified": 1768127708, + "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "4c1018dae018162ec878d42fec712642d214fdfa", + "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "quickshell": { + "nur": { "inputs": { - "nixpkgs": [ - "nixpkgs-unstable" - ] + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1775720097, - "narHash": "sha256-p+vqkCuFfVNyQBo370wr6MebNUvz55RZiC0m8YKUhvQ=", - "ref": "refs/heads/master", - "rev": "d4c92973b53d9fa34cc110d3b974eb6bde5b3027", - "revCount": 800, - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" + "lastModified": 1768226540, + "narHash": "sha256-7ITnaEIsloaaOpqxIEYjUvodWz3VcT0ERi0NiZx7U/g=", + "owner": "nix-community", + "repo": "nur", + "rev": "b87f89e9dc56296f29fb3caa93f7fb6058f8c5f3", + "type": "github" }, "original": { - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" + "owner": "nix-community", + "repo": "nur", + "type": "github" } }, "root": { "inputs": { - "firefox-addons": "firefox-addons", "home-manager": "home-manager", - "home-manager-unstable": "home-manager-unstable", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable", - "quickshell": "quickshell" + "nur": "nur" } } }, diff --git a/flake.nix b/flake.nix index 5724930..fbea410 100644 --- a/flake.nix +++ b/flake.nix @@ -2,137 +2,150 @@ description = "Complete system and home config"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; - - home-manager = { - url = "github:nix-community/home-manager/release-25.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - home-manager-unstable = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; - - firefox-addons = { - url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; - - quickshell = { - url = "git+https://git.outfoxxed.me/quickshell/quickshell"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; - + home-manager.url = "github:nix-community/home-manager/release-25.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + nur.url = "github:nix-community/nur"; }; - outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, home-manager-unstable, ... }@inputs: { + outputs = { self, nixpkgs, home-manager, ... }@inputs: { nixosConfigurations = { + nova = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + { + networking.hostName = "nova"; + } + ./system + ./system/alt.nix + ./system/btrbk.nix + ./system/cast.nix + ./system/desktop.nix + ./system/ergodox.nix + ./system/gnome.nix + ./system/guest.nix + ./system/hardware/nova.nix + ./system/plasma.nix + ./system/steam.nix + ./system/yubikey.nix + # ./system/distrobox.nix + ]; + }; + + tron = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + { + networking.hostName = "tron"; + } + ./system + ./system/desktop.nix + ./system/hardware/tron.nix + ./system/gnome.nix + ./system/btrbk.nix + ./system/yubikey.nix + ]; + }; + + romulus = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + { + networking.hostName = "romulus"; + environment.systemPackages = [ + nixpkgs.wl-clipboard + ]; + programs.sway.enable = true; + security.rtkit.enable = true; + } + ./system + ./system/desktop.nix + ./system/hardware/romulus.nix + ]; + }; + arielle = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - ./hosts/arielle - home-manager.nixosModules.home-manager { - home-manager = { - extraSpecialArgs = { inherit inputs; }; - useGlobalPkgs = true; - useUserPackages = true; - users = { - - till = { - imports = [ - ./home/minimal - ./users/till/home.nix - ]; - }; - - }; - }; - } { - - # firefox-addons.config.allowUnfreePredicate = pkg: - # builtins.elem (nixpkgs.lib.getName pkg) [ - # "tampermonkey" - # ]; - - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (nixpkgs.lib.getName pkg) [ - "outline" - ]; + networking.hostName = "arielle"; + networking.domain = "ktiu.net"; + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; } + ./system/hardware/arielle.nix + ./system + ./system/web-server + + #infrastructure + ./system/web-server/mail + ./system/web-server/radicale.nix + ./system/web-server/outline.nix + ./system/web-server/forgejo.nix + # ./system/web-server/jenkins.nix + + # web hosting + ./system/web-server/oopsidentify.nix + ./system/web-server/fundkorb-button.nix + ./system/web-server/ksh-map.nix ]; }; homer = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ - ./hosts/homer - ]; - }; - - mila = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ - ./hosts/mila - ]; - }; - - nova = nixpkgs-unstable.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ - ./hosts/nova - home-manager-unstable.nixosModules.home-manager { - home-manager = { - extraSpecialArgs = { inherit inputs; }; - useGlobalPkgs = true; - useUserPackages = true; - users = { - - till = { - imports = [ - ./home/desktop-full - ./users/till/home.nix - ]; - }; - - alt = { - imports = [ - ./home/desktop-slim - ./users/alt/home.nix - ]; - }; - - guest = { - imports = [ - ./home/desktop-slim - ./users/guest/home.nix - ]; - }; - }; - }; - } { - - # firefox-addons.config.allowUnfreePredicate = pkg: - # builtins.elem (nixpkgs.lib.getName pkg) [ - # "tampermonkey" - # ]; - - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (nixpkgs.lib.getName pkg) [ - "corefonts" - "textfonts" - "keymapp" - "steam" - "steam-unwrapped" - # "tampermonkey" - ]; + networking.hostName = "homer"; } + ./system + ./system/desktop.nix + ./system/hardware/homer.nix + ./system/gnome.nix + ./system/steam.nix + ./system/remote-desktop.nix + ./system/media.nix + ./system/guest.nix + ]; + }; + + }; + + homeConfigurations = { + till = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlays.default; + extraSpecialArgs = { inherit inputs; }; + modules = [ + ./home + ]; + }; + "till@romulus" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlays.default; + extraSpecialArgs = { inherit inputs; }; + modules = [ + ./home/slim-desktop.nix + ]; + }; + "till@arielle" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs; }; + modules = [ + ./home/on-server.nix + ]; + }; + alt = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlays.default; + extraSpecialArgs = { inherit inputs; }; + modules = [ + ./home/alt.nix + ]; + }; + guest = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlays.default; + extraSpecialArgs = { inherit inputs; }; + modules = [ + ./home/guest.nix ]; }; }; diff --git a/home/alt.nix b/home/alt.nix new file mode 100644 index 0000000..f0179e4 --- /dev/null +++ b/home/alt.nix @@ -0,0 +1,73 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + home.username = "alt"; + home.homeDirectory = "/home/alt"; + home.stateVersion = "22.11"; + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + + programs.home-manager.enable = true; + + xdg.userDirs = { + enable = true; + createDirectories = true; + download = "${config.home.homeDirectory}/tmp"; + music = "${config.home.homeDirectory}/media/music"; + pictures = "${config.home.homeDirectory}/media/img"; + videos = "${config.home.homeDirectory}/media/vid"; + documents = "${config.home.homeDirectory}/misc"; + templates = "${config.xdg.dataHome}/templates"; + }; + + home.file.".npmrc".text = '' + prefix = ${config.xdg.dataHome}/npm/packages + ''; + + home.packages = with pkgs; [ + fzf + silver-searcher + tmux + nodejs + wl-clipboard + qbittorrent + vlc + # mullvad-vpn + ffmpeg + libnotify + ]; + + imports = [ + ./gnome + ./firefox.nix + ./foot.nix + ./fish.nix + ./vifm + ./tmux + ./nvim + ]; + + programs.nix-index = { + enable = true; + enableFishIntegration = true; + }; + + programs.git = { + enable = true; + userName = "Till"; + userEmail = "till@ktiu.net"; + lfs = { + enable = true; + }; + extraConfig = { + init = { + defaultBranch = "main"; + }; + }; + }; +} diff --git a/home/desktop-full/calendars.nix b/home/calendars.nix similarity index 87% rename from home/desktop-full/calendars.nix rename to home/calendars.nix index 5585970..e645f50 100644 --- a/home/desktop-full/calendars.nix +++ b/home/calendars.nix @@ -3,7 +3,7 @@ let myRemote = slug: { - passwordCommand = [ "pass" "accounts/ktiu-radicale" ]; + passwordCommand = [ "pass" "ktiu/radicale" ]; userName = "ktiu"; type = "caldav"; url = "https://kalender.ktiu.net/ktiu/${slug}"; @@ -126,12 +126,9 @@ in khal.color = "light green"; remote = { type = "caldav"; - # url = "https://cloud.gridisnotajournal.de/remote.php/dav/calendars/till/grid/"; - # passwordCommand = [ "pass" "uni/grid-caldav-nextcloud" ]; - # userName = "till"; - url = "https://kalender.humangeographie.de/grid/96dedda9-cc91-c2fe-3bd8-020296904489/"; - userName = "grid"; - passwordCommand = [ "pass" "uni/grid-kalender-radicale" ]; + url = "https://cloud.gridisnotajournal.de/remote.php/dav/calendars/till/grid/"; + passwordCommand = [ "pass" "grid/nextcloud" ]; + userName = "till"; }; }; }; diff --git a/home/castget/castget.conf b/home/castget/castget.conf new file mode 100644 index 0000000..cd4f148 --- /dev/null +++ b/home/castget/castget.conf @@ -0,0 +1,53 @@ +# vim: set ft=conf + +[2.5admins] +url=https://2.5admins.com/feed/podcast + +[50plus2] +url=https://50plus2.podigee.io/feed/mp3 +album_tag=50+2 + +[drei90] +url=http://feeds.feedburner.com/Drei90 +album_tag=drei90 + +[efpodcast] +url=https://www.eintracht-podcast.de/feed/mp3 + +[latenightlinux] +url=https://latenightlinux.com/feed/mp3 + +[linuxafterdark] +url=https://linuxafterdark.net/feed/podcast + +[linuxdevtime] +url=https://latenightlinux.com/feed/extra + +[linuxmatters] +url=https://linuxmatters.sh/episode/index.xml + +[logbuchnetzpolitik] +url=https://feeds.metaebene.me/lnp/mp3 +album_tag=Logbuch Netzpolitik + +[schlusskonferenz] +url=https://schlusskonferenz.podigee.io/feed/mp3 + +[tribünengespräch] +url=https://tribuenengespraech.podigee.io/feed/mp3 + +[wettbrötchen] +url=https://www.wett-broetchen.de/feed/mp3 +album_tag=Wettbrötchen + +[edeltalk] +url=https://cdn.julephosting.de/podcasts/573-edeltalk-mit-dominik-kevin/feed.rss +album_tag=Edeltalk + +[youredeadtome] +url=https://podcasts.files.bbci.co.uk/p07mdbhg.rss + +[*] +genre_tag=Podcast +spool=/home/till/.local/share/podcasts +filename=%(channel_title)_%(date)_%(title).mp3 diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 0000000..324a039 --- /dev/null +++ b/home/default.nix @@ -0,0 +1,58 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + + home.packages = with pkgs; [ + + # messenger + signal-desktop + telegram-desktop + + # office + xournalpp + pdfpc + + # text publishing + libreoffice + jdk + poppler-utils + zotero + lorem + typst + + # graphics + gimp + inkscape + + # web + chromium + nyxt + + # media + anki-bin + qbittorrent + nicotine-plus + + # other + quickemu + keymapp + gnome-solanum + eduvpn-client + yt-dlp + + ]; + + imports = [ + ./slim-desktop.nix + ./gnome + ./firefox.nix + ./librewolf.nix + ./tex.nix + ./fonts.nix + ./r.nix + ]; + + programs.obs-studio.enable = true; + # programs.freetube.enable = true; + +} diff --git a/home/desktop-full/aichat.nix b/home/desktop-full/aichat.nix deleted file mode 100644 index cdbc120..0000000 --- a/home/desktop-full/aichat.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs, ... }: - -{ - home.packages = with pkgs; [ - aichat - glow - ]; - - programs.fish.shellAliases = { - vibe = "aichat -c"; - clank = "aichat -e"; - slop = "aichat"; - }; -} diff --git a/home/desktop-full/default.nix b/home/desktop-full/default.nix deleted file mode 100644 index f7cbeac..0000000 --- a/home/desktop-full/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ pkgs, ... }: - -{ - imports = [ - ../desktop-slim - - ./aichat.nix - ./calendars.nix - ./khard-dump.nix - ./mail.nix - ./messaging.nix - ./office-gui.nix - ./r.nix - ./tasks.nix - ./tex.nix - ]; - - home.packages = with pkgs; [ - bat - ghostscript - hunspell - hunspellDicts.de_DE - hunspellDicts.en_US - hunspellDicts.th_TH - hyphen - hyphenDicts.de_DE - hyphenDicts.en_US - imagemagick - khal - khard - msmtp - notmuch - openssl - pandoc - pdftk - quarto - ripmime - urlscan - visidata - w3m - ]; -} diff --git a/home/desktop-full/mail.nix b/home/desktop-full/mail.nix deleted file mode 100644 index db30c84..0000000 --- a/home/desktop-full/mail.nix +++ /dev/null @@ -1,284 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - - makeConfig = accountName: - '' - unset reverse_name - unset smime_is_default - set my_account='${ accountName }' - macro index,pager / "tag:${ accountName } " - unalternates * - set nm_record_tags = "+sent -inbox -unread +${ accountName }"; - set my_signature = ${ pkgs.writeText "signature.txt" config.accounts.email.accounts.${accountName}.signature.text } - set status_format = "— [ %r ] $my_account %f (%lB) %>— %m messages%?n? [ %n new ]?%?d? [ %d to delete ]?%?t? [ %t tagged ]? —" - source colors.neomuttrc - ''; - - makeAccount = accountName: { - signature.showSignature = "append"; - smtp.tls.useStartTls = true; - msmtp.enable = true; - - mbsync = { - enable = true; - create = "maildir"; - expunge = "both"; - }; - - neomutt = { - enable = true; - sendMailCommand = "${lib.getExe pkgs.msmtp} -a ${ accountName }"; - }; - - notmuch = { - enable = true; - neomutt = { - virtualMailboxes = [ - { name = "Inbox"; query = "tag:${ accountName } and tag:inbox"; } - { name = "Archive"; query = "tag:${ accountName } and not tag:sent and not tag:draft"; } - { name = "Sent"; query = "tag:${ accountName } and tag:sent"; } - { name = "Drafts"; query = "tag:${ accountName } and tag:draft"; } - { name = "Spam"; query = "tag:${ accountName } and tag:spam"; } - { name = "Trash"; query = "tag:${ accountName } and tag:trash"; } - ]; - }; - }; - }; - - mailcap_path = pkgs.writeText "neomutt_mailcap" '' - application/pdf; zathura %s - multipart; xdg-open %s - text/html; firefox %s; description=HTML Text; nametemplate=%s.html; needsterminal - text/html; w3m -v -F -T text/html -dump %s; copiousoutput - text/calendar; khal import %s - text; neomutt %s - application; xdg-open %s - image; xdg-open %s - video; xdg-open %s - audio; xdg-open %s - message; xdg-open %s - model; xdg-open %s - ''; - -in - -{ - programs.mu.enable = true; - - accounts.email = { - maildirBasePath = "${config.xdg.dataHome}/mail"; - accounts = { - gu = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) { - primary = true; - address = "straube@geo.uni-frankfurt.de"; - realName = "Till Straube"; - imap.host = "imap.server.uni-frankfurt.de"; - smtp.host = "smtpauth.rz.uni-frankfurt.de"; - userName = "tstraube"; - passwordCommand = "pass uni/hrz"; - signature = { - text = '' - Dr. Till Straube (he/him) - Dept. of Human Geography - Goethe University Frankfurt - ''; - }; - neomutt = { - extraConfig = makeConfig name + '' - color status blue default - color index blue default '~N' - alternates ^tstraube@(em|rz)?.uni-frankfurt.de$ - set smime_is_default - ''; - }; - }; - - t9e = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) { - address = "till.straube@t9e.me"; - realName = "Till Straube"; - imap.host = "arielle.ktiu.net"; - smtp.host = "arielle.ktiu.net"; - userName = "till.straube@t9e.me"; - signature.text = '' - Till Straube (he/him) - PGP key: https://keys.openpgp.org/search?q=till.straube@t9e.me - ''; - neomutt = { - extraConfig = makeConfig name + '' - color status green default - color index green default '~N' - alternates @t9e.me$ @ktiu.net$ ^(tillkowski|till.straube)@gmail.com$ - set reverse_name - ''; - }; - msmtp.extraConfig.port = "587"; - passwordCommand = "pass accounts/ktiu-imap"; - }; - - ksh = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) { - address = "kein_schlussstrich_hessen@systemli.org"; - realName = "Kein Schlussstrich Hessen"; - imap.host = "mail.systemli.org"; - smtp.host = "mail.systemli.org"; - userName = "kein_schlussstrich_hessen@systemli.org"; - signature.text = '' - Kein Schlussstrich Hessen - PGP Key: https://keys.openpgp.org/search?q=kein_schlussstrich_hessen@systemli.org - ''; - neomutt = { - extraConfig = makeConfig name + '' - color status red default - color index red default '~N' - ''; - }; - passwordCommand = "pass ksh/systemli"; - }; - }; - }; - - programs.msmtp.enable = true; - - programs.mbsync.enable = true; - - programs.notmuch = { - enable = true; - search.excludeTags = [ "trash" "spam" ]; - new.tags = [ "new" "unread" ]; - hooks = { - preNew = '' - notmuch tag +draft -- 'folder:"/\/Drafts$/"' - mbsync --all - ''; - postNew = '' - notmuch tag +gu -- tag:new path:gu/** - notmuch tag +t9e -- tag:new path:t9e/** - notmuch tag +ksh -- tag:new path:ksh/** - notmuch tag +inbox -- tag:new 'folder:"/\/Inbox$/"' - notmuch tag +sent -unread -- tag:new 'folder:"/\/Sent$/"' - notmuch tag +trash -unread -- tag:new 'folder:"/\/Trash$/"' - notmuch tag +draft -unread -- tag:new 'folder:"/\/Drafts$/"' - notmuch tag +spam -- tag:new 'folder:"/\/Spam$/"' - notmuch tag +spam -- tag:new 'folder:"/\/Junk$/"' - notmuch tag -new -- tag:new - ''; - }; - }; - - programs.neomutt = { - enable = true; - - vimKeys = true; - changeFolderWhenSourcingAccount = true; - editor = "nvim -c 'call woof#init#Init()'"; - sort = "reverse-date-received"; - unmailboxes = true; - - settings = { - abort_noattach = "ask-yes"; - abort_noattach_regex = "\"(attach|enclosed|anbei|anhängen|angehängt|anhang|anhänge|hängt an)\""; - auto_edit = "no"; - beep = "no"; - confirm_append = "no"; - crypt_auto_sign = "yes"; - crypt_replyencrypt = "yes"; - crypt_replysign = "yes"; - crypt_replysignencrypted = "yes"; - crypt_verify_sig = "yes"; - edit_headers = "yes"; - forward_attachments = "yes"; - forward_format = "\"Fwd: %s\""; - forward_quote = "yes"; - help = "no"; - include = "yes"; - mail_check_stats = "yes"; - mailcap_path = "${ mailcap_path }"; - mark_old = "no"; - markers = "no"; - mbox_type = "Maildir"; - menu_scroll = "yes"; - mime_type_query_command = "\"file -b --mime-type %s\""; - nm_record = "yes"; - pager_context = "3"; - pager_index_lines = "5"; - pager_stop = "yes"; - query_command= "\"khard email --parsable '%s'\""; - recall = "no"; - resume_draft_files = "yes"; - reverse_real_name = "no"; - shell = "/bin/sh"; - sleep_time = "0"; - smart_wrap = "yes"; - status_chars = "✔↻٪A"; - tilde = "yes"; - use_envelope_from = "yes"; - virtual_spool_file = "yes"; - wait_key = "no"; - }; - - binds = [ - { key = "m"; map = [ "index" "pager" ]; action = "noop"; } - { key = "k"; map = [ "pager" ]; action = "previous-entry"; } - { key = "j"; map = [ "pager" ]; action = "next-entry"; } - { key = ""; map = [ "index" ]; action = "display-message"; } - { key = ""; map = [ "index" ]; action = "entire-thread"; } - { key = "gf"; map = [ "index" "pager" ]; action = "change-folder"; } - { key = ""; map = [ "editor" ]; action = "complete-query"; } - { key = "P"; map = [ "compose" ]; action = "pgp-menu"; } - { key = "p"; map = [ "compose" ]; action = "postpone-message"; } - ]; - - macros = [ - { key = "gu"; map = [ "index" "pager" ]; action = "tag:dummy:source ${config.xdg.configHome}/neomutt/gug!"; } - { key = "gm"; map = [ "index" "pager" ]; action = "tag:dummy:source ${config.xdg.configHome}/neomutt/t9eg!"; } - { key = "gk"; map = [ "index" "pager" ]; action = "tag:dummy:source ${config.xdg.configHome}/neomutt/kshg!"; } - - { key = "Y"; map = [ "index" "pager" ]; action = ""; } - { key = "y"; map = [ "index" "pager" ]; action = "-inbox -unread -spam -trash"; } - { key = "J"; map = [ "index" "pager" ]; action = "+spam -inbox -unread -trash"; } - { key = "I"; map = [ "index" "pager" ]; action = "+inbox -old -spam -trash"; } - { key = "Y"; map = [ "index" "pager" ]; action = ""; } - { key = "dd"; map = [ "index" "pager" ]; action = "+trash -inbox -unread -spam"; } - - { key = "g!"; map = [ "index" "pager" ]; action = "Inbox"; } - { key = "g<"; map = [ "index" "pager" ]; action = "Sent"; } - { key = "g>"; map = [ "index" "pager" ]; action = "Archive"; } - { key = "gj"; map = [ "index" "pager" ]; action = "Spam"; } - { key = "gd"; map = [ "index" "pager" ]; action = "Drafts"; } - { key = "gt"; map = [ "index" "pager" ]; action = "Trash"; } - - { key = "go"; map = [ "index" "pager" ]; action = "notmuch new"; } - { key = "V"; map = ["index" "pager"]; action = "html"; } - { key = "mar"; map = [ "index" "pager" ]; action = "newn*"; } - { key = "A"; map = [ "index" "pager" ]; action = "khard add-email --vcard-version=4.0"; } - { key = "S"; map = [ "index" "pager" ]; action = "ripmime -i - -d ~/tmp && rm ~/tmp/textfile*"; } - { key = "gb"; map = [ "index" "pager" ]; action = "urlscan"; } - { key = "I"; map = [ "compose" ]; action = "`tmpfile=$(mktemp -u --suffix .png -t XXXXXXXXXXXX -p ~/tmp) && wl-paste -t image/png > \"$tmpfile\" && echo \"$tmpfile\"`"; } - { key = "p"; map = [ "compose" ]; action = ""; } - - { key = "c"; map = [ "index" "pager" ]; action = "set signature=$my_signature"; } - { key = "r"; map = [ "index" "pager" ]; action = "unset signature"; } - { key = "a"; map = [ "index" "pager" ]; action = "unset signature"; } - { key = "f"; map = [ "index" "pager" ]; action = "unset signature"; } - { key = "l"; map = [ "index" "pager" ]; action = "unset signature"; } - ]; - - extraConfig = builtins.readFile ../../dotfiles/neomutt/config.neomuttrc; - }; - - xdg.configFile."neomutt/colors.neomuttrc".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/dotfiles/neomutt/colors.neomuttrc"; - xdg.configFile."neomutt/bindings.neomuttrc".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/dotfiles/neomutt/bindings.neomuttrc"; - programs.neovim.plugins = with pkgs.vimPlugins; [ - { - plugin = vim-pathogen; - type = "viml"; - config = "execute pathogen#infect()"; - } - ]; - - xdg.configFile."nvim/bundle/woof-vim" = { - source = config.lib.file.mkOutOfStoreSymlink "/home/till/devel/woof-vim"; - recursive = true; - }; - -} diff --git a/home/desktop-full/messaging.nix b/home/desktop-full/messaging.nix deleted file mode 100644 index 8c8f0dd..0000000 --- a/home/desktop-full/messaging.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs, ... }: - -{ - home.packages = with pkgs; [ - signal-desktop - # telegram-desktop - simplex-chat-desktop - ]; -} diff --git a/home/desktop-full/office-cli.nix b/home/desktop-full/office-cli.nix deleted file mode 100644 index a67ca90..0000000 --- a/home/desktop-full/office-cli.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ pkgs, ... }: - -{ -} diff --git a/home/desktop-full/office-gui.nix b/home/desktop-full/office-gui.nix deleted file mode 100644 index 1452405..0000000 --- a/home/desktop-full/office-gui.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, ... }: - -{ - home.packages = with pkgs; [ - chromium - eduvpn-client - gimp - gnome-solanum - inkscape - libreoffice - lorem - pdfpc - poppler-utils - typst - xournalpp - zotero - ]; - - programs.obs-studio.enable = true; -} diff --git a/home/desktop-full/r.nix b/home/desktop-full/r.nix deleted file mode 100644 index 0e6e6bc..0000000 --- a/home/desktop-full/r.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ pkgs, ... }: - -let - customPackages = with pkgs.rPackages; [ - bookdown - catmaply - clipr - DAAG - devtools - dplyr - eurostat - extrafont - ggplot2 - ggridges - jsonlite - kableExtra - knitr - languageserver - magrittr - mapproj - openxlsx - osmdata - plotly - progress - purrr - qrcode - quarto - RColorBrewer - readODS - revealjs - rlist - rmarkdown - rnaturalearth - rnaturalearthdata - roxygen2 - rvest - sf - stringr - testthat - tidyr - tidyverse - tmap - tufte - xlsx - yaml - ]; - - R-packed = pkgs.rWrapper.override { packages = customPackages; }; - RStudio-packed = pkgs.rstudioWrapper.override { packages = customPackages; }; - -in - -{ - home.packages = with pkgs; [ - R-packed - # RStudio-packed - ]; - - home.shellAliases = { - r = "R --no-save --no-restore"; - R = "R --no-save --no-restore"; - }; -} diff --git a/home/desktop-full/tasks.nix b/home/desktop-full/tasks.nix deleted file mode 100644 index e5b6711..0000000 --- a/home/desktop-full/tasks.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - home.packages = with pkgs; [ - taskopen - ]; - - programs.taskwarrior = { - enable = true; - package = pkgs.taskwarrior3; - dataLocation = "${config.xdg.dataHome}/taskwarrior/tasks"; - colorTheme = "no-color"; - config = { - report.list.columns = ["id" "depends.indicator" "priority" "project" "recur.indicator" "scheduled.countdown" "due" "until.age" "status.short" "description.count" "tags"]; - report.list.labels= ["ID" "D" "Prio" "Proj" "R" "Scheduled" "Due" "Until" "S" "Description" "Tags"]; - }; - extraConfig = " - hooks.location=${config.xdg.dataHome}/taskwarrior/hooks - verbose=affected,context,edit,label,header,new-id,project,special,sync,recur - "; - }; -} diff --git a/home/desktop-slim/default.nix b/home/desktop-slim/default.nix deleted file mode 100644 index d1333f4..0000000 --- a/home/desktop-slim/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ pkgs, ... }: - -{ - imports = [ - ../minimal - - ./devel.nix - ./firefox.nix - ./fonts.nix - ./gpg.nix - ./media.nix - ./niri.nix - ./foot.nix - ./password-store.nix - ./user-dirs.nix - ]; - - home.packages = with pkgs; [ - anki-bin - appimage-run - drawing - keepassxc - libnotify - usbutils - wl-clipboard - yubioath-flutter - zathura - ]; - - services.syncthing.enable = true; -} diff --git a/home/desktop-slim/devel.nix b/home/desktop-slim/devel.nix deleted file mode 100644 index c27cb2c..0000000 --- a/home/desktop-slim/devel.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; -} diff --git a/home/desktop-slim/foot.nix b/home/desktop-slim/foot.nix deleted file mode 100644 index 596be0b..0000000 --- a/home/desktop-slim/foot.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, ... }: - -{ - programs.foot = { - enable = true; - }; - xdg.configFile."foot" = { - recursive = true; - source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/dotfiles/foot"; - }; -} diff --git a/home/desktop-slim/gpg.nix b/home/desktop-slim/gpg.nix deleted file mode 100644 index 43886ae..0000000 --- a/home/desktop-slim/gpg.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ pkgs, ... }: - -{ - - home.packages = with pkgs; [ - pinentry-all - ]; - -# moved to system - -# services.gpg-agent = { -# enable = true; -# pinentry.package = pkgs.pinentry-all; -# pinentry.program = "pinentry"; -# # enableSshSupport = true; -# }; - - programs.gpg = { - enable = true; - settings = { - no-emit-version = true; - no-comments = true; - keyserver = "hkps://keys.openpgp.org/"; - keyserver-options = [ - "no-honor-keyserver-url" - "include-revoked" - ]; - personal-cipher-preferences = "AES256 AES192 AES CAST5"; - personal-digest-preferences = "SHA512 SHA384 SHA256 SHA224"; - cert-digest-algo = "SHA512"; - default-preference-list = "SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed"; - }; - }; -} diff --git a/home/desktop-slim/media.nix b/home/desktop-slim/media.nix deleted file mode 100644 index 5c5e14c..0000000 --- a/home/desktop-slim/media.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs, ... }: - -{ - home.packages = with pkgs; [ - castget - feh - ffmpeg - nicotine-plus - qbittorrent - vlc - yt-dlp - zathura - ]; -} diff --git a/home/desktop-slim/niri.nix b/home/desktop-slim/niri.nix deleted file mode 100644 index 00e25cd..0000000 --- a/home/desktop-slim/niri.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs, config, ... }: - -{ - services.swayidle.enable = true; - services.polkit-gnome.enable = true; - - home.packages = with pkgs; [ - dgop - dsearch - wl-mirror - xwayland-satellite - adw-gtk3 - ]; - - xdg.configFile = { - "niri/config.kdl".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/dotfiles/niri/config.kdl"; - "niri/dms" = { - source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/dotfiles/niri/dms"; - recursive = true; - }; - }; -} diff --git a/home/desktop-slim/user-dirs.nix b/home/desktop-slim/user-dirs.nix deleted file mode 100644 index 5daba7f..0000000 --- a/home/desktop-slim/user-dirs.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, ... }: - -{ - xdg.userDirs = { - enable = true; - createDirectories = true; - setSessionVariables = false; - desktop = "${config.home.homeDirectory}/desktop"; - documents = "${config.home.homeDirectory}/misc"; - download = "${config.home.homeDirectory}/tmp"; - music = "${config.home.homeDirectory}/media/music"; - pictures = "${config.home.homeDirectory}/media/img"; - publicShare = "${config.home.homeDirectory}/box"; - templates = "${config.xdg.dataHome}/templates"; - videos = "${config.home.homeDirectory}/media/vid"; - }; - -} diff --git a/home/devel.nix b/home/devel.nix new file mode 100644 index 0000000..658d388 --- /dev/null +++ b/home/devel.nix @@ -0,0 +1,13 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + home.packages = with pkgs; [ + bundler + bundix + nodejs + yarn-berry + duckdb + tippecanoe + pmtiles + ]; +} diff --git a/home/desktop-slim/firefox.nix b/home/firefox.nix similarity index 86% rename from home/desktop-slim/firefox.nix rename to home/firefox.nix index fef201f..8c7898b 100644 --- a/home/desktop-slim/firefox.nix +++ b/home/firefox.nix @@ -1,4 +1,4 @@ -{ config, pkgs, inputs, osConfig, ... }: +{ config, pkgs, osConfig, ... }: { programs.firefox = { @@ -33,12 +33,14 @@ ${config.home.username} = { name = config.home.username; isDefault = true; - extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ + extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ + adaptive-tab-bar-colour auto-tab-discard keepassxc-browser passff - # tampermonkey + tampermonkey ublock-origin + vimium web-archives zotero-connector ]; @@ -51,7 +53,6 @@ template = "https://search.nixos.org/packages"; params = [ { name = "type"; value = "packages"; } - { name = "channel"; value = "unstable"; } { name = "query"; value = "{searchTerms}"; } ]; }]; @@ -65,27 +66,14 @@ definedAliases = [ "@nw" ]; }; "NixOS Options" = { - urls = [{ - template = "https://search.nixos.org/options"; - params = [ - # { name = "channel"; value = "${osConfig.system.nixos.release}"; } - { name = "channel"; value = "unstable"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; + urls = [{ template = "https://search.nixos.org/options?query={searchTerms}"; }]; icon = "https://nixos.org/favicon.png"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@no" ]; }; "Home manager options" = { - urls = [{ - template = "https://home-manager-options.extranix.com"; - params = [ - # { name = "release"; value = "release-${osConfig.system.nixos.release}"; } - { name = "release"; value = "master"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; + # urls = [{ template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=release-${osConfig.system.nixos.release}"; }]; + urls = [{ template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=release-25.05"; }]; icon = "https://mipmip.github.io/home-manager-option-search/images/favicon.png"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@hm" ]; diff --git a/home/minimal/fish.nix b/home/fish.nix similarity index 84% rename from home/minimal/fish.nix rename to home/fish.nix index ac50aeb..f8c7d2b 100644 --- a/home/minimal/fish.nix +++ b/home/fish.nix @@ -1,11 +1,20 @@ -{ config, ... }: - +{ config, pkgs, ... }: { + home.shellAliases = { + top = "btm --battery"; + ymd = "date +'%Y-%m-%d'"; + dmy = "date +'%-d.-%-m.%Y'"; + v = "nvim"; + r = "R --no-save --no-restore"; + R = "R --no-save --no-restore"; + cdg = "cd \$(git rev-parse --show-toplevel)"; + }; programs.fish = { enable = true; - interactiveShellInit = "fish_add_path ${config.xdg.dataHome}/npm/packages/bin"; - + shellAbbrs = { + openconnect = "openconnect --config=/home/till/.config/openconnect/config"; + }; shellInit = '' set -gx EDITOR "nvim" set -gx VISUAL "nvim" @@ -41,10 +50,6 @@ end end - function diary --description 'Create or edit today\'s diary entry' - nvim -c "call Diary()" - end - set -U fish_prompt_pwd_dir_length 0 function fish_prompt --description "Write out the prompt" diff --git a/home/desktop-slim/fonts.nix b/home/fonts.nix similarity index 92% rename from home/desktop-slim/fonts.nix rename to home/fonts.nix index fa3eb6c..d8db3b7 100644 --- a/home/desktop-slim/fonts.nix +++ b/home/fonts.nix @@ -1,11 +1,11 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { home.packages = with pkgs; [ anonymousPro cantarell-fonts cascadia-code - charis + charis-sil cm_unicode corefonts dejavu_fonts diff --git a/home/foot.nix b/home/foot.nix new file mode 100644 index 0000000..d8fc8ef --- /dev/null +++ b/home/foot.nix @@ -0,0 +1,58 @@ +{ config, pkgs, ... }: + +{ + programs.foot = { + enable = true; + settings = { + + main = { + shell = "${pkgs.fish}/bin/fish -c 'tmux attach'"; + pad = "34x34"; + # font = "JetBrains Mono:size=16"; + font = "Adwaita Mono:size=17"; + font-bold = "Adwaita Mono:size=17:weight=bold"; + font-italic = "Adwaita Mono:size=17:slant=italic"; + font-bold-italic = "Adwaita Mono:size=17:weight=boldslant=italic"; + initial-window-mode = "maximized"; + # line-height = "20"; + }; + + mouse.hide-when-typing = "yes"; + cursor = { + style = "beam"; + blink = true; + }; + + csd.size = "0"; + + colors = { + cursor = "eeeeee 1c1c1c"; + alpha = "1.0"; + background = "eeeeee"; + foreground = "1c1c1c"; + regular0 = "1c1c1c"; # black + bright0 = "585858"; # bright black + regular1 = "af0000"; # red + bright1 = "d70000"; # bright red + regular2 = "008700"; # green + bright2 = "5faf5f"; # bright green + regular3 = "d75f00"; # yellow + bright3 = "ffaf00"; # bright yellow + regular4 = "005faf"; # blue + bright4 = "0087af"; # bright blue + regular5 = "d70087"; # magenta + bright5 = "ff5faf"; # bright magenta + regular6 = "005f87"; # cyan + bright6 = "00afaf"; # bright cyan + regular7 = "ffffff"; # white + bright7 = "bcbcbc"; # bright white + }; + + key-bindings = { + show-urls-launch = "Control+Shift+g"; + show-urls-copy = "Control+Shift+y"; + }; + + }; + }; +} diff --git a/home/unused/gnome.nix b/home/gnome/default.nix similarity index 92% rename from home/unused/gnome.nix rename to home/gnome/default.nix index b7b8c4b..8336e51 100644 --- a/home/unused/gnome.nix +++ b/home/gnome/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { home.pointerCursor = { @@ -7,9 +7,12 @@ size = 32; }; + services.gnome-keyring.enable = false; + home.packages = with pkgs.gnomeExtensions; [ run-or-raise removable-drive-menu + # system-monitor ]; dconf.settings = { @@ -35,6 +38,7 @@ gtk-theme = "Adwaita"; }; "org/gnome/desktop/background" = { + picture-uri = "file://" + ./wallpaper_nix_paper_gray.svg; picture-options = "zoom"; }; "org/gnome/desktop/wm/keybindings" = { @@ -103,12 +107,5 @@ sleep-inactive-battery-timeout = 1200; }; }; - - xdg.configFile."run-or-raise/shortcuts.conf".text = '' - b,firefox,, - f,nautilus,, - g:always-run,tmux new-window -n vifm vifm ~/desktop,foot, - return,foot,, - p,keepassxc,,, - ''; + xdg.configFile."run-or-raise/shortcuts.conf".source = ./run-or-raise.conf; } diff --git a/home/gnome/run-or-raise.conf b/home/gnome/run-or-raise.conf new file mode 100644 index 0000000..783e5a5 --- /dev/null +++ b/home/gnome/run-or-raise.conf @@ -0,0 +1,40 @@ +# Here you list all the shortcuts. +# +# The shortcuts may be defined in two ways: +# +# 1. Run-or-raise form: shortcut,launch-command,[wm_class],[title] +# * wm_class and title are optional and case sensitive +# * if none is set, lowercased launch-command is compared with lowercased windows wm_classes and titles +# +# 2. Run only form: shortcut,calculate +# +# ================= +# Run or raise form +# ================= +# +# This line cycles any open gnome-terminal (matched by wm_class = Gnome-terminal on Ubuntu 17.10) OR if not found, launches new one. +# If you're using Arch, you may want to match by wm_class = gnome-terminal-server , just check yourself by Alt+F2/lg/Windows +b,firefox,, +f,nautilus,, +return,foot,, +p,keepassxc,,, + +# You may use regular expression in title or wm_class. +# Just put the regular expression between slashes. +# E.g. to jump to pidgin conversation window you may use this line +# (that means any windows of wm_class Pidgin, not containing the title Buddy List)" +# KP_1,pidgin,Pidgin,/^((?!Buddy List).)*$/ + +# Have the mail always at numpad-click. +# KP_2,chromium-browser --app=https://mail.google.com/mail/u/0/#inbox + +# ============= +# Run only form +# ============= +# +# This line will launch notify-send command. +# h,notify-send Hello world + +# Blank lines are allowed. Line starting with "#" means a comment. +# Now delete these shortcuts and put here yours. +# How to know wm_class? Alt+f2, lg, "windows" tab (at least on Ubuntu 17.10) diff --git a/home/gnome/wallpaper_nix_paper_gray.svg b/home/gnome/wallpaper_nix_paper_gray.svg new file mode 100644 index 0000000..f729f2d --- /dev/null +++ b/home/gnome/wallpaper_nix_paper_gray.svg @@ -0,0 +1,128 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/home/gpg.nix b/home/gpg.nix new file mode 100644 index 0000000..9563388 --- /dev/null +++ b/home/gpg.nix @@ -0,0 +1,27 @@ +{ config, pkgs, ... }: + +{ + + programs.gpg.settings = { + no-emit-version = true; + no-comments = true; + keyserver = "hkps://keys.openpgp.org/"; + keyserver-options = [ + "no-honor-keyserver-url" + "include-revoked" + ]; + personal-cipher-preferences = "AES256 AES192 AES CAST5"; + personal-digest-preferences = "SHA512 SHA384 SHA256 SHA224"; + cert-digest-algo = "SHA512"; + default-preference-list = "SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed"; + }; + + xdg.configFile."scdaemon" = { + text = '' + disable-ccid + pcsc-shared + ''; + target = "../.gnupg/scdaemon.conf"; + }; + +} diff --git a/home/guest.nix b/home/guest.nix new file mode 100644 index 0000000..bd0d8f1 --- /dev/null +++ b/home/guest.nix @@ -0,0 +1,60 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + home.username = "guest"; + home.homeDirectory = "/home/guest"; + home.stateVersion = "22.11"; + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + + programs.home-manager.enable = true; + + xdg.userDirs = { + enable = true; + createDirectories = true; + download = "${config.home.homeDirectory}/tmp"; + music = "${config.home.homeDirectory}/media/music"; + pictures = "${config.home.homeDirectory}/media/img"; + videos = "${config.home.homeDirectory}/media/vid"; + documents = "${config.home.homeDirectory}/misc"; + templates = "${config.xdg.dataHome}/templates"; + }; + + home.packages = with pkgs; [ + fzf + silver-searcher + tmux + nodejs + wl-clipboard + qbittorrent + vlc + mpv + ffmpeg + yt-dlp + libnotify + keepassxc + ]; + + services.syncthing.enable = true; + + imports = [ + ./gnome + ./firefox.nix + ./foot.nix + ./fish.nix + ./tmux + ./nvim + ./fonts.nix + ]; + + programs.nix-index = { + enable = true; + enableFishIntegration = true; + }; + +} diff --git a/home/librewolf.nix b/home/librewolf.nix new file mode 100644 index 0000000..3991dc1 --- /dev/null +++ b/home/librewolf.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + programs.librewolf.enable = true; +} diff --git a/home/mail/bindings.neomuttrc b/home/mail/bindings.neomuttrc new file mode 100644 index 0000000..92a2f00 --- /dev/null +++ b/home/mail/bindings.neomuttrc @@ -0,0 +1,85 @@ +# Navigation +bind pager k previous-entry +bind pager j next-entry +# bind index,pager \Cu half-up +# bind index,pager \Cd half-down +# bind pager gg top +# bind index gg first-entry +# bind pager G bottom +# bind index G last-entry +# bind index,pager N search-opposite +bind index display-message +bind index collapse-thread +bind index,pager gf change-folder + +# Read HTML +bind index,pager V noop +macro index,pager V "html" + +# compose +bind compose p postpone-message +bind compose P pgp-menu +# macro compose I "`tmpfile=$(mktemp -u --suffix .png -t XXXXXXXXXXXX -p ~/tmp) && wl-paste -t image/png > "$tmpfile" && echo "$tmpfile"`" "attach image from clipboard" + +bind editor complete-query +bind editor ^T complete +bind index,pager a group-reply +bind index,pager m noop +macro index,pager mar "newn*" "Mark all read" + +# compose with signature management +macro index,pager @ "set signature=$my_signature" "Compose to sender" +macro index,pager c "set signature=$my_signature" "Compose new message" +macro index,pager r "unset signature" "Reply to message" +macro index,pager a "unset signature" "Reply all" +macro index,pager f "unset signature" "Forward message" + +# moving messages +macro index,pager J ":set resolve=no\nn:set resolve=yes\n$my_junk" \ + "Move to junk folder" +macro index,pager y ":set resolve=no\nn:set resolve=yes\n$mbox" \ + "Move message to the archive" +macro index,pager I "$spoolfile" "Move message to the inbox" + +# switch folders +macro index,pager g! "$spoolfile" "Go to inbox" +macro index,pager gd "$postponed" "Go to drafts" +macro index,pager g< "$record" "Go to sent" +macro index,pager ga "$mbox" "Go to archive" +macro index,pager g> "$mbox" "Go to archive" +macro index,pager gt "$trash" "Go to trash" +macro index,pager gj "$my_junk" "Go to junk" + +# accounts +macro index,pager gu "~/.local/share/mail/gu/Inbox" "Go to GU" +# macro index,pager gp "+systemli/IMAP/Inbox" "Go to Systemli" +macro index,pager gm "~/.local/share/mail/t9e/Inbox" "Go to t9e" +# macro index,pager gm "+gmail/IMAP/Inbox" "Go to Gmail" +macro index,pager gk "~/.local/share/mail/ksh/Inbox" "Go to KSH" +macro index,pager gi "~/.local/share/mail/ktiu/Inbox" "Go to ktiu" +# macro index,pager gf "~/.local/share/mail/dkg/Inbox" "Go to DKG" + +macro index,pager L "all\n" "Show all messages (undo limit)" + +# macro index,pager go "mbsync -c ~/.config/mbsync/mbsyncrc $my_mbsync_acct && notmuch new &" \ +# "Run mbsync to sync mail for this account" + +macro index,pager go "mbsync $my_mbsync_acct && notmuch new" \ + +macro index,pager g/ "" "find in nm" + +macro index,pager A \ + "khard add-email --vcard-version=4.0" \ + "add the sender email address to khard" + +macro index,pager S \ + " ripmime -i - -d ~/tmp && rm ~/tmp/textfile*" \ + "save all non-text attachments using ripmime" + +macro index,pager gb \ + " urlscan" \ + "extract URLs out of a message" + +macro index,pager gO \ + "mbsync -a && notmuch new" \ + "run mbsync to sync all mail" diff --git a/home/mail/config.neomuttrc b/home/mail/config.neomuttrc new file mode 100644 index 0000000..870ebec --- /dev/null +++ b/home/mail/config.neomuttrc @@ -0,0 +1,153 @@ +set alias_file = ~/.local/share/neomutt/aliases.neomuttrc +source $alias_file + +set mailcap_path = ~/.config/neomutt/mailcap + +# source ./smime.neomuttrc + +set my_download_folder = ~/tmp + +# Caching and tmp +set header_cache = $XDG_CACHE_HOME/neomutt/headers +set message_cachedir = $XDG_CACHE_HOME/neomutt/bodies +set header_cache_backend = "lmdb" +set tmpdir = $XDG_CACHE_HOME/neomutt/tmp + +# Basic options +unset wait_key +set mbox_type = Maildir +# set delete +set mail_check_stats +unset confirm_append +unset beep +unset mark_old +set sleep_time = 0 +# set shell = /bin/bash + +# Sending +set use_envelope_from +unset reverse_realname + +# Searching +set nm_default_url = "notmuch:///home/till/.local/share/mail/" + +# Multi-account setup +# source ~/.config/neomutt/accounts/dkg.neomuttrc +# source ~/.config/neomutt/accounts/gu.neomuttrc +# bind index,pager g noop + +# folder-hook $folder/gu/ source ~/.config/neomutt/accounts/gu.neomuttrc +# folder-hook $folder/systemli/ source ~/.config/neomutt/accounts/systemli.neomuttrc +# folder-hook $folder/ks/ source ~/.config/neomutt/accounts/ks.neomuttrc +# folder-hook $folder/gmail/ source ~/.config/neomutt/accounts/gmail.neomuttrc +# folder-hook $folder/ktiu/ source ~/.config/neomutt/accounts/ktiu.neomuttrc +# folder-hook $folder/dkg/ source ~/.config/neomutt/accounts/dkg.neomuttrc +# folder-hook $folder/papa/ source ~/.config/neomutt/accounts/papa.neomuttrc + +folder-hook . source ~/.config/neomutt/bindings.neomuttrc + +# # Source config +# source ~/.config/neomutt/views.neomuttrc +# source ~/.config/neomutt/sidebar.neomuttrc +# source ~/.config/neomutt/colors.neomuttrc +# source ~/.config/neomutt/smime.neomuttrc +# source ~/.config/neomutt/pgp.neomuttrc + +# Compose +set editor = "nvim -c 'call woof#init#Init()'" +set edit_headers +set forward_format = "Fwd: %s" +set forward_attachments +set fast_reply +set include +set forward_quote +unset recall +set resume_draft_files +set abort_noattach_regex = "(attach|enclosed|anbei|anhängen|angehängt|anhang|anhänge|hängt an)" +set abort_noattach = ask-yes +set mime_type_query_command = "file -b --mime-type %s" +set query_command= "khard email --parsable '%s'" + +# Status bar +set status_chars = "✔↻٪A" +set status_format = "— [ %r ] %f (%lB) %>— %m messages%?n? [ %n new ]?%?d? [ %d to delete ]?%?t? [ %t tagged ]? —" +unset help + +# Index +set index_format = "%-25.25F %<[y?%<[7d?%<[d?%[ %H:%M]&%[%a %H:%M]>&%[%d.%m. %Hh]>&%[%d.%m.%Y]> %Z %?X?▼ &?%s" +set strict_threads +set send_charset = "utf-8:iso-8859-1:us-ascii" +set charset = "utf-8" + +# sorting +set sort = threads +set sort_aux = reverse-last-date-received + +# Pager view +set pager_index_lines = 10 +set pager_context = 3 +set pager_stop +set smart_wrap +set menu_scroll +set tilde +unset markers +ignore * +unignore from: to: cc: bcc: date: subject: +unhdr_order * +hdr_order from: to: cc: bcc: date: subject: +alternative_order text/plain text/enriched text/html +auto_view text/html + +# Attachments +set rfc2047_parameters +set attach_save_dir = $my_download_folder + +## Indicator +color indicator brightwhite brightblack + +## Index +color index_flags brightmagenta default '.*' +color index_date cyan default + +## New mail +color index brightblack default '~N' + +## Header colors +color header brightblack default ".*" +color header brightgreen default "^(Subject)" +color header yellow default "^(From|To|CC|BCC)" +color header blue default "^Date" + +## Status +# color status yellow default '\[ ↻ \]' +# color status green default '\[ ✔ \]' +# color status magenta default '\[ ٪ \]' +# color status black default '\[ [0-9]+ new \]' +# color status red default '\[ [0-9]+ to delete \]' + +## Mutt +color message cyan default +color error red default +color tilde black default + +## Pager +color normal default default +color attachment brightblack default +color search black yellow +color quoted green default +color quoted1 blue default +color quoted2 cyan default +color quoted3 yellow default +color quoted4 red default +color quoted5 brightred default +color signature cyan default +color underline black default + +## Email +color body blue default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses +color body blue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL +color body red default "(BAD signature)" +color body green default "(Good signature)" +color body brightblack default "^gpg: .*" +color body green default "^gpg: Good signature .*" +color body red default "^gpg: BAD signature from.*" diff --git a/home/mail/default.nix b/home/mail/default.nix new file mode 100644 index 0000000..0285349 --- /dev/null +++ b/home/mail/default.nix @@ -0,0 +1,233 @@ +{ config, pkgs, ... }: + +{ + programs.msmtp = { + enable = true; + configContent = '' + defaults + logfile ${config.xdg.stateHome}/msmtp/msmtp.log + port 587 + ''; + }; + + programs.mbsync.enable = true; + programs.neomutt = { + enable = true; + vimKeys = true; + extraConfig = builtins.readFile ./config.neomuttrc; + }; + + programs.notmuch.enable = true; + + xdg.configFile."neomutt/bindings.neomuttrc".source = ./bindings.neomuttrc; + xdg.configFile."neomutt/smime.neomuttrc".source = ./smime.neomuttrc; + xdg.configFile."neomutt/mailcap".source = ./neomutt_mailcap; + + accounts.email = { + maildirBasePath = "${config.xdg.dataHome}/mail"; + accounts = { + + gu = { + primary = true; + address = "straube@geo.uni-frankfurt.de"; + realName = "Till Straube"; + imap.host = "imap.server.uni-frankfurt.de"; + smtp.host = "smtpauth.rz.uni-frankfurt.de"; + smtp.tls.useStartTls = true; + userName = "tstraube"; + notmuch.enable = true; + passwordCommand = "pass uni/hrz"; + signature = { + text = '' + Dr. Till Straube (he/him) + Dept. of Human Geography + Goethe University Frankfurt + ''; + showSignature = "append"; + }; + mbsync.enable = true; + mbsync.create = "maildir"; + msmtp.enable = true; + neomutt = { + enable = true; + sendMailCommand = "/home/till/.nix-profile/bin/msmtp"; + extraConfig = '' + set mbox='+Archive' + set my_junk='+Spamverdacht' + set my_mbsync_acct='gu' + + set crypt_auto_smime + unset crypt_auto_pgp + + set crypt_autosign + set crypt_replyencrypt + set crypt_replysign + set crypt_replysignencrypted + set crypt_verify_sig + # set smime_default_key = "f1355556.0" + set smime_sign_as = "f1355556.0" + set pgp_default_key = "" + # unset crypt_use_gpgme + + unalternates * + alternates ^straube@em.uni-frankfurt.de$ \ + ^tstraube@em.uni-frankfurt.de$ \ + ^tstraube@rz.uni-frankfurt.de$ \ + ^tstraube@uni-frankfurt.de$ + unset reverse_name + set my_signature = ${ + pkgs.writeText + "signature.txt" + config.accounts.email.accounts.gu.signature.text + } + color status blue default + ''; + }; + }; + + t9e = { + address = "till.straube@t9e.me"; + realName = "Till Straube"; + imap.host = "arielle.ktiu.net"; + smtp.host = "arielle.ktiu.net"; + smtp.tls.useStartTls = true; + notmuch.enable = true; + userName = "till.straube@t9e.me"; + signature.text = '' + Till Straube (he/him) + PGP key: https://keys.openpgp.org/search?q=till.straube@t9e.me + ''; + signature.showSignature = "append"; + gpg = { + key = "5FA6782F543D12ED07110780BA1B73F10BABF8E3"; + signByDefault = true; + }; + neomutt = { + enable = true; + sendMailCommand = "/home/till/.nix-profile/bin/msmtp"; + extraConfig = '' + set my_mbsync_acct='t9e' + set mbox='+Archive' + set my_junk='+Junk' + + set crypt_auto_pgp + unset crypt_auto_smime + + unalternates * + alternates @t9e.me$ @ktiu.net$ + set reverse_name + + set my_signature = ${ + pkgs.writeText + "signature.txt" + config.accounts.email.accounts.t9e.signature.text + } + color status green default + ''; + }; + mbsync.enable = true; + mbsync.create = "maildir"; + msmtp = { + enable = true; + extraConfig.from = "*@t9e.me"; + }; + passwordCommand = "pass mail/arielle.ktiu.net"; + }; + + ktiu = { + address = "till@ktiu.net"; + realName = "Till Straube"; + imap.host = "shorbut.ktiu.net"; + smtp.host = "shorbut.ktiu.net"; + smtp.tls.useStartTls = true; + notmuch.enable = true; + userName = "till"; + signature.text = '' + Till Straube (he/him) + PGP key: https://keys.openpgp.org/search?q=till@ktiu.net + ''; + signature.showSignature = "append"; + gpg = { + key = "5FA6782F543D12ED07110780BA1B73F10BABF8E3"; + signByDefault = true; + }; + neomutt = { + enable = true; + sendMailCommand = "/home/till/.nix-profile/bin/msmtp"; + extraConfig = '' + set my_mbsync_acct='ktiu' + + set mbox='+Archive' + set my_junk='+Junk' + + set crypt_auto_pgp + unset crypt_auto_smime + + unalternates * + alternates @ktiu.net$ + set reverse_name + set my_signature = ${ + pkgs.writeText + "signature.txt" + config.accounts.email.accounts.ktiu.signature.text + } + color status green default + ''; + }; + mbsync.enable = true; + mbsync.create = "maildir"; + msmtp = { + enable = true; + extraConfig.from = "*@ktiu.net"; + }; + passwordCommand = "secret-tool lookup server shorbut.ktiu.net account till"; + }; + + ksh = { + address = "kein_schlussstrich_hessen@systemli.org"; + realName = "Kein Schlussstrich Hessen"; + imap.host = "mail.systemli.org"; + smtp.host = "mail.systemli.org"; + smtp.tls.useStartTls = true; + notmuch.enable = true; + userName = "kein_schlussstrich_hessen@systemli.org"; + signature.text = '' + Kein Schlussstrich Hessen + PGP Key: https://keys.openpgp.org/search?q=kein_schlussstrich_hessen@systemli.org + ''; + signature.showSignature = "append"; + neomutt = { + enable = true; + sendMailCommand = "/home/till/.nix-profile/bin/msmtp"; + extraConfig = '' + set my_mbsync_acct='ksh' + set mbox='+Erledigt' + set my_junk='+Junk' + set postponed='+Drafts' + set record='+Sent' + set trash='+Trash' + set crypt_auto_pgp + unset crypt_auto_smime + + unalternates * + set reverse_name + set my_signature = ${ + pkgs.writeText + "signature.txt" + config.accounts.email.accounts.ksh.signature.text + } + color status cyan default + ''; + }; + mbsync.enable = true; + mbsync.create = "maildir"; + msmtp = { + enable = true; + extraConfig.from = "kein_schlussstrich_hessen@systemli.org"; + }; + passwordCommand = "secret-tool lookup server mail.systemli.org account kein_schlussstrich_hessen@systemli.org"; + }; + + }; + }; +} diff --git a/home/mail/neomutt_mailcap b/home/mail/neomutt_mailcap new file mode 100644 index 0000000..1718345 --- /dev/null +++ b/home/mail/neomutt_mailcap @@ -0,0 +1,11 @@ +application/pdf; zathura %s +multipart; xdg-open %s +text/html; firefox %s; description=HTML Text; nametemplate=%s.html; needsterminal +text/html; w3m -v -F -T text/html -dump %s; copiousoutput +text; neomutt %s +application; xdg-open %s +image; xdg-open %s +video; xdg-open %s +audio; xdg-open %s +message; xdg-open %s +model; xdg-open %s diff --git a/home/mail/smime.neomuttrc b/home/mail/smime.neomuttrc new file mode 100644 index 0000000..60f57e5 --- /dev/null +++ b/home/mail/smime.neomuttrc @@ -0,0 +1,24 @@ +# Locations +# set smime_ca_location="~/.keys/neomutt/smime/ca" +# set smime_certificates="~/.keys/neomutt/smime/public" +# set smime_keys="~/.keys/neomutt/smime/private" + +# Commands (smime_keys) +set smime_pk7out_command="openssl smime -verify -in %f -noverify -pk7out" +set smime_get_cert_command="openssl pkcs7 -print_certs -in %f" +set smime_get_signer_cert_command="openssl smime -verify -in %f -noverify -signer %c -out /dev/null" +set smime_get_cert_email_command="openssl x509 -in %f -noout -email" +set smime_import_cert_command="smime_keys add_cert %f" + +# Outgoing +set smime_encrypt_with="aes256" +set smime_encrypt_command="openssl smime -encrypt -%a -outform DER -in %f %c" +set smime_sign_digest_alg="sha256" +set smime_sign_command="openssl smime -sign -md %d -signer %c -inkey %k -passin stdin -in %f -certfile %i -outform DER" + +# Incoming +set smime_decrypt_command="openssl smime -decrypt -passin stdin -inform DER -in %f -inkey %k -recip %c" +set smime_verify_command="openssl smime -verify -inform DER -in %s %C -content %f" +set smime_verify_opaque_command="\ +openssl smime -verify -inform DER -in %s %C || \ +openssl smime -verify -inform DER -in %s -noverify 2>/dev/null" diff --git a/home/minimal.nix b/home/minimal.nix new file mode 100644 index 0000000..5f12b1c --- /dev/null +++ b/home/minimal.nix @@ -0,0 +1,78 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + home.username = "till"; + home.homeDirectory = "/home/till"; + home.stateVersion = "22.11"; + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + + programs.home-manager.enable = true; + + xdg.userDirs = { + enable = true; + + desktop = "${config.home.homeDirectory}/desktop"; + documents = "${config.home.homeDirectory}/misc"; + download = "${config.home.homeDirectory}/tmp"; + music = "${config.home.homeDirectory}/media/music"; + pictures = "${config.home.homeDirectory}/media/img"; + publicShare = "${config.home.homeDirectory}/box"; + templates = "${config.xdg.dataHome}/templates"; + videos = "${config.home.homeDirectory}/media/vid"; + }; + + home.packages = with pkgs; [ + dust + fzf + jq + progress + rename + silver-searcher + tldr + tmux + ]; + + imports = [ + ./fish.nix + ./tmux + ./password-store.nix + ./vifm + ./nvim + ./gpg.nix + ./ssh.nix + ]; + + programs.nix-index = { + enable = true; + enableFishIntegration = true; + }; + + programs.git = { + enable = true; + settings = { + user.name = "Till"; + user.email = "till@ktiu.net"; + pull.rebase = true; + extraConfig = { + init = { + defaultBranch = "main"; + }; + }; + }; + lfs = { + enable = true; + }; + }; + + programs.bottom = { + enable = true; + settings.styles.theme = "default-light"; + }; + +} diff --git a/home/minimal/default.nix b/home/minimal/default.nix deleted file mode 100644 index 97340c3..0000000 --- a/home/minimal/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ config, pkgs, ... }: - -{ - programs.home-manager.enable = true; - - home.homeDirectory = "/home/${config.home.username}"; - - imports = [ - ./fish.nix - ./vifm.nix - ./nvim - ./tmux.nix - ./git.nix - ]; - - home.packages = with pkgs; [ - dust - eza - fastfetch - fzf - jq - nh - nix-search - progress - rename - silver-searcher - tldr - tmux - yq - ]; - - home.shellAliases = { - cdg = "cd \$(git rev-parse --show-toplevel)"; - dmy = "date +'%-d.-%-m.%Y'"; - du = "dust"; - ls = "eza"; - tree = "eza --tree"; - top = "btm --battery"; - ymd = "date +'%Y-%m-%d'"; - }; - - programs.nix-index = { - enable = true; - enableFishIntegration = true; - }; - - programs.bottom = { - enable = true; - }; - - home.stateVersion = "22.11"; -} diff --git a/home/minimal/git.nix b/home/minimal/git.nix deleted file mode 100644 index 6672801..0000000 --- a/home/minimal/git.nix +++ /dev/null @@ -1,13 +0,0 @@ -{...}: - -{ - programs.git = { - enable = true; - signing.format = "openpgp"; - settings = { - pull.rebase = true; - extraConfig.init.defaultBranch = "main"; - }; - lfs.enable = true; - }; -} diff --git a/home/minimal/nvim/default.nix b/home/minimal/nvim/default.nix deleted file mode 100644 index 1a23c4e..0000000 --- a/home/minimal/nvim/default.nix +++ /dev/null @@ -1,255 +0,0 @@ -{ pkgs, ... }: - -{ - home.packages = with pkgs; [ - astro-language-server - marksman - nil - tree-sitter - typescript-language-server - vim-language-server - ]; - - programs.neovim = { - - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - - extraConfig = builtins.readFile ./config.vim; - - plugins = with pkgs.vimPlugins; - - [ - cmp-buffer - cmp-cmdline - cmp-emoji - cmp-fish - cmp-nvim-lsp - cmp-nvim-ultisnips - cmp-path - - { - plugin = vim-fugitive; - type = "lua"; - config = '' - vim.api.nvim_set_keymap("n", "g", ":Git", { noremap = true, silent = true }) - ''; - } - - { - plugin = fzf-vim; - type = "lua"; - config = '' - vim.api.nvim_set_keymap('i', '', '(fzf-complete-path)', { silent = true }) - vim.api.nvim_set_keymap('i', '', '(fzf-complete-word)', { silent = true }) - vim.api.nvim_set_keymap('i', '', '(fzf-complete-line)', { silent = true }) - - vim.api.nvim_set_keymap('n', '', '(fzf-maps-n)', { silent = true }) - vim.api.nvim_set_keymap('x', '', '(fzf-maps-x)', { silent = true }) - vim.api.nvim_set_keymap('o', '', '(fzf-maps-o)', { silent = true }) - - vim.api.nvim_set_keymap('n', 'b', ':Buffers', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', 'o', ':Files', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', 'O', ':Files ~/', { noremap = true }) - vim.api.nvim_set_keymap('n', 'r', ':Read', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', 'R', ':Read ~/', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', 'a', ':Ag', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', 'A', ':Ag ~/', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', '.', ':Files ~/devel/omniflake/', { noremap = true, silent = true }) - - vim.api.nvim_create_user_command( - 'Read', - 'call fzf#run(fzf#wrap({\'sink\': \'read\', \'dir\': }))', - { nargs = '?', complete = 'dir' } - ) - ''; - } - - { - plugin = goyo-vim; - type = "viml"; - config = '' - nnoremap yog :Goyo - nnoremap [og :Goyo 80 - nnoremap ]og :Goyo! - ''; - } - { - plugin = limelight-vim; - type = "viml"; - config = '' - set termguicolors - let g:limelight_conceal_ctermfg = 'darkgray' - - nnoremap yof :Limelight!! - nnoremap [of :Limelight - nnoremap ]of :Limelight! - ''; - } - - nabla-nvim - - { - plugin = nvim-cmp; - type = "lua"; - config = builtins.readFile ./nvim-cmp.lua; - } - - { - plugin = nvim-colorizer-lua; - type = "viml"; - config = "lua require 'colorizer'.setup()"; - } - - { - plugin = nvim-lspconfig; - type = "lua"; - config = '' - vim.lsp.enable('astro') - vim.lsp.enable('marksman') - vim.lsp.enable('nil_ls') - vim.lsp.enable('r_language_server') - vim.lsp.enable('rust_analyzer') - vim.lsp.enable('texlab') - vim.lsp.enable('ts_ls') - vim.lsp.enable('vimls') - vim.api.nvim_del_keymap('i', '') - vim.keymap.set({ 'i' }, "", vim.lsp.buf.signature_help, { desc = "Show signature help" }) - ''; - } - - { - plugin = (nvim-treesitter.withPlugins (p: [ p.nix p.lua p.r p.typescript ])); - type = "lua"; - config = '' - vim.api.nvim_create_autocmd('FileType', { - pattern = { 'nix', 'markdown', 'lua', 'r' }, - callback = function() - -- Enable Tree-sitter-based folding - vim.o.foldexpr = 'v:lua.vim.treesitter.foldexpr()' - vim.o.foldmethod = 'expr' - -- Optional: configure fold behavior - vim.o.foldlevel = 99 - vim.o.foldlevelstart = 99 - end, - }) - ''; - } - - # { - # plugin = catppuccin-nvim; - # type = "viml"; - # config = '' - # colorscheme catppuccin-nvim - # ''; - # } - - { - plugin = papercolor-theme; - type = "viml"; - config = '' - colorscheme PaperColor - ''; - } - - quarto-nvim - typescript-vim - - { - plugin = ultisnips; - type = "lua"; - config = '' - vim.api.nvim_set_keymap('n', 'se', ':UltiSnipsEdit!', { noremap = true, silent = true }) - ''; - } - - vifm-vim - - { - plugin = vim-astro; - type = "viml"; - config = '' - let g:astro_typescript = 'enable' - ''; - } - - vim-commentary - - { - plugin = vim-easy-align; - type = "viml"; - config = '' - xmap ga (EasyAlign) - nmap ga (EasyAlign) - ''; - } - - vim-fish - vim-nix - - # { - # plugin = vim-pandoc; - # config = '' - # let g:pandoc#modules#disabled = ["completion", "command", "menu"] - # ''; - # } - - vim-pandoc-syntax - vim-repeat - - { - plugin = vim-slime; - type = "viml"; - config = '' - let g:slime_target = "tmux" - let g:slime_default_config = {"socket_name": get(split($TMUX, ","), 0), "target_pane": ":.2"} - let g:slime_no_mappings = 1 - let g:slime_dont_ask_default = 1 - xmap s SlimeRegionSend - nmap s SlimeMotionSend - nmap ss SlimeLineSend - nnoremap s: :SlimeSend1 - ''; - } - - vim-snippets - vim-speeddating - vim-surround - - { - plugin = vim-unimpaired; - type = "viml"; - config = '' - nnoremap =p - nnoremap =P - nnoremap =s - ''; - } - - { - plugin = vimwiki; - type = "viml"; - config = '' - let g:vimwiki_list = [ { 'path': '~/notes/', 'syntax': 'markdown', 'ext': '.md' } ] - nnoremap wt - nnoremap wt - nmap VimwikiNextLink - nmap VimwikiPrevLink - let g:vimwiki_key_mappings = { 'headers': 0, 'text_objs': 0, 'lists': 0, 'lists_return': 0, 'html': 0 } - ''; - } - ]; - - withRuby = false; - withPython3 = true; - }; - - xdg.configFile."nvim" = { - source = ./dotfiles; - recursive = true; - }; - - home.shellAliases.v = "nvim"; -} diff --git a/home/minimal/nvim/dotfiles/ftplugin/nix.vim b/home/minimal/nvim/dotfiles/ftplugin/nix.vim deleted file mode 100644 index 4f0eba3..0000000 --- a/home/minimal/nvim/dotfiles/ftplugin/nix.vim +++ /dev/null @@ -1 +0,0 @@ -setlocal makeprg=nixos-rebuild\ dry-build diff --git a/home/minimal/nvim/nvim-cmp.lua b/home/minimal/nvim/nvim-cmp.lua deleted file mode 100644 index 7ac7e74..0000000 --- a/home/minimal/nvim/nvim-cmp.lua +++ /dev/null @@ -1,54 +0,0 @@ -local cmp = require'cmp' - -cmp.setup({ - - snippet = { - expand = function(args) - vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. - end, - }, - - mapping = cmp.mapping.preset.insert( - { - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = false }), - } - ), - - sources = cmp.config.sources({ - { name = 'cmp_pandoc' }, - { name = 'emoji' }, - { name = 'fish' }, - { name = 'nvim_lsp' }, - { name = 'path' }, - { name = 'ultisnips' }, - }, { - { name = 'buffer' }, - }) - -}) - --- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } -}) - --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }), - matching = { disallow_symbol_nonprefix_matching = false } -}) - --- Set up lspconfig. -local capabilities = require('cmp_nvim_lsp').default_capabilities() diff --git a/home/minimal/tmux.nix b/home/minimal/tmux.nix deleted file mode 100644 index 7049270..0000000 --- a/home/minimal/tmux.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, config, ... }: - -{ - programs.tmux = { - enable = true; - escapeTime = 0; - mouse = true; - newSession = true; - shell = "${pkgs.fish}/bin/fish"; - }; - - xdg.configFile."tmux" = { - source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/dotfiles/tmux"; - recursive = true; - }; -} diff --git a/home/npm.conf b/home/npm.conf new file mode 100644 index 0000000..dc3f6fb --- /dev/null +++ b/home/npm.conf @@ -0,0 +1 @@ +prefix = ${HOME}/.npm-packages diff --git a/home/minimal/nvim/dotfiles/after/ftplugin/markdown.vim b/home/nvim/after/ftplugin/markdown.vim similarity index 100% rename from home/minimal/nvim/dotfiles/after/ftplugin/markdown.vim rename to home/nvim/after/ftplugin/markdown.vim diff --git a/home/minimal/nvim/dotfiles/autocommands.vim b/home/nvim/autocommands.vim similarity index 66% rename from home/minimal/nvim/dotfiles/autocommands.vim rename to home/nvim/autocommands.vim index 354e037..09fee23 100644 --- a/home/minimal/nvim/dotfiles/autocommands.vim +++ b/home/nvim/autocommands.vim @@ -9,3 +9,9 @@ augroup netrw autocmd! autocmd FileType netrw setl bufhidden=wipe augroup end + +augroup repl + autocmd! + autocmd TermOpen * setlocal nonumber norelativenumber + autocmd TermOpen * nmap Q :bdelete! +augroup end diff --git a/home/minimal/nvim/config.vim b/home/nvim/config.vim similarity index 75% rename from home/minimal/nvim/config.vim rename to home/nvim/config.vim index 57ae46f..e1dbf9c 100644 --- a/home/minimal/nvim/config.vim +++ b/home/nvim/config.vim @@ -23,26 +23,25 @@ set splitright set tabstop=2 set updatetime=300 -set foldmethod=expr -set foldexpr=nvim_treesitter#foldexpr() - let g:netrw_liststyle = 3 let g:netrw_fastbrowse = 0 nnoremap Y y$ -nnoremap cd :lcd %:h -nnoremap ew :e =expand("%:p:h") . "/" - nnoremap gF :edit nnoremap gx :! xdg-open nnoremap :bnext nnoremap :bnext nnoremap Q :bdelete +nnoremap h +nnoremap j +nnoremap k +nnoremap l nnoremap :hide nnoremap m :make +nnoremap M :!home-manager switch tnoremap @@ -53,13 +52,9 @@ onoremap al :normal val xnoremap i% GoggV onoremap i% :normal vi% -" highlight Normal guibg=NONE - function CreateNote(title) - execute "VimwikiIndex" - execute "VimwikiGoto " . a:title -endfunction - -function Diary() - execute "VimwikiMakeDiaryNote" + execute "file ~/notes/" . strftime("%Y-%m-%d") . "_" . join(split(tolower(a:title)), "_") . ".md" + execute "set ft=markdown" + execute "normal! i" . a:title + execute "normal V\yaml_note\" endfunction diff --git a/home/nvim/default.nix b/home/nvim/default.nix new file mode 100644 index 0000000..7421dd5 --- /dev/null +++ b/home/nvim/default.nix @@ -0,0 +1,148 @@ +{ config, pkgs, ... }: + +{ + imports = [ ./khard-dump.nix ]; + + home.packages = with pkgs; [ + astro-language-server + marksman + nil + typescript-language-server + ]; + + programs.neovim = { + + enable = true; + defaultEditor = true; + + extraConfig = builtins.readFile ./config.vim; + + plugins = with pkgs.vimPlugins; + let + woof = pkgs.vimUtils.buildVimPlugin { + name = "woof.vim"; + src = builtins.fetchGit { + url = "ssh://git@shorbut.ktiu.net/home/git/woof.vim/"; + ref = "main"; + rev = "c29eb50e30ed75cf9ecdcfff198454fcc2c16922"; + }; + }; + in + [ + woof + + cmp-nvim-lsp + cmp-buffer + cmp-emoji + cmp-path + cmp-cmdline + cmp-nvim-ultisnips + nvim-cmp + + { + plugin = nvim-lspconfig; + type = "lua"; + config = builtins.readFile ./lsp.lua; + } + + { + plugin = fzf-vim; + config = '' + nnoremap :Buffers + imap (fzf-complete-path) + nnoremap o :Files + nnoremap O :Files ~/ + nnoremap r :Read + nnoremap R :Read ~/ + nnoremap a :Ag + nnoremap b :Buffers + nnoremap . :Files ~/devel/omniflake/ + command! -nargs=? -complete=dir Read call fzf#run( + \fzf#wrap({'sink': 'read', 'dir': }) + \) + ''; + } + { + plugin = goyo; + config = '' + nnoremap yog :Goyo + nnoremap [og :Goyo 80 + nnoremap ]og :Goyo! + ''; + } + { + plugin = limelight-vim; + config = '' + set termguicolors + let g:limelight_conceal_ctermfg = 'darkgray' + nnoremap yof :Limelight!! + nnoremap [of :Limelight + nnoremap ]of :Limelight! + ''; + } + { + plugin = nvim-colorizer-lua; + config = "lua require 'colorizer'.setup()"; + } + { + plugin = papercolor-theme; + config = '' + set background=light + colorscheme PaperColor + ''; + } + typescript-vim + { + plugin = ultisnips; + config = '' + nnoremap se :UltiSnipsEdit! + ''; + } + vifm-vim + { + plugin = vim-astro; + config = '' + let g:astro_typescript = 'enable' + ''; + } + vim-commentary + { + plugin = vim-easy-align; + config = '' + xmap ga (EasyAlign) + nmap ga (EasyAlign) + ''; + } + vim-fish + vim-nix + vim-repeat + { + plugin = vim-slime; + config = '' + let g:slime_target = "tmux" + let g:slime_default_config = {"socket_name": get(split($TMUX, ","), 0), "target_pane": ":.1"} + let g:slime_no_mappings = 1 + let g:slime_dont_ask_default = 1 + xmap s SlimeRegionSend + nmap s SlimeMotionSend + nmap ss SlimeLineSend + nnoremap s: :SlimeSend1 + " let g:slime_target = "neovim" + " autocmd TermOpen * let g:slime_default_config = {"jobid": &channel} + ''; + } + vim-snippets + vim-speeddating + vim-surround + vim-unimpaired + ]; + }; + xdg.configFile."nvim/autocommmands.vim".source = ./autocommands.vim; + xdg.configFile."nvim/ftplugin/markdown.vim".source = ./ftplugin/markdown.vim; + xdg.configFile."nvim/after/ftplugin/markdown.vim".source = ./after/ftplugin/markdown.vim; + xdg.configFile."nvim/ftplugin/r.vim".source = ./ftplugin/r.vim; + xdg.configFile."nvim/ftplugin/rmd.vim".source = ./ftplugin/rmd.vim; + xdg.configFile."nvim/ftplugin/tex.vim".source = ./ftplugin/tex.vim; + xdg.configFile."nvim/ftplugin/typescript.vim".source = ./ftplugin/typescript.vim; + xdg.configFile."nvim/syntax/rmd.vim".source = ./syntax/rmd.vim; +} diff --git a/home/minimal/nvim/dotfiles/ftplugin/markdown.vim b/home/nvim/ftplugin/markdown.vim similarity index 100% rename from home/minimal/nvim/dotfiles/ftplugin/markdown.vim rename to home/nvim/ftplugin/markdown.vim diff --git a/home/minimal/nvim/dotfiles/ftplugin/r.vim b/home/nvim/ftplugin/r.vim similarity index 100% rename from home/minimal/nvim/dotfiles/ftplugin/r.vim rename to home/nvim/ftplugin/r.vim diff --git a/home/minimal/nvim/dotfiles/ftplugin/rmd.vim b/home/nvim/ftplugin/rmd.vim similarity index 100% rename from home/minimal/nvim/dotfiles/ftplugin/rmd.vim rename to home/nvim/ftplugin/rmd.vim diff --git a/home/minimal/nvim/dotfiles/ftplugin/tex.vim b/home/nvim/ftplugin/tex.vim similarity index 100% rename from home/minimal/nvim/dotfiles/ftplugin/tex.vim rename to home/nvim/ftplugin/tex.vim diff --git a/home/minimal/nvim/dotfiles/ftplugin/typescript.vim b/home/nvim/ftplugin/typescript.vim similarity index 100% rename from home/minimal/nvim/dotfiles/ftplugin/typescript.vim rename to home/nvim/ftplugin/typescript.vim diff --git a/home/desktop-full/khard-dump.nix b/home/nvim/khard-dump.nix similarity index 100% rename from home/desktop-full/khard-dump.nix rename to home/nvim/khard-dump.nix diff --git a/home/minimal/nvim/lsp.lua b/home/nvim/lsp.lua similarity index 100% rename from home/minimal/nvim/lsp.lua rename to home/nvim/lsp.lua diff --git a/home/minimal/nvim/dotfiles/syntax/rmd.vim b/home/nvim/syntax/rmd.vim similarity index 100% rename from home/minimal/nvim/dotfiles/syntax/rmd.vim rename to home/nvim/syntax/rmd.vim diff --git a/home/on-server.nix b/home/on-server.nix new file mode 100644 index 0000000..a951b8a --- /dev/null +++ b/home/on-server.nix @@ -0,0 +1,13 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + home.file.".npmrc".text = '' + prefix = ${config.xdg.dataHome}/npm/packages + ''; + + imports = [ + ./minimal.nix + ./devel.nix + ]; + +} diff --git a/home/openconnect.nix b/home/openconnect.nix new file mode 100644 index 0000000..0fd5b5a --- /dev/null +++ b/home/openconnect.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + home.packages = [ pkgs.openconnect ]; + xdg.configFile."openconnect/config".text = '' + server=vpn-einwahl.uni-frankfurt.de + user=tstraube + protocol=anyconnect + ''; +} diff --git a/home/desktop-slim/password-store.nix b/home/password-store.nix similarity index 64% rename from home/desktop-slim/password-store.nix rename to home/password-store.nix index af8f9e3..d9ba727 100644 --- a/home/desktop-slim/password-store.nix +++ b/home/password-store.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: { + programs.password-store = { enable = true; settings = { @@ -12,18 +13,12 @@ pkgs.passff-host ]; - services.gnome-keyring.enable = false; - services.pass-secret-service = { enable = true; }; - xdg.configFile."scdaemon" = { - text = '' - disable-ccid - pcsc-shared - ''; - target = "../.gnupg/scdaemon.conf"; - }; + home.packages = with pkgs; [ + pinentry-all + ]; } diff --git a/home/r.nix b/home/r.nix new file mode 100644 index 0000000..91de769 --- /dev/null +++ b/home/r.nix @@ -0,0 +1,92 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; + let + customPackages = with rPackages; let + lectuR = pkgs.rPackages.buildRPackage { + name = "lectuR"; + src = builtins.fetchGit { + url = "ssh://git@shorbut.ktiu.net/home/git/lectuR/"; + ref = "main"; + rev = "0aafe4eb057a7ec12b8d6ac40ce0bfc8dab80c2b"; + }; + propagatedBuildInputs = [ purrr magrittr knitr kableExtra tidyr stringr yaml ]; + nativeBuildInputs = [ purrr magrittr knitr kableExtra tidyr stringr yaml ]; + }; + publishR = pkgs.rPackages.buildRPackage { + name = "publishR"; + src = builtins.fetchGit { + url = "ssh://git@shorbut.ktiu.net/home/git/publishR/"; + ref = "main"; + rev = "ee137a66ca3b713205ac44e5165292e7ad6388b6"; + }; + propagatedBuildInputs = []; + nativeBuildInputs = []; + }; + goethR = pkgs.rPackages.buildRPackage { + name = "goethR"; + src = builtins.fetchGit { + url = "ssh://git@arielle.ktiu.net/home/git/goethR/"; + ref = "main"; + rev = "e3dbfd319f01adfa4a1a1a8abc274014e6498aae"; + }; + propagatedBuildInputs = []; + nativeBuildInputs = []; + }; + in [ + bookdown + catmaply + clipr + DAAG + devtools + dplyr + eurostat + extrafont + ggplot2 + ggridges + jsonlite + kableExtra + knitr + languageserver + magrittr + mapproj + # networkD3 + openxlsx + osmdata + plotly + progress + purrr + qrcode + RColorBrewer + readODS + revealjs + # restatis + rlist + rmarkdown + rnaturalearth + rnaturalearthdata + # roxygen2 + # RSQLite + rvest + sf + stringr + # swirl + # testthat + tidyr + tidyverse + tmap + xlsx + yaml + lectuR + publishR + # goethR + # ggtree + ]; + R-packed = rWrapper.override { packages = customPackages; }; + RStudio-packed = rstudioWrapper.override { packages = customPackages; }; + in [ + R-packed + RStudio-packed + ]; +} diff --git a/home/slim-desktop.nix b/home/slim-desktop.nix new file mode 100644 index 0000000..f1cacda --- /dev/null +++ b/home/slim-desktop.nix @@ -0,0 +1,92 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + xdg.userDirs.createDirectories = true; + + home.file.".npmrc".text = '' + prefix = ${config.xdg.dataHome}/npm/packages + ''; + + xdg.configFile."castget/castget.conf".source = ./castget/castget.conf; + + home.packages = with pkgs; [ + + aichat + usbutils + wl-clipboard + + # email + msmtp + notmuch + w3m + openssl + # gnupg + urlscan + ripmime + + # office + khal + khard + taskopen + zathura + pdftk + imagemagick + feh + ghostscript + drawing + castget + + # publishing + hunspell + hunspellDicts.de_DE + hunspellDicts.en_US + hunspellDicts.th_TH + hyphen + hyphenDicts.de_DE + hyphenDicts.en_US + pandoc + imagemagick + ghostscript + + # media + rhythmbox + vlc + appimage-run + + # secrets + # libsecret + keepassxc + yubioath-flutter + + ]; + + imports = [ + ./minimal.nix + ./devel.nix + ./calendars.nix + ./foot.nix + ./mail + # ./openconnect.nix + ]; + + programs.taskwarrior = { + + enable = true; + package = pkgs.taskwarrior3; + + dataLocation = "${config.xdg.dataHome}/taskwarrior/tasks"; + + colorTheme = "light-256"; + config = { + report.list.columns = ["id" "depends.indicator" "priority" "project" "recur.indicator" "scheduled.countdown" "due" "until.age" "status.short" "description.count" "tags"]; + report.list.labels= ["ID" "D" "Prio" "Proj" "R" "Scheduled" "Due" "Until" "S" "Description" "Tags"]; + }; + extraConfig = " + hooks.location=${config.xdg.dataHome}/taskwarrior/hooks + verbose=affected,context,edit,label,header,new-id,project,special,sync,recur + "; + }; + + services.syncthing.enable = true; + +} diff --git a/home/ssh.nix b/home/ssh.nix new file mode 100644 index 0000000..181ccca --- /dev/null +++ b/home/ssh.nix @@ -0,0 +1,25 @@ +{ config, ... }: + +{ + programs.ssh = { + + enable = true; + enableDefaultConfig = false; + + matchBlocks = { + + gu = { + hostname = "login.server.uni-frankfurt.de"; + user = "tstraube"; + identityFile = "${config.home.homeDirectory}/.ssh/tstraube"; + }; + + geocom = { + hostname = "geocom.uni-frankfurt.de"; + user = "till"; + identityFile = "${config.home.homeDirectory}/.ssh/tstraube"; + }; + + }; + }; +} diff --git a/home/desktop-full/tex.nix b/home/tex.nix similarity index 100% rename from home/desktop-full/tex.nix rename to home/tex.nix diff --git a/home/tmux/default.nix b/home/tmux/default.nix new file mode 100644 index 0000000..7ce808d --- /dev/null +++ b/home/tmux/default.nix @@ -0,0 +1,55 @@ +{ config, pkgs, ... }: + +{ + programs.tmux = { + enable = true; + escapeTime = 0; + mouse = true; + newSession = true; + shell = "${pkgs.fish}/bin/fish"; + extraConfig = '' + # Key bindings + bind C-l next-window + bind C-h previous-window + bind C-b last-window + bind n new-window + bind C-n new-window -c '#{pane_current_path}' + bind v split-window -h + bind C-v split-window -hc '#{pane_current_path}' + bind s split-window -v + bind C-s split-window -vc '#{pane_current_path}' + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + bind c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'" + bind C-c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'" + + # Layouts + bind f source-file ~/.config/tmux/vifm.conf + bind R source-file ~/.config/tmux/rloft.conf + bind J source-file ~/.config/tmux/jekyll.conf + + # Unbind + unbind p + unbind '"' + unbind % + + # Eye candy + # set-option -g status-position top + set-option -g status-right "" + set-option -g status-left "" + set-option -g status-justify "centre" + set-option -g status-style fg=magenta + set-option -g pane-border-style fg=brightwhite + set-option -g pane-active-border-style fg=magenta + set-option -g window-status-current-style bg=brightwhite + + # Some more specifics + set-option -g focus-events on + ''; + }; + xdg.configFile."tmux/vifm.conf".source = ./vifm.conf; + xdg.configFile."tmux/rloft.conf".source = ./rloft.conf; + xdg.configFile."tmux/jekyll.conf".source = ./jekyll.conf; +} diff --git a/home/tmux/jekyll.conf b/home/tmux/jekyll.conf new file mode 100644 index 0000000..8ecb9ee --- /dev/null +++ b/home/tmux/jekyll.conf @@ -0,0 +1,6 @@ +split-window -c '#{pane_current_path}' -h nix-shell +send-keys "jekyll serve" Enter +resize-pane -x 40% +split-pane -c '#{pane_current_path}' "git status; fish" +select-pane -L +rename-window "jekyll" diff --git a/dotfiles/tmux/rloft.conf b/home/tmux/rloft.conf similarity index 91% rename from dotfiles/tmux/rloft.conf rename to home/tmux/rloft.conf index f03ec39..400c102 100644 --- a/dotfiles/tmux/rloft.conf +++ b/home/tmux/rloft.conf @@ -1,2 +1,2 @@ -split-window -c '#{pane_current_path}' -h R -q --no-save --no-restore; +split-window -c '#{pane_current_path}' -h R -q --no-save --no-restore select-pane -l diff --git a/home/tmux/vifm.conf b/home/tmux/vifm.conf new file mode 100644 index 0000000..45fd508 --- /dev/null +++ b/home/tmux/vifm.conf @@ -0,0 +1 @@ +new-window -c '#{pane_current_path}' vifm diff --git a/home/unused/hyprland.nix b/home/unused/hyprland.nix deleted file mode 100644 index 005d6a6..0000000 --- a/home/unused/hyprland.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - wayland.windowManager.hyprland = { - systemd.enable = false; - }; -} diff --git a/home/unused/plasma.nix b/home/unused/plasma.nix deleted file mode 100644 index 426fa8e..0000000 --- a/home/unused/plasma.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: - -{ - services.kdeconnect.enable = true; -} diff --git a/home/minimal/vifm.nix b/home/vifm/default.nix similarity index 62% rename from home/minimal/vifm.nix rename to home/vifm/default.nix index 900cf0e..4845d34 100644 --- a/home/minimal/vifm.nix +++ b/home/vifm/default.nix @@ -4,9 +4,10 @@ programs.vifm = { enable = true; extraConfig = " + colorscheme light set vicmd=nvim filetype * xdg-open - colorscheme Default "; }; + xdg.configFile."vifm/colors/light.vifm".source = ./light.vifm; } diff --git a/home/vifm/light.vifm b/home/vifm/light.vifm new file mode 100644 index 0000000..f770398 --- /dev/null +++ b/home/vifm/light.vifm @@ -0,0 +1,20 @@ +highlight clear + +highlight Win cterm=none ctermfg=black ctermbg=default +highlight Directory cterm=none ctermfg=cyan ctermbg=default +highlight Link cterm=none ctermfg=yellow ctermbg=default +highlight BrokenLink cterm=none ctermfg=white ctermbg=red +highlight Socket cterm=none ctermfg=red ctermbg=default +highlight Device cterm=none ctermfg=red ctermbg=default +highlight Fifo cterm=none ctermfg=black ctermbg=cyan +highlight Executable cterm=none ctermfg=green ctermbg=default +highlight Selected cterm=bold ctermfg=magenta ctermbg=default +highlight CurrLine cterm=bold ctermfg=white ctermbg=magenta +highlight TopLine cterm=bold ctermfg=magenta ctermbg=default +highlight TopLineSel cterm=bold ctermfg=magenta ctermbg=white +highlight StatusLine cterm=bold ctermfg=magenta ctermbg=white +"highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black +highlight CmdLine cterm=bold ctermfg=magenta ctermbg=default +"highlight ErrorMsg cterm=none ctermfg=red ctermbg=black +highlight Border cterm=none ctermfg=default ctermbg=default +"highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white diff --git a/hosts/arielle/default.nix b/hosts/arielle/default.nix deleted file mode 100644 index a83a0bb..0000000 --- a/hosts/arielle/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ ... }: - -{ - networking = { - - hostName = "arielle"; - domain = "ktiu.net"; - - interfaces.enp1s0.ipv4.addresses = [{ - address = "116.203.85.135"; - prefixLength = 32; - }]; - - interfaces.enp1s0.ipv6.addresses = [{ - address = "2a01:4f8:1c1c:42d8::1"; - prefixLength = 64; - }]; - - nameservers = [ - "185.12.64.1" - "185.12.64.2" - ]; - - defaultGateway = { - address = "172.31.1.1"; - interface = "enp1s0"; - }; - - defaultGateway6 = { - address = "fe80::1"; - interface = "enp1s0"; - }; - }; - - imports = [ - ./hardware-configuration.nix - ../../system - ../../system/web-server - ../../system/mail-server - ../../system/matrix-server - ]; -} diff --git a/hosts/arielle/hardware-configuration.nix b/hosts/arielle/hardware-configuration.nix deleted file mode 100644 index ff69e44..0000000 --- a/hosts/arielle/hardware-configuration.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, modulesPath, ... }: - -{ - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; - - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/087544b8-4941-436b-be6c-e32bc3787b12"; - fsType = "ext4"; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/9408a2ce-646d-406e-8407-c9bafd0a728c"; } - ]; - - networking.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/hosts/homer/default.nix b/hosts/homer/default.nix deleted file mode 100644 index bdb97b8..0000000 --- a/hosts/homer/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ ... }: - -{ - networking.hostName = "homer"; - - imports = [ - ./hardware-configuration.nix - ../../system - ../../system/desktop - ../../system/desktop/gnome.nix - ../../system/desktop/steam.nix - ../../system/desktop/remote-desktop.nix - ../../system/desktop/media-server.nix - ../../users/till.nix - ../../users/guest.nix - ]; -} diff --git a/hosts/mila/default.nix b/hosts/mila/default.nix deleted file mode 100644 index 4bc882d..0000000 --- a/hosts/mila/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ ... }: - -{ - networking.hostname = "mila"; - - imports = [ - ./hardware.nix - ../system - ../system/desktop - ../system/desktop/gnome.nix - ]; -} diff --git a/hosts/nova/default.nix b/hosts/nova/default.nix deleted file mode 100644 index 0388077..0000000 --- a/hosts/nova/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ config, lib, ... }: - -{ - networking.hostName = "nova"; - - imports = [ - ./hardware-configuration.nix - ../../users/alt/system.nix - ../../users/guest/system.nix - - ../../system - ../../system/desktop - ../../system/desktop/laptop.nix - ../../system/desktop/ergodox-udev.nix - ../../system/desktop/niri.nix - ../../system/desktop/steam.nix - ../../system/desktop/yubikey-pam.nix - ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.kernelModules = [ "v4l2loopback" ]; - boot.kernelParams = [ "psmouse.elantech_smbus=0" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; - - boot.initrd.luks.devices."cryptroot".allowDiscards = true; - - fileSystems."/".options = [ - "compress=zstd" - "discard=async" - ]; - - fileSystems."/nix".options = [ - "compress=zstd" - "noatime" - "discard=async" - ]; - - fileSystems."/home".options = [ - "compress=zstd" - "discard=async" - ]; - - swapDevices = [ - { - device = "/swapfile"; - size = 8 * 1045; - } - ]; - - networking.useDHCP = lib.mkDefault true; - # powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.trackpoint.enable = true; - -} diff --git a/hosts/nova/hardware-configuration.nix b/hosts/nova/hardware-configuration.nix deleted file mode 100644 index d79482f..0000000 --- a/hosts/nova/hardware-configuration.nix +++ /dev/null @@ -1,46 +0,0 @@ -# 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") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; - - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/eaad533f-8586-4002-9c53-5aecf8e7abd8"; - - fileSystems."/nix" = - { device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; - - fileSystems."/home" = - { device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/7362-C4C4"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/system/alt.nix b/system/alt.nix new file mode 100644 index 0000000..726c48b --- /dev/null +++ b/system/alt.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + users.users.alt = { + home = "/home/alt"; + isSystemUser = true; + group = "users"; + description = "Alt"; + extraGroups = [ + "networkmanager" + ]; + shell = pkgs.fish; + }; +} diff --git a/system/btrbk.nix b/system/btrbk.nix new file mode 100644 index 0000000..0981e09 --- /dev/null +++ b/system/btrbk.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +{ + services.btrbk = { + instances.btrbk = { + onCalendar = "hourly"; + settings = { + subvolume = "/home"; + snapshot_preserve = "40d"; + snapshot_preserve_min = "4d"; + snapshot_dir = "/btrbk_snapshots"; + target = "/run/media/till/backup/${config.networking.hostName}"; + target_preserve_min = "no"; + target_preserve = "10d 10w 24m"; + }; + }; + }; +} diff --git a/system/desktop/cast.nix b/system/cast.nix similarity index 100% rename from system/desktop/cast.nix rename to system/cast.nix diff --git a/system/cosmic.nix b/system/cosmic.nix new file mode 100644 index 0000000..e6ffb66 --- /dev/null +++ b/system/cosmic.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + services.desktopManager.cosmic.enable = true; +} diff --git a/system/default.nix b/system/default.nix index 830d769..1a3827a 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1,14 +1,6 @@ -{ lib, pkgs, ... }: +{ config, pkgs, ... }: { - imports = [ - ../users/till/system.nix - ]; - - users.mutableUsers = lib.mkDefault true; - programs.fish.enable = true; - time.timeZone = lib.mkDefault "Europe/Berlin"; - networking.networkmanager.enable = true; nix = { settings.experimental-features = [ "nix-command" "flakes" ]; @@ -17,10 +9,20 @@ optimise.automatic = true; }; - environment.sessionVariables = { - XDG_CONFIG_HOME = "$HOME/.config"; - XDG_CACHE_HOME = "$HOME/.cache"; - XDG_DATA_HOME = "$HOME/.local/share"; + time.timeZone = "Europe/Berlin"; + + programs.fish.enable = true; + + users.mutableUsers = true; + + users.users.till = { + isNormalUser = true; + description = "Till"; + extraGroups = [ "wheel" ]; + shell = pkgs.fish; + openssh.authorizedKeys.keyFiles = [ + ./ssh/till${"@"}nova.pub + ]; }; environment.systemPackages = with pkgs; [ @@ -30,21 +32,19 @@ htop killall neovim - nettools pwgen tree unzip wget ]; - services.ntp.enable = true; - - services.openssh = { - enable = true; - settings.PasswordAuthentication = false; - settings.PermitRootLogin = "no"; + services = { + ntp.enable = true; + openssh.enable = true; + openssh.settings.PasswordAuthentication = false; + openssh.settings.PermitRootLogin = "no"; }; - # Do NOT change this value system.stateVersion = "22.11"; + } diff --git a/system/desktop/default.nix b/system/desktop.nix similarity index 68% rename from system/desktop/default.nix rename to system/desktop.nix index 7411c8a..739ab74 100644 --- a/system/desktop/default.nix +++ b/system/desktop.nix @@ -1,12 +1,13 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { imports = [ ./interception-tools.nix - ./btrbk.nix + ./secrets.nix ]; - hardware.bluetooth.enable = true; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; networking.networkmanager = { enable = true; @@ -19,6 +20,12 @@ LC_PAPER = "de_DE.UTF-8"; }; + users.users.till = { + extraGroups = [ + "networkmanager" + ]; + }; + services.pulseaudio.enable = false; services.pipewire = { @@ -28,11 +35,20 @@ pulse.enable = true; }; + nixpkgs.config.allowUnfree = true; + + environment.sessionVariables = { + XDG_CONFIG_HOME = "$HOME/.config"; + XDG_CACHE_HOME = "$HOME/.cache"; + XDG_DATA_HOME = "$HOME/.local/share"; + }; + environment.systemPackages = with pkgs; [ firefox libreoffice foot pciutils + tree virtiofsd ]; @@ -52,12 +68,4 @@ programs.virt-manager.enable = true; programs.dconf.enable = true; - programs.gnupg.agent = { - enable = true; - pinentryPackage = pkgs.pinentry-all; - settings = { - default-cache-ttl = 34560000; - max-cache-ttl = 34560000; - }; - }; } diff --git a/system/desktop/btrbk.nix b/system/desktop/btrbk.nix deleted file mode 100644 index cb797f4..0000000 --- a/system/desktop/btrbk.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, ... }: - -{ - services.btrbk.instances.btrbk = { - # onCalendar = "hourly"; - settings = { - subvolume = "/home"; - snapshot_preserve = "40d"; - snapshot_preserve_min = "4d"; - snapshot_dir = "/btrbk_snapshots"; - target = "/run/media/till/backup/${config.networking.hostName}"; - target_preserve_min = "no"; - target_preserve = "7d 4w 24m"; - }; - }; -} diff --git a/system/desktop/cosmic.nix b/system/desktop/cosmic.nix deleted file mode 100644 index e46e6f0..0000000 --- a/system/desktop/cosmic.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, ... }: - -{ - services.desktopManager.cosmic.enable = true; - - services.displayManager.cosmic-greeter.enable = true; - - services.system76-scheduler.enable = true; - - services.gnome.gnome-keyring.enable = lib.mkForce false; - - programs.firefox.preferences = { - "widget.gtk.libadwaita-colors.enabled" = false; - }; -} diff --git a/system/desktop/ergodox-udev.nix b/system/desktop/ergodox-udev.nix deleted file mode 100644 index 9d13662..0000000 --- a/system/desktop/ergodox-udev.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, ... }: - -{ - environment.systemPackages = with pkgs; [ - keymapp - ]; - - services.udev.extraRules = '' - KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="wheel" - ''; -} diff --git a/system/desktop/hyprland.nix b/system/desktop/hyprland.nix deleted file mode 100644 index ab3624d..0000000 --- a/system/desktop/hyprland.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ pkgs, ... }: - -{ - - programs.hyprland = { - enable = true; - withUWSM = true; - # xwayland.enable = true; - }; - - # programs.regreet = { - # enable = true; - # # For this example you'd need to have a version of Adwaita and the font Cantarell installed - # theme.name = "Adwaita"; - # font = { - # name = "Cantarell"; - # size = 16; - # }; - # cursorTheme.name = "Adwaita"; - # }; - - environment.systemPackages = with pkgs; [ - ashell - kitty - mako - tofi - ]; - -} diff --git a/system/desktop/laptop.nix b/system/desktop/laptop.nix deleted file mode 100644 index 1485b5b..0000000 --- a/system/desktop/laptop.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, ... }: - -{ - services.thermald.enable = true; - services.power-profiles-daemon.enable = lib.mkForce false; - - services.auto-cpufreq.enable = true; - services.auto-cpufreq.settings = { - battery = { - governor = "powersave"; - energy_performance_preference = "power"; - turbo = "never"; - ideapad_laptop_conservation_mode = true; - # enable_thresholds = true; - # start_threshold = 20; - # stop_threshold = 80; - }; - charger = { - governor = "performance"; - energy_performance_preference = "performance"; - turbo = "auto"; - }; - }; -} diff --git a/system/desktop/niri.nix b/system/desktop/niri.nix deleted file mode 100644 index e3cfca7..0000000 --- a/system/desktop/niri.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ lib, pkgs, inputs, ... }: - -{ - programs.niri.enable = true; - - programs.dms-shell = { - enable = true; - systemd.enable = true; - quickshell.package = inputs.quickshell.packages.${pkgs.stdenv.hostPlatform.system}.quickshell; - enableSystemMonitoring = false; - }; - - services.displayManager.dms-greeter = { - enable = true; - compositor.name = "niri"; - configHome = "/home/till"; - }; - - services.gnome.gnome-keyring.enable = lib.mkForce false; - programs.nm-applet.enable = lib.mkForce false; - - environment.systemPackages = with pkgs; [ - nirius - papirus-icon-theme - phinger-cursors - ]; - - systemd.user.services."niriusd" = { - enable = true; - wantedBy = [ "niri.service" ]; - after = [ "niri.service" ]; - description = "Nirius daemon"; - serviceConfig = { - ExecStart = "${pkgs.nirius}/bin/niriusd"; - }; - }; - - services.upower.enable = true; -} diff --git a/system/desktop/plasma.nix b/system/desktop/plasma.nix deleted file mode 100644 index d3f86a6..0000000 --- a/system/desktop/plasma.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: - -{ - services.desktopManager.plasma6.enable = true; - - programs.kdeconnect.enable = true; - - networking.firewall = rec { - allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; - allowedUDPPortRanges = allowedTCPPortRanges; - }; - - services.displayManager.sddm = { - enable = true; - wayland.enable = true; - settings.General.DisplayServer = "wayland"; - }; -} diff --git a/system/desktop/remote-desktop.nix b/system/desktop/remote-desktop.nix deleted file mode 100644 index 4feb26c..0000000 --- a/system/desktop/remote-desktop.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, pkgs, ... }: - -{ - services.gnome.gnome-remote-desktop.enable = true; -} diff --git a/system/distrobox.nix b/system/distrobox.nix new file mode 100644 index 0000000..2cc4904 --- /dev/null +++ b/system/distrobox.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + virtualisation.podman = { + enable = true; + dockerCompat = true; + }; + + environment.systemPackages = [ pkgs.distrobox ]; +} diff --git a/system/ergodox.nix b/system/ergodox.nix new file mode 100644 index 0000000..bd4e09d --- /dev/null +++ b/system/ergodox.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + services.udev = { + extraRules = '' + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="wheel" + ''; + }; +} diff --git a/system/desktop/gnome.nix b/system/gnome.nix similarity index 66% rename from system/desktop/gnome.nix rename to system/gnome.nix index b31365b..565bdff 100644 --- a/system/desktop/gnome.nix +++ b/system/gnome.nix @@ -4,18 +4,18 @@ { services.desktopManager.gnome.enable = true; - # services.displayManager = { - # gdm.enable = true; - # defaultSession = "gnome"; - # }; + services.displayManager = { + gdm.enable = true; + defaultSession = "gnome"; + }; - environment.gnome.excludePackages = with pkgs; [ + environment.gnome.excludePackages = (with pkgs; [ gnome-tour geary yelp gnome-contacts gnome-initial-setup - ]; + ]); environment.systemPackages = with pkgs; [ gnome-sound-recorder @@ -24,10 +24,12 @@ ]; services.gnome.gnome-browser-connector.enable = true; - # services.gnome.gnome-keyring.enable = lib.mkForce false; + + services.gnome.gnome-keyring.enable = lib.mkForce false; programs.kdeconnect = { enable = true; package = lib.mkForce pkgs.gnomeExtensions.gsconnect; }; + } diff --git a/users/guest/system.nix b/system/guest.nix similarity index 58% rename from users/guest/system.nix rename to system/guest.nix index 610bce2..4d4e88a 100644 --- a/users/guest/system.nix +++ b/system/guest.nix @@ -2,12 +2,16 @@ { users.users.guest = { + home = "/home/guest"; isNormalUser = true; + group = "users"; description = "Guest"; - extraGroups = [ "networkmanager" ]; + extraGroups = [ + "networkmanager" + ]; shell = pkgs.fish; openssh.authorizedKeys.keyFiles = [ - ../till/pubkeys/till${"@"}nova.pub + ./ssh/till${"@"}nova.pub ]; }; } diff --git a/system/hardware/arielle.nix b/system/hardware/arielle.nix new file mode 100644 index 0000000..db82c88 --- /dev/null +++ b/system/hardware/arielle.nix @@ -0,0 +1,33 @@ +# 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" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/087544b8-4941-436b-be6c-e32bc3787b12"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/9408a2ce-646d-406e-8407-c9bafd0a728c"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/system/hardware/ernst.nix b/system/hardware/ernst.nix new file mode 100644 index 0000000..42947cd --- /dev/null +++ b/system/hardware/ernst.nix @@ -0,0 +1,33 @@ +# 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") + ]; + + boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "ums_realtek" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/35ee7723-47bd-49de-b211-73550c14d765"; + fsType = "ext4"; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/homer/hardware-configuration.nix b/system/hardware/homer.nix similarity index 67% rename from hosts/homer/hardware-configuration.nix rename to system/hardware/homer.nix index a18ff94..305cffa 100644 --- a/hosts/homer/hardware-configuration.nix +++ b/system/hardware/homer.nix @@ -1,13 +1,13 @@ -{ config, lib, modulesPath, ... }: +# 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 + "/hardware/network/broadcom-43xx.nix") - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + imports = + [ (modulesPath + "/hardware/network/broadcom-43xx.nix") + (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; @@ -53,12 +53,14 @@ ]; }; - swapDevices = [{ - device = "/swapfile"; - size = 8 * 1045; - }]; + 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..useDHCP`. networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/system/hardware/nova.nix b/system/hardware/nova.nix new file mode 100644 index 0000000..7a860bc --- /dev/null +++ b/system/hardware/nova.nix @@ -0,0 +1,62 @@ +{ config, lib, pkgs, modulesPath, ... }: + +let + subvolume = { + device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54"; + fsType = "btrfs"; + }; +in + +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "v4l2loopback" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; + + boot.initrd.luks.devices."cryptroot" = { + device = "/dev/disk/by-uuid/eaad533f-8586-4002-9c53-5aecf8e7abd8"; + allowDiscards = true; + }; + + fileSystems."/" = subvolume // { + options = [ "subvol=root" "compress=zstd" "discard=async" ]; + }; + + # the following subvolumes are automatically mounted and won't be snapshotted: + # /home/till/.local/share/Steam + # /home/till/.local/share/Trash + # /home/till/.cache + # /home/till/tmp + # /home/till/.mozilla/firefox/till/storage + # /home/till/.config/Mattermost/Cache + # /home/till/.config/Mattermost/Code\ Cache + + fileSystems."/nix" = subvolume // { + options = [ "subvol=nix" "compress=zstd" "noatime" "discard=async" ]; + }; + + fileSystems."/home" = subvolume // { + options = [ "subvol=home" "compress=zstd" "discard=async" ]; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/7362-C4C4"; + fsType = "vfat"; + }; + + swapDevices = [{ + device = "/swapfile"; + size = 8 * 1045; + }]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.trackpoint.enable = true; + boot.kernelParams = [ "psmouse.elantech_smbus=0" ]; + +} diff --git a/system/hardware/romulus.nix b/system/hardware/romulus.nix new file mode 100644 index 0000000..8307f61 --- /dev/null +++ b/system/hardware/romulus.nix @@ -0,0 +1,58 @@ +# 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") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d9731b0f-57a1-42ba-b9bd-92e225df5bc2"; + fsType = "btrfs"; + options = [ "subvol=root" "compress=zstd" ]; + }; + + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/d1bb3d19-d95f-4486-8350-2f3a5b473881"; + + fileSystems."/swap" = + { device = "/dev/disk/by-uuid/d9731b0f-57a1-42ba-b9bd-92e225df5bc2"; + fsType = "btrfs"; + options = [ "subvol=swap" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/d9731b0f-57a1-42ba-b9bd-92e225df5bc2"; + fsType = "btrfs"; + options = [ "subvol=home" "compress=zstd" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/d9731b0f-57a1-42ba-b9bd-92e225df5bc2"; + fsType = "btrfs"; + options = [ "subvol=nix" "noatime" "compress=zstd" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/EB36-69BF"; + fsType = "vfat"; + }; + + swapDevices = [ { device = "/swap/swapfile"; } ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/system/hardware/tron.nix b/system/hardware/tron.nix new file mode 100644 index 0000000..3e36c00 --- /dev/null +++ b/system/hardware/tron.nix @@ -0,0 +1,64 @@ +{ config, lib, pkgs, modulesPath, ... }: + +let + subvolume = { + # device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54"; + fsType = "btrfs"; + }; +in + +{ + + hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "v4l2loopback" ]; + boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; + + boot.initrd.luks.devices."cryptroot" = { + # device = "/dev/disk/by-uuid/eaad533f-8586-4002-9c53-5aecf8e7abd8"; + allowDiscards = true; + }; + + fileSystems."/" = subvolume // { + options = [ "subvol=root" "compress=zstd" "discard=async" ]; + }; + + # the following subvolumes are automatically mounted and won't be snapshotted: + # /home/till/.local/share/Steam + # /home/till/.local/share/Trash + # /home/till/.cache + # /home/till/tmp + # /home/till/.mozilla/firefox/till/storage + # /home/till/.config/Mattermost/Cache + # /home/till/.config/Mattermost/Code\ Cache + + fileSystems."/nix" = subvolume // { + options = [ "subvol=nix" "compress=zstd" "noatime" "discard=async" ]; + }; + + fileSystems."/home" = subvolume // { + options = [ "subvol=home" "compress=zstd" "discard=async" ]; + }; + + fileSystems."/boot" = { + # device = "/dev/disk/by-uuid/7362-C4C4"; + fsType = "vfat"; + }; + + swapDevices = [{ + device = "/swapfile"; + size = 8 * 1045; + }]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.trackpoint.enable = true; + boot.kernelParams = [ "psmouse.elantech_smbus=0" ]; + +} diff --git a/system/hyprland.nix b/system/hyprland.nix new file mode 100644 index 0000000..af157b3 --- /dev/null +++ b/system/hyprland.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + programs.uwsm.enable = true; + + programs.hyprland = { + enable = true; + withUWSM = true; + }; + + programs.waybar.enable = true; + + environment.systemPackages = with pkgs; [ + swaynotificationcenter + tofi + ]; +} diff --git a/system/desktop/interception-tools.nix b/system/interception-tools.nix similarity index 100% rename from system/desktop/interception-tools.nix rename to system/interception-tools.nix diff --git a/system/mail-server/roundcube.nix b/system/mail-server/roundcube.nix deleted file mode 100644 index 5c48fc1..0000000 --- a/system/mail-server/roundcube.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, ... }: - -let - - webmailHostName = "webmail.${config.networking.domain}"; - -in - -{ - services.roundcube = { - enable = true; - hostName = webmailHostName; - extraConfig = '' - $config['smtp_host'] = 'tls://%h'; - $config['smtp_conn_options'] = [ - 'ssl' => [ - 'verify_peer' => false, - 'verify_peer_name' => false, - ], - ]; - ''; - }; - - # not sure why this is currently working w/o the following - # - # services.nginx.virtualHosts."${webmailHostName}" = { - # onlySSL = true; - # forceSSL = lib.mkForce false; - # enableACME = lib.mkForce false; - # useACMEHost = config.networking.domain; - # }; - # security.acme.certs."${config.networking.domain}".extraDomainNames = [ - # webmailHostName - # ]; - -} diff --git a/system/matrix-server/default.nix b/system/matrix-server/default.nix deleted file mode 100644 index 6398a28..0000000 --- a/system/matrix-server/default.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ ... }: - -let - - domain = "jeppers.app"; - fqdn = "matrix.${domain}"; - baseUrl = "https://${fqdn}"; - clientConfig."m.homeserver".base_url = baseUrl; - serverConfig."m.server" = "${fqdn}:443"; - mkWellKnown = data: '' - default_type application/json; - add_header Access-Control-Allow-Origin *; - return 200 '${builtins.toJSON data}'; - ''; - maxUploadSize = "20M"; - -in - -{ - imports = [ - ./mautrix.nix - ]; - - services.matrix-synapse = { - enable = true; - settings = { - server_name = domain; - public_baseurl = baseUrl; - max_upload_size = maxUploadSize; - listeners = [ - { - port = 8008; - bind_addresses = [ "::1" ]; - type = "http"; - tls = false; - x_forwarded = true; - resources = [ - { - names = [ - "client" - "federation" - ]; - compress = true; - } - ]; - } - ]; - }; - extraConfigFiles = [ "/var/custom-access/matrix-shared-secret" ]; - }; - - services.nginx.virtualHosts = { - - "${domain}" = { - enableACME = true; - onlySSL = true; - locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig; - locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig; - }; - - "${fqdn}" = { - enableACME = true; - onlySSL = true; - extraConfig = '' - client_max_body_size ${maxUploadSize}; - ''; - locations."/".extraConfig = '' - return 404; - ''; - locations."/_matrix".proxyPass = "http://[::1]:8008"; - locations."/_synapse/client".proxyPass = "http://[::1]:8008"; - }; - }; - - services.postgresql.enable = true; - -} diff --git a/system/matrix-server/mautrix.nix b/system/matrix-server/mautrix.nix deleted file mode 100644 index 017649c..0000000 --- a/system/matrix-server/mautrix.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - services.mautrix-telegram = { - enable = true; - }; -} diff --git a/system/desktop/media-server.nix b/system/media.nix similarity index 99% rename from system/desktop/media-server.nix rename to system/media.nix index 63023b5..cdd99db 100644 --- a/system/desktop/media-server.nix +++ b/system/media.nix @@ -5,7 +5,6 @@ enable = true; group = "media"; }; - services.radarr = { enable = true; group = "media"; diff --git a/system/plasma.nix b/system/plasma.nix new file mode 100644 index 0000000..f62e344 --- /dev/null +++ b/system/plasma.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + services.desktopManager.plasma6.enable = true; +} diff --git a/system/remote-desktop.nix b/system/remote-desktop.nix new file mode 100644 index 0000000..43e66c1 --- /dev/null +++ b/system/remote-desktop.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + services.gnome.gnome-remote-desktop.enable = true +} diff --git a/system/secrets.nix b/system/secrets.nix new file mode 100644 index 0000000..98d5838 --- /dev/null +++ b/system/secrets.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + + programs.gnupg.agent = { + enable = true; + pinentryPackage = pkgs.pinentry-gnome3; + enableSSHSupport = true; + settings = { + # disable-scdaemon = ""; + }; + }; + +} diff --git a/users/till/pubkeys/till@nova.pub b/system/ssh/till@nova.pub similarity index 100% rename from users/till/pubkeys/till@nova.pub rename to system/ssh/till@nova.pub diff --git a/system/desktop/steam.nix b/system/steam.nix similarity index 100% rename from system/desktop/steam.nix rename to system/steam.nix diff --git a/system/sway.nix b/system/sway.nix new file mode 100644 index 0000000..609c87d --- /dev/null +++ b/system/sway.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: + +{ + programs.sway = { + enable = true; + wrapperFeatures.gtk = true; + }; + + programs.waybar.enable = true; + + services.gnome.gnome-keyring.enable = true; + + environment.systemPackages = with pkgs; [ + grim + slurp + wl-clipboard + swaynotificationcenter + tofi + ]; +} diff --git a/system/web-server/default.nix b/system/web-server/default.nix index 6596bb6..6081eb1 100644 --- a/system/web-server/default.nix +++ b/system/web-server/default.nix @@ -1,16 +1,64 @@ -{ ... }: +{ config, pkgs, ... }: { - imports = [ - ./nginx.nix - ./letsencrypt.nix + nixpkgs.config.allowUnfree = true; - ./forgejo.nix - ./outline.nix - ./radicale.nix + networking.firewall.allowedTCPPorts = [ 80 443 ]; + + services.nginx = { + enable = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + + virtualHosts = { + + "${config.networking.domain}" = { + onlySSL = true; + useACMEHost = config.networking.domain; + locations."/" = { + return = "200 'This domain used for e-mail hosting only.'"; + extraConfig = '' + add_header Content-Type text/plain; + ''; + }; + }; + + "${config.networking.fqdn}-80" = { + serverAliases = [ + "*.ktiu.net" + "*.t9e.me" + ]; + locations."/.well-known/acme-challenge" = { + root = "/var/lib/acme/.challenges"; + }; + locations."/" = { + return = "301 https://$host$request_uri"; + }; + }; + + "${config.networking.fqdn}" = { + onlySSL = true; + useACMEHost = config.networking.domain; + locations."/" = { + return = "404"; + }; + }; + + }; + + }; + + security.acme = { + + acceptTerms = true; + defaults.email = "till@ktiu.net"; + + certs."${config.networking.domain}" = { + domain = config.networking.domain; + webroot = "/var/lib/acme/.challenges"; + group = config.services.nginx.group; + extraDomainNames = [ config.networking.fqdn ]; + }; + }; - # ./ksh.nix - ./ksh-map.nix - ./fundkorb-button.nix - ]; } diff --git a/system/web-server/dex.nix b/system/web-server/dex.nix index d9ad4cc..1708e36 100644 --- a/system/web-server/dex.nix +++ b/system/web-server/dex.nix @@ -19,7 +19,7 @@ in { { id = "outline"; name = "Outline Client"; - redirectURIs = [ "https://${config.services.outline.hostname}/auth/oidc.callback" ]; + redirectURIs = [ "https://${outline.hostname}/auth/oidc.callback" ]; secretFile = "/var/custom-access/outline-oidc-secret.txt"; } ]; diff --git a/system/web-server/jenkins.nix b/system/web-server/jenkins.nix new file mode 100644 index 0000000..e9b5e4d --- /dev/null +++ b/system/web-server/jenkins.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: + +{ + services.jenkins = { + enable = true; + port = 7401; + }; + + security.acme.certs."${config.networking.domain}".extraDomainNames = [ + "jenkins.${config.networking.domain}" + ]; + + services.nginx.virtualHosts = { + "jenkins.${config.networking.domain}" = { + onlySSL = true; + useACMEHost = config.networking.domain; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.jenkins.port}"; + proxyWebsockets = true; + }; + }; + }; +} diff --git a/system/web-server/ksh.nix b/system/web-server/kein-schlussstrich-hessen.org similarity index 98% rename from system/web-server/ksh.nix rename to system/web-server/kein-schlussstrich-hessen.org index a7c182e..892afb8 100644 --- a/system/web-server/ksh.nix +++ b/system/web-server/kein-schlussstrich-hessen.org @@ -11,7 +11,7 @@ serverAliases = [ "www.kein-schlussstrich-hessen.de" "www.kein-schlussstrich-hessen.org" - ]; + ] globalRedirect = "kein-schlussstrich-hessen.org"; enableACME = true; }; diff --git a/system/web-server/letsencrypt.nix b/system/web-server/letsencrypt.nix deleted file mode 100644 index 9b462f9..0000000 --- a/system/web-server/letsencrypt.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, ... }: - -{ - security.acme = { - acceptTerms = true; - defaults.email = "till@ktiu.net"; - certs."${config.networking.domain}" = { - # domain = config.networking.domain; - webroot = "/var/lib/acme/.challenges"; - group = config.services.nginx.group; - extraDomainNames = [ config.networking.fqdn ]; - }; - }; - - services.nginx.virtualHosts = { - "${config.networking.fqdn}-80" = { - serverAliases = [ - "*.ktiu.net" - "*.t9e.me" - ]; - locations."/.well-known/acme-challenge" = { - root = "/var/lib/acme/.challenges"; - }; - locations."/" = { - return = "301 https://$host$request_uri"; - }; - }; - }; -} diff --git a/system/mail-server/default.nix b/system/web-server/mail/default.nix similarity index 100% rename from system/mail-server/default.nix rename to system/web-server/mail/default.nix diff --git a/system/mail-server/dkim.nix b/system/web-server/mail/dkim.nix similarity index 71% rename from system/mail-server/dkim.nix rename to system/web-server/mail/dkim.nix index 9f4bf19..32394a9 100644 --- a/system/mail-server/dkim.nix +++ b/system/web-server/mail/dkim.nix @@ -10,5 +10,5 @@ users.users.postfix.extraGroups = [ "opendkim" ]; - services.postfix.settings.main.smtpd_milters = [ "unix:/run/opendkim/opendkim.sock" ]; + services.postfix.config.smtpd_milters = [ "unix:/run/opendkim/opendkim.sock" ]; } diff --git a/system/mail-server/dovecot.nix b/system/web-server/mail/dovecot.nix similarity index 100% rename from system/mail-server/dovecot.nix rename to system/web-server/mail/dovecot.nix diff --git a/system/mail-server/postfix.nix b/system/web-server/mail/postfix.nix similarity index 98% rename from system/mail-server/postfix.nix rename to system/web-server/mail/postfix.nix index 4b6d1e8..2fe5080 100644 --- a/system/mail-server/postfix.nix +++ b/system/web-server/mail/postfix.nix @@ -40,7 +40,6 @@ in { 123rf@ktiu.net REJECT jcb-co.jp-ktiu@ktiu.net REJECT info@ktiu.net REJECT - linkedin@ktiu.net REJECT ''; diff --git a/system/web-server/mail/roundcube.nix b/system/web-server/mail/roundcube.nix new file mode 100644 index 0000000..a8e704d --- /dev/null +++ b/system/web-server/mail/roundcube.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + services.roundcube = { + enable = true; + hostName = "webmail.ktiu.net"; + extraConfig = '' + $config['smtp_host'] = 'tls://%h'; + $config['smtp_conn_options'] = [ + 'ssl' => [ + 'verify_peer' => false, + 'verify_peer_name' => false, + ], + ]; + ''; + }; +} diff --git a/system/web-server/nginx.nix b/system/web-server/nginx.nix deleted file mode 100644 index 74f5c2e..0000000 --- a/system/web-server/nginx.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, ... }: - -{ - networking.firewall.allowedTCPPorts = [ 80 443 ]; - - services.nginx = { - - enable = true; - - recommendedProxySettings = true; - recommendedTlsSettings = true; - recommendedOptimisation = true; - recommendedGzipSettings = true; - - virtualHosts = { - - "${config.networking.domain}" = { - onlySSL = true; - useACMEHost = config.networking.domain; - locations."/" = { - return = "200 'This domain used for e-mail hosting only.'"; - extraConfig = '' - add_header Content-Type text/plain; - ''; - }; - }; - - "${config.networking.fqdn}" = { - onlySSL = true; - useACMEHost = config.networking.domain; - locations."/" = { - return = "404"; - }; - }; - - }; - }; -} diff --git a/system/web-server/oopsidentify.nix b/system/web-server/oopsidentify.nix new file mode 100644 index 0000000..adfff42 --- /dev/null +++ b/system/web-server/oopsidentify.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + services.nginx.virtualHosts."oops.t9e.me" = { + forceSSL = true; + enableACME = true; + root = "/var/www/oopsidentify/dist"; + }; +} diff --git a/system/web-server/outline.nix b/system/web-server/outline.nix index f82fa0c..5840033 100644 --- a/system/web-server/outline.nix +++ b/system/web-server/outline.nix @@ -1,7 +1,6 @@ { config, pkgs, ... }: { - # imports = [ ./dex.nix ]; # environment.systemPackages = with pkgs; [ # openssl diff --git a/system/xfce.nix b/system/xfce.nix new file mode 100644 index 0000000..59f9f76 --- /dev/null +++ b/system/xfce.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + services.xserver.enable = true; + services.xserver.displayManager.lightdm.enable = true; + services.xserver.desktopManager.xfce.enable = true; +} diff --git a/system/desktop/yubikey-pam.nix b/system/yubikey.nix similarity index 52% rename from system/desktop/yubikey-pam.nix rename to system/yubikey.nix index a16409e..cbe1417 100644 --- a/system/desktop/yubikey-pam.nix +++ b/system/yubikey.nix @@ -1,28 +1,28 @@ { config, pkgs, ... }: { + services.pcscd.enable = true; environment.systemPackages = with pkgs; [ - keymapp yubikey-personalization - yubikey-manager ]; services.udev = { packages = [ pkgs.yubikey-personalization ]; - extraRules = '' - ACTION=="remove",\ - ENV{ID_BUS}=="usb",\ - ENV{ID_MODEL_ID}=="0407",\ - ENV{ID_VENDOR_ID}=="1050",\ - ENV{ID_VENDOR}=="Yubico",\ - RUN+="${pkgs.systemd}/bin/loginctl lock-sessions" - ''; + # extraRules = '' + # ACTION=="remove",\ + # ENV{ID_BUS}=="usb",\ + # ENV{ID_MODEL_ID}=="0407",\ + # ENV{ID_VENDOR_ID}=="1050",\ + # ENV{ID_VENDOR}=="Yubico",\ + # RUN+="${pkgs.systemd}/bin/loginctl lock-sessions" + # ''; }; security.pam.services = { login.u2fAuth = true; sudo.u2fAuth = true; }; + } diff --git a/users/alt/home.nix b/users/alt/home.nix deleted file mode 100644 index 4023137..0000000 --- a/users/alt/home.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ ... }: - -{ - home.username = "alt"; - programs.git.settings.user = { - name = "Till"; - email = "till@ktiu.net"; - }; -} diff --git a/users/alt/system.nix b/users/alt/system.nix deleted file mode 100644 index 94ce7e8..0000000 --- a/users/alt/system.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, ... }: - -{ - users.users.alt = { - isNormalUser = true; - description = "Alt"; - extraGroups = [ "networkmanager" ]; - shell = pkgs.fish; - }; -} diff --git a/users/guest/home.nix b/users/guest/home.nix deleted file mode 100644 index 51ce1ed..0000000 --- a/users/guest/home.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: - -{ - home.username = "guest"; -} diff --git a/users/till/home.nix b/users/till/home.nix deleted file mode 100644 index ab32419..0000000 --- a/users/till/home.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: - -{ - home.username = "till"; - programs.git.settings.user = { - name = "Till"; - email = "till@ktiu.net"; - }; - - imports = [ - ./ssh.nix - ]; - -} diff --git a/users/till/ssh.nix b/users/till/ssh.nix deleted file mode 100644 index 7dbbba7..0000000 --- a/users/till/ssh.nix +++ /dev/null @@ -1,80 +0,0 @@ -{ config, osConfig, ... }: - -let - - certs = { - uni = "${config.home.homeDirectory}/.ssh/tstraube@${osConfig.networking.hostName}"; - personal = "${config.home.homeDirectory}/.ssh/till@${osConfig.networking.hostName}"; - }; - -in - -{ - programs.ssh = { - - enable = true; - enableDefaultConfig = false; - - matchBlocks = { - - "hrz login.server.uni-frankfurt.de" = { - hostname = "login.server.uni-frankfurt.de"; - user = "tstraube"; - identityFile = certs.uni; - }; - - geocom3 = { - hostname = "141.2.194.220"; - user = "tstraube"; - identityFile = certs.uni; - }; - - geocom2 = { - hostname = "141.2.194.235"; - user = "till"; - identityFile = certs.uni; - }; - - "gitlab gitlab.rz.uni-frankfurt.de" = { - hostname = "gitlab.rz.uni-frankfurt.de"; - user = "tstraube"; - identityFile = certs.uni; - }; - - "git.ktiu.net" = { - identityFile = certs.personal; - }; - - "arielle (arielle|git).ktiu.net" = { - hostname = "arielle.ktiu.net"; - user = "till"; - identityFile = certs.personal; - }; - - "homer homer.fritz.box" = { - hostname = "homer"; - user = "till"; - identityFile = certs.personal; - }; - - "codeberg codeberg.org" = { - hostname = "codeberg.org"; - user = "git"; - identityFile = certs.personal; - }; - - "github github.com" = { - hostname = "github.com"; - user = "git"; - identityFile = certs.personal; - }; - - "mila" = { - hostname = "mila"; - user = "tstraube"; - identityFile = certs.uni; - }; - - }; - }; -} diff --git a/users/till/system.nix b/users/till/system.nix deleted file mode 100644 index e4c413e..0000000 --- a/users/till/system.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: - -{ - users.users.till = { - isNormalUser = true; - description = "Till"; - extraGroups = [ - "wheel" - "networkmanager" - ]; - shell = pkgs.fish; - openssh.authorizedKeys.keyFiles = [ - ./pubkeys/till${"@"}nova.pub - ]; - }; -}