Full Refactor and history reset

This commit is contained in:
2026-03-19 10:47:32 -05:00
commit c5d7d9e3da
65 changed files with 4632 additions and 0 deletions

23
bluetooth.nix Normal file
View File

@@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
...
}:
{
services.blueman.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
FastConnectable = true;
};
Policy = {
AutoEnable = true;
};
};
};
}

141
desktop.nix Normal file
View File

@@ -0,0 +1,141 @@
{
config,
lib,
makeDesktopItem,
pkgs,
inputs,
...
}:
{
imports = [
inputs.hyprland.nixosModules.default
inputs.home-manager.nixosModules.default
];
# Enable the X11 windowing system.
services.xserver.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
#services.libinput.enable = true;
xdg.portal.enable = true;
xdg.portal.wlr.enable = true;
environment.sessionVariables = {
QT_QPA_PLATFORMTHEME = "gtk3";
QT_QPA_PLATFORMTHEME_QT6 = "gtk3";
};
home-manager = {
users.joe = {
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
# gtk.enable = true;
# qt.enable = true;
# qt.platformTheme = "gtk";
};
};
users.users.joe.packages = with pkgs; [
hyprpolkitagent
hyprtoolkit
gsettings-desktop-schemas
adw-gtk3
candy-icons
wf-recorder
hyprpaper
nemo-with-extensions
google-chrome
mpv
proton-pass
];
#KDE
# services.displayManager.sddm.enable = true;
# services.displayManager.sddm.wayland.enable = true;
# services.desktopManager.plasma6.enable = true;
# environment.plasma6.excludePackages = with pkgs.kdePackages; [
# oxygen
# akonadi
# ];
# programs.kdeconnect.enable = true;
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
programs.hyprland = {
enable = true;
withUWSM = true; # recommended for most users
xwayland.enable = true; # Xwayland can be disabled.
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# portalPackage =
# inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
programs.dms-shell = {
enable = true;
quickshell.package = inputs.quickshell.packages.${pkgs.stdenv.hostPlatform.system}.quickshell;
};
programs.niri.enable = true;
home-manager = {
users.joe = {
home.file.".mozilla/firefox/default/chrome/keyfox".source = inputs.firefox-keyfox-theme;
programs.firefox = {
enable = true;
profiles.default = {
name = "Default";
settings = {
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.tabs.drawInTitlebar" = false;
"browser.startup.homepage" = "chrome://browser/content/blanktab.html";
"svg.context-properties.content.enabled" = true;
};
userChrome = ''
@import "keyfox/userChrome.css";
'';
};
};
};
};
environment.systemPackages = with pkgs; [
kitty
dbus
notify-desktop
libinput
libnotify
wl-clipboard
xwayland-satellite
pinentry-gtk2
home-manager
vlc
zathura
slurp
grim
];
xdg.mime.defaultApplications = {
"text/html" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
};
}

61
development_tools.nix Normal file
View File

@@ -0,0 +1,61 @@
{
config,
pkgs,
inputs,
...
}:
{
programs.tmux = {
enable = true;
plugins = with pkgs; [
tmuxPlugins.better-mouse-mode
tmuxPlugins.sensible
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.catppuccin
tmuxPlugins.yank
];
extraConfig = (builtins.readFile ./dotfiles/tmux.conf);
};
environment.systemPackages = with pkgs; [
tectonic
nil
elixir
python312
clang-tools
stylua
python312Packages.pip
python313Packages.pillow
devenv
flyctl
];
users.users.joe.packages = with pkgs; [
tea # gitea cli client
presenterm
mongodb-compass
claude-code
(builtins.getFlake "github:5Sigma/codex?rev=fe20caf8816f8f29aa49e273ba4905496f31c2b1")
.packages.x86_64-linux.default
# mysql-workbench
(import ./scripts/new-elixir.nix { inherit pkgs; })
(import ./scripts/tat.nix { inherit pkgs; })
];
home-manager.users.joe = {
xdg.desktopEntries.mongodb_compass = {
name = "MongoDB Compass (libsecret)";
genericName = "MongoDB GUI";
exec = "mongodb-compass --password-store=\"gnome-libsecret\" --ignore-additional-command-line-flags";
terminal = false;
categories = [
"Application"
"Database"
"Development"
];
};
};
}

44
dotfiles.nix Normal file
View File

@@ -0,0 +1,44 @@
{
config,
pkgs,
inputs,
...
}:
{
imports = [
inputs.home-manager.nixosModules.default
];
home-manager = {
useGlobalPkgs = true;
users.joe = {
home.stateVersion = "18.09";
xdg.enable = true;
# xdg.configFile."mimeapps.list".force = true;
xdg.configFile."ranger/rc.conf".source = ./dotfiles/ranger.conf;
xdg.configFile."ghostty/config".source = ./dotfiles/ghostty.conf;
xdg.configFile."kitty/kitty.conf".source = ./dotfiles/kitty/kitty.conf;
xdg.configFile."kitty/quick-access-terminal.conf".source =
./dotfiles/kitty/quick-access-terminal.conf;
xdg.configFile."alacritty/alacritty.toml".source = ./dotfiles/alacritty.toml;
xdg.configFile."lazygit/config.yml".source = ./dotfiles/lazygit.yml;
xdg.configFile."hypr/base.conf".source = ./dotfiles/hyprland.base.conf;
xdg.configFile."niri/config.kdl".source = ./dotfiles/niri.kdl;
# xdg.configFile."nvim" = {
# source = dotfiles/nvim;
# recursive = true;
# };
xdg.configFile."doom/init.el".source = ./dotfiles/emacs/init.el;
xdg.configFile."doom/config.org".source = ./dotfiles/emacs/config.org;
xdg.configFile."doom/packages.el".source = ./dotfiles/emacs/packages.el;
xdg.configFile."doom/el/conduct.el".source = ./dotfiles/emacs/el/conduct.el;
xdg.configFile."hypr/hyprpaper.conf".source = ./dotfiles/hyprpaper.specter.conf;
xdg.configFile."hypr/hyprland.conf".source = ./dotfiles/hyprland.specter.conf;
xdg.configFile."hypr/hypridle.conf".source = ./dotfiles/hypridle.conf;
xdg.configFile."hypr/hyprlock.conf".source = ./dotfiles/hyprlock.conf;
};
};
}

85
dotfiles/alacritty.toml Normal file
View File

@@ -0,0 +1,85 @@
# test
[colors.primary]
background = "#292D3E"
foreground = "#C6D0F5"
dim_foreground = "#C6D0F5"
bright_foreground = "#C6D0F5"
[colors.cursor]
text = "#303446"
cursor = "#F2D5CF"
[colors.vi_mode_cursor]
text = "#303446"
cursor = "#BABBF1"
[colors.search.matches]
foreground = "#303446"
background = "#A5ADCE"
[colors.search.focused_match]
foreground = "#303446"
background = "#A6D189"
[colors.footer_bar]
foreground = "#303446"
background = "#A5ADCE"
[colors.hints.start]
foreground = "#303446"
background = "#E5C890"
[colors.hints.end]
foreground = "#303446"
background = "#A5ADCE"
[colors.selection]
text = "#303446"
background = "#F2D5CF"
[colors.normal]
black = "#51576D"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#B5BFE2"
[colors.bright]
black = "#626880"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#A5ADCE"
[colors.dim]
black = "#51576D"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#B5BFE2"
[[colors.indexed_colors]]
index = 16
color = "#EF9F76"
[[colors.indexed_colors]]
index = 17
color = "#F2D5CF"
[window]
opacity = 0.9
[font]
normal = { family = "PragmataPro Mono Liga", style = "Regular" }
bold = { family = "PragmataPro Mono Liga", style = "Bold" }
italic = { family = "PragmataPro Mono Liga", style = "Italic" }
size = 12

View File

@@ -0,0 +1,75 @@
[colors.primary]
background = "#eff1f5"
foreground = "#4c4f69"
dim_foreground = "#8c8fa1"
bright_foreground = "#4c4f69"
[colors.cursor]
text = "#eff1f5"
cursor = "#dc8a78"
[colors.vi_mode_cursor]
text = "#eff1f5"
cursor = "#7287fd"
[colors.search.matches]
foreground = "#eff1f5"
background = "#6c6f85"
[colors.search.focused_match]
foreground = "#eff1f5"
background = "#40a02b"
[colors.footer_bar]
foreground = "#eff1f5"
background = "#6c6f85"
[colors.hints.start]
foreground = "#eff1f5"
background = "#df8e1d"
[colors.hints.end]
foreground = "#eff1f5"
background = "#6c6f85"
[colors.selection]
text = "#eff1f5"
background = "#dc8a78"
[colors.normal]
black = "#bcc0cc"
red = "#d20f39"
green = "#40a02b"
yellow = "#df8e1d"
blue = "#1e66f5"
magenta = "#ea76cb"
cyan = "#179299"
white = "#5c5f77"
[colors.bright]
black = "#acb0be"
red = "#d20f39"
green = "#40a02b"
yellow = "#df8e1d"
blue = "#1e66f5"
magenta = "#ea76cb"
cyan = "#179299"
white = "#6c6f85"
[colors.dim]
black = "#bcc0cc"
red = "#d20f39"
green = "#40a02b"
yellow = "#df8e1d"
blue = "#1e66f5"
magenta = "#ea76cb"
cyan = "#179299"
white = "#5c5f77"
[[colors.indexed_colors]]
index = 16
color = "#fe640b"
[[colors.indexed_colors]]
index = 17
color = "#dc8a78"

2
dotfiles/config.nu Normal file
View File

@@ -0,0 +1,2 @@

415
dotfiles/emacs/config.org Normal file
View File

@@ -0,0 +1,415 @@
#+PROPERTY: header-args :tangle config.el
* My Info
Basic info for some templates
#+begin_src elisp
(setq user-full-name "Joe Bellus"
user-mail-address "joe@5sigma.io")
#+end_src
* Appearance
** Fonts
Setup default fonts and faces.
#+begin_src elisp
(setq doom-font (font-spec :family "PragmataPro Mono Liga" :size 16 :weight 'bold)
doom-variable-pitch-font (font-spec :family "Iosevka" :size 16 :weight 'light)
doom-big-font (font-spec :family "Iosevka" :size 22. :weight 'medium)
doom-themes-enable-bold t
doom-themes-enable-italic t
)
#+End_src
** Window Size
#+begin_src elisp
;; (setq default-frame-alist '((width . 200) (height . 55)))
#+end_src
** Theme
#+begin_src elisp
(setq doom-theme 'doom-palenight)
;; (after! doom-themes
;; (load-theme 'doom-nano-light t))
;; (use-package! doom-nano-modeline
;; :config
;; (doom-nano-modeline-mode 1)
;; (global-hide-mode-line-mode nil))
#+end_src
** Translucency
Setup some translucency to make things look nice.
#+begin_src emacs-lisp
(doom/set-frame-opacity 100)
(set-frame-parameter nil 'alpha-background 100)
(add-to-list 'default-frame-alist '(alpha-background . 100))
#+end_src
* Startup
** Load custom scripts
#+begin_src elisp
;; (add-to-list 'load-path "~/.config/doom/el")
#+end_src
** Startup buffer
#+begin_src elisp
(setq +doom-dashboard-menu-sections '
(
("Recently opened files" :icon
(nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
:action recentf-open-files)
("Open org-agenda"
:icon (nerd-icons-octicon "nf-oct-calendar" :face 'doom-dashboard-menu-title)
:when (fboundp 'org-agenda)
:action org-agenda)
("Open Notes"
:icon (nerd-icons-faicon "nf-fa-file_text" :face 'doom-dashboard-menu-title)
:action +default/browse-notes)
))
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-banner)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer)
(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-loaded)
(setq +doom-dashboard-banner-padding '(1 . 1))
(add-hook! '+doom-dashboard-functions :append 'doom-dashboard-widget-shortmenu)
(add-hook! '+doom-dashboard-functions :append 'doom-dashboard-widget-loaded)
#+end_src
* Editor
** Line numbering
Enable basic line numbering
#+begin_src elisp
(setq display-line-numbers-type t)
#+end_src
** Quit Confirmation
Don't prompt to quit
#+begin_src elisp
(setq confirm-kill-emacs nil)
#+end_src
** Horizontal scrolling
#+begin_src elisp
(setq mouse-wheel-tilt-scroll t)
#+end_src
** Precision mouse scrolling
#+begin_src elisp
(setq pixel-scroll-precision-mode t)
#+end_src
* Org Mode
** General settings
#+begin_src elisp
(require 'org)
(setq org-ellipsis ""
org-hide-emphasis-markers t
org-src-fontify-natively t
org-fontify-quote-and-verse-blocks t
org-src-tab-acts-natively t
org-hide-block-startup nil
org-startup-folded 'content
org-cycle-separator-lines 2
org-directory "~/org/"
org-agenda-files '("~/org/" "~/org/agenda/" "~/org/agenda/projects/")
)
(setq-default prettify-symbols-alist '(("#+BEGIN_SRC" . "")
("#+END_SRC" . "")
("#+begin_src" . "")
("#+end_src" . "")))
(setq prettify-symbols-unprettify-at-point 'right-edge)
(defun org-setup ()
(setq-local display-line-numbers nil))
(add-hook 'org-mode-hook 'org-setup)
#+end_src
** Visual fill column
#+begin_src elisp
(setq visual-fill-column-width 110
visual-fill-column-center-text t)
#+end_src
** Org presentation
#+begin_src elisp
(defun my/org-present-start ()
(visual-fill-column-mode 1)
(setq header-line-format " ")
(visual-line-mode 1)
(hide-mode-line-mode)
(setq-local
hl-line-mode nil)
(setq-local face-remapping-alist
'((default (:height 1.5) variable-pitch)
(header-line (:height 4.0) variable-pitch)
(org-document-title (:height 1.75) org-document-title)
(org-code (:height 1.55) org-code)
(org-verbatim (:height 1.55) org-verbatim)
(org-block (:height 1.25) org-block)
(org-block-begin-line (:height 0.7) org-block)))
)
(defun my/org-present-end ()
(visual-fill-column-mode 0)
(hide-mode-line-mode)
(visual-line-mode 0)
(setq header-line-format nil)
(setq-local face-remapping-alist nil
hl-line-mode t))
(add-hook 'org-present-mode-hook 'my/org-present-start)
(add-hook 'org-present-mode-quit-hook 'my/org-present-end)
#+end_src
** Setup org header faces
#+begin_src elisp
(dolist
(face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.05)
(org-level-4 . 1.0)
(org-level-5 . 1.0)
(org-level-6 . 1.0)
(org-level-7 . 1.0)
(org-level-8 . 1.0)))
(set-face-attribute (car face) nil
:font "Iosevka"
:weight 'medium
:height (cdr face)))
(set-face-attribute 'org-document-title nil :font "Iosevka" :weight 'bold :height 1.3)
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
(set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
(set-face-attribute 'bold nil :foreground "#c678dd" :weight 'extrabold)
#+end_src
** Bullets
#+begin_src elisp
(use-package org-bullets
:after org
:hook (org-mode . org-bullets-mode)
:custom
(org-bullets-bullet-list '("" "" "" "" "" "" "" "")))
#+end_src
** Capture templates
#+begin_src elisp
(setq +org-capture-todo-file "agenda/tasks.org")
(setq +org-capture-notes-file "notes/personal/index.org")
(setq org-capture-templates
'(
("n" "Notes")
("nq" "Quikerve notes" entry
(file+headline "notes/quikserve/index.org" "Inbox")
"* %u %?\n%i\n%a" :prepend t)
("np" "Personal notes" entry
(file+headline +org-capture-notes-file "Inbox")
"* %u %?\n%i\n%a" :prepend t)
("t" "Tasks")
("tp" "Personal todo" entry
(file+headline +org-capture-todo-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("tq" "Quikserve todo" entry
(file+headline "agenda/quikserve.org" "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("j" "Journal")
("jp" "Personal journal" entry
(file+olp+datetree "journal/personal.org")
"* %U %?\n%i\n%a" :prepend t)
("jq" "Quikserve journal" entry
(file+olp+datetree "journal/quikserve.org")
"* %U %?\n%i\n%a" :prepend t)
("p" "Templates for projects")
("pt" "Project TODO" entry (file+headline project-agenda-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("pn" "Project notes" entry (file+headline project-notes-file "Quicknotes")
"* %U %?\n%i\n%a" :prepend t)
("pc" "Project-local changelog" entry
(file+headline +org-capture-project-changelog-file "Unreleased")
"* %U %?\n%i" :prepend t)))
(defun project-agenda-file ()
(expand-file-name (concat "agenda/projects/" (project-name (project-current)) ".org") org-directory))
(defun project-notes-file ()
(expand-file-name (concat "notes/projects/" (project-name (project-current)) ".org") org-directory))
#+end_src
** Don't show before schedule time
Hide items in the TODO list and agenda if they have a scheduled time that has not passed
#+begin_src elisp
(setq org-agenda-todo-ignore-scheduled 'future)
(setq org-agenda-todo-ignore-with-date t)
(setq org-agenda-tags-todo-honor-ignore-options t)
(setq org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
#+end_src
** Latex
#+begin_src elisp
(setq org-export-with-author t)
(setq org-export-with-date t)
(setq org-export-with-toc t)
(setq org-export-with-section-numbers nil)
(setq org-latex-toc-command "\\tableofcontents \\clearpage")
(setq org-latex-tables-centered nil)
(setq org-latex-tables-booktabs nil)
(setq org-latex-default-class "document")
(add-to-list 'org-latex-packages-alist '("" "listings"))
(add-to-list 'org-latex-packages-alist '("" "color"))
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-classes
'("quikserve"
"
\\documentclass{article}
[DEFAULT-PACKAGES]
\\include{/home/joe/org/assets/quikserve.tex}
[EXTRA]
"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
)
)
#+end_src
** Verb
#+begin_src elisp
(with-eval-after-load 'org
(define-key org-mode-map (kbd "C-c C-r") verb-command-map))
#+end_src
* Email
#+begin_src elisp
(setq mu4e-drafts-folder "/fivesigma/Drafts"
mu4e-sent-folder "/fivesigma/Sent"
mu4e-trash-folder "/fivesigma/Trash"
mu4e-refile-folder "/fivesigme/Archive"
user-full-name "Joe Bellus"
user-mail-address "joe@5sigma.io")
(setq mu4e-update-interval 120)
(setq sendmail-program (executable-find "msmtp")
send-mail-function #'smtpmail-send-it
smtpmail-stream-type 'starttls
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function #'message-send-mail-with-sendmail
mu4e-bookmarks '(
(:name "Inbox" :query "maildir:/fivesigma/Inbox" :key ?i)
(:name "Today's messages" :query "date:today..now" :key ?t)
(:name "Last 7 days" :query "date:7d..now" :hide-unread t :key ?r)
("flag:flagged" "Flagged messages" ?f)))
(setq mu4e-hide-index-messages t)
(setq mu4e-html2text-command 'mu4e-shr2text)
(setq shr-color-visible-luminance-min 60)
(setq shr-color-visible-distance-min 5)
(setq shr-use-colors nil)
(setq mu4e-get-mail-command "true")
#+end_src
* Language Server
#+begin_src elisp
(setq lsp-auto-execute-action nil)
#+end_src
* Clock table
Add a key bind to show a 'clocktable' report in a new buffer
#+begin_src elisp
(defun kb/show-clocktable ()
(interactive)
(get-buffer-create "clocktable")
(with-current-buffer "clocktable"
(org-mode)
(erase-buffer)
(setq-local org-link-descriptive (not org-link-descriptive))
(insert (org-clock-get-clocktable :scope 'agenda :fileskip0 t :stepskip0 t :link t))
)
(switch-to-buffer "clocktable")
)
(map! :leader
:desc "Show clocktable"
"o C" #'kb/show-clocktable)
#+end_src
* Tramp
Set tramp to default to ssh
#+begin_src elisp
(setq tramp-default-method "ssh")
#+end_src
* Misc Key binds
** Project management
#+begin_src elisp
(map! :leader
:desc "Project terminal"
"p v" #'projectile-run-vterm-other-window)
(map! :leader "p F" nil)
(map! :leader "p g" nil)
(map! :leader "p t" nil)
(map! :leader "p C" nil)
(map! :leader "p c" nil)
(map! :leader "p s" nil)
#+end_src
** Utilities
#+begin_src elisp
(map! :leader "f c" (lambda () (interactive) (doom-project-browse "~/.config/nix/")))
#+end_src
** Code
#+begin_src elisp
(map! :leader "c X" #'flymake-show-project-diagnostics)
#+end_src
* Direnv
#+begin_src elisp
(direnv-mode)
(setq direnv-always-show-summary nil)
#+end_src
* Elixir
** LSP
#+begin_src elisp
(with-eval-after-load 'eglot
(setf (alist-get 'elixir-mode eglot-server-programs)
(if (and (fboundp 'w32-shell-dos-semantics)
(w32-shell-dos-semantics))
'("language_server.bat")
(eglot-alternatives
'("language_server.sh" "lexical")))))
(with-eval-after-load 'eglot
(setf (alist-get 'elixir-ts-mode eglot-server-programs)
(if (and (fboundp 'w32-shell-dos-semantics)
(w32-shell-dos-semantics))
'("language_server.bat")
(eglot-alternatives
'("language_server.sh" "lexical")))))
#+end_src
* Fix mu4e
#+begin_src elisp
;;(defalias 'mu4e~compose-remap-faces 'mu4e--compose-remap-faces)
;;(defalias 'mu4e~compose-setup-completion 'mu4e--compose-setup-completion)
;;(defalias 'mu4e~request-contacts 'mu4e--request-contacts-maybe)
;; (mu4e-compat-define-aliases-backwards)
;; (mu4e-compat-define-aliases-forwards)
#+end_src

View File

@@ -0,0 +1,196 @@
;;; el/conduct.el -*- lexical-binding: t; -*-
(require 'shell)
(define-derived-mode conduct-mode shell-mode "Conduct"
"Conduct process buffer" :interactive nil
(read-only-mode)
(evil-define-key 'insert conduct-mode-map "q" 'conduct/buffer-kill)
(evil-define-key 'normal conduct-mode-map "r" 'conduct/buffer-restart)
(evil-define-key 'normal conduct-mode-map "r" 'conduct/buffer-restart)
(evil-define-key 'normal conduct-mode-map "q" 'conduct/buffer-kill))
(provide 'conduct-mode)
(defun conduct/buffer-restart () (interactive) (conduct/restart-task current-task))
(defun conduct/buffer-kill () (interactive) (conduct/kill-task current-task))
(defun conduct-run ()
"Run a task or task group defined in the current project"
(interactive)
(let* (
(config-data (conduct/load-config))
(tasks (alist-get 'tasks config-data))
(groups (alist-get 'groups config-data))
(select-tasks (append (mapcar 'conduct/format-task-name tasks) nil))
(select-groups (append (mapcar 'conduct/format-group-name groups) nil))
(items (seq-remove #'conduct/is-running (append select-tasks select-groups)))
(selected-name (conduct/extract-name-from-selection (completing-read "Task: " items)))
(task-names (conduct/get-task-name selected-name config-data))
(group-names (conduct/get-group-name selected-name config-data))
(names (append task-names group-names)))
(dolist (name names)
(unless (conduct/get-task-buffer (conduct/get-named-task name config-data))
(conduct/run-task (conduct/get-named-task name config-data))))))
(defun conduct-kill ()
"Kill a defined project task"
(interactive)
(let* (
(config-data (conduct/load-config))
(tasks (alist-get 'tasks config-data))
(groups (alist-get 'groups config-data))
(select-tasks (seq-filter #'conduct/is-running (append (mapcar 'conduct/format-task-name tasks) nil)))
(select-groups (append (mapcar 'conduct/format-group-name groups) nil))
(items (append select-tasks select-groups))
(selected-name (conduct/extract-name-from-selection (completing-read "Task: " items)))
(task-names (conduct/get-task-name selected-name config-data))
(group-names (conduct/get-group-name selected-name config-data))
(names (append task-names group-names)))
(dolist (name names)
(conduct/kill-task (conduct/get-named-task name config-data)))))
(defun conduct-show ()
"Kill a defined project task"
(interactive)
(let* (
(config-data (conduct/load-config))
(tasks (alist-get 'tasks config-data))
(select-tasks (seq-filter #'conduct/is-running (append (mapcar 'conduct/format-task-name tasks) nil)))
(selected-name (conduct/extract-name-from-selection (completing-read "Task: " select-tasks))))
(switch-to-buffer (format "task-%s" selected-name))))
(defun conduct-restart ()
"Kill a defined project task"
(interactive)
(let* (
(config-data (conduct/load-config))
(tasks (alist-get 'tasks config-data))
(select-tasks (seq-filter #'conduct/is-running (append (mapcar 'conduct/format-task-name tasks) nil)))
(selected-name (conduct/extract-name-from-selection (completing-read "Task: " select-tasks)))
(task (conduct/get-named-task selected-name config-data)))
(conduct/restart-task task)))
(defun conduct/create-task-path (task)
"Generate a new path based on the project root and the path for TASK"
(concat
(file-name-as-directory (project-root (project-current)))
(or (alist-get 'path task) ".")))
(defun conduct/load-config ()
"Load the conduct.json config file from the current project root"
(let* (
(config-file (concat
(file-name-as-directory (project-root (project-current)))
"conduct.json")))
(json-read-file config-file)))
(defun conduct/get-named-task (name data)
"Return the task for NAME. NAME is assumed to be a string"
(assoc (intern name) (alist-get 'tasks data)))
(defun conduct/get-task-name (name data)
"Returns the name of the task as a single item list. If it exists in DATA"
(when-let (name (assoc (intern name) (alist-get 'tasks data)))
(list (symbol-name (car name)))))
(defun conduct/get-group-name (name data)
"Returns a list of all tasks for the group named NAME in DATA"
(append (cdr (assoc (intern name) (alist-get 'groups data))) nil))
(defun conduct/run-task (task)
"Run the given task definition"
(let* (
(name (concat "task-" (symbol-name (car task))))
(buffer (concat "task-" (symbol-name (car task))))
(raw-cmd (alist-get 'command (cdr task)))
(task-cmd (concat "cd " (conduct/create-task-path (cdr task)) " && " raw-cmd))
(command (list "/bin/sh" "-c" task-cmd))
(process (make-process :name name :buffer buffer :command command :sentinel 'conduct/task-sentinal)))
(with-current-buffer buffer
(conduct-mode)
(setq-local current-task task)
(set-process-query-on-exit-flag process nil)
(set-process-filter process 'comint-output-filter)
(display-buffer buffer)
buffer)))
(defun conduct/get-task-buffer (task)
"Get the buffer related to a TASK defintiion"
(get-buffer (concat "task-" (symbol-name (car task)))))
(defun conduct/restart-task (task)
"Kill the process and buffer for a TASK"
(if-let* ((buffer (conduct/get-task-buffer task))
(old-process (get-buffer-process buffer))
(raw-cmd (alist-get 'command (cdr task)))
(task-cmd (concat "cd " (conduct/create-task-path (cdr task)) " && " raw-cmd))
(command (list "/bin/sh" "-c" task-cmd))
(name (concat "task-" (symbol-name (car task)))))
(with-current-buffer buffer
(set-process-sentinel old-process (lambda(_process _event) (set-process-filter (make-process :name name :buffer buffer :command command :sentinel 'conduct/task-sentinal) 'comint-output-filter)))
(kill-process old-process))
(message "Task buffer not found for %s" (alist-get 'name task))))
(defun conduct/kill-task (task)
"Kill the process and buffer for a TASK"
(if-let* ((buffer (conduct/get-task-buffer task))
(process (get-buffer-process buffer)))
(progn
(kill-process (get-buffer-process buffer)))
(message "Task buffer not found for %s" (alist-get 'name task))))
(defun conduct/format-group-name (group)
"Format the name for GROUP that can be used in the popup selection"
(concat
(propertize (symbol-name (car group)) 'face 'outline-1)
(propertize "|" 'invisible t)
" "
(propertize (mapconcat #'identity (cdr group) ", ") 'face 'org-archived)))
(defun conduct/extract-name-from-selection (selection)
(car (split-string selection "|")))
(defun conduct/is-running (task-name)
(let* ((process-name (concat "task-" (conduct/extract-name-from-selection task-name))))
(member process-name (mapcar #'process-name (process-list)))))
(defun conduct/format-task-name (task)
"Format the name for TASK to be used in the popup selection"
(let* (
(task-name (symbol-name (car task))))
(concat
(propertize task-name 'face 'bold)
(propertize "|" 'invisible t)
(propertize " ")
(propertize (alist-get 'command (cdr task)) 'face 'org-archived))))
(defun conduct/check-signal (sig s)
"Check the process signal against a value"
(and (> (length s) (length sig)) (equal sig (substring s 0 (length sig)))))
(defun conduct/task-sentinal (process event)
"Monitor the task process and close the buffer if it ends"
(cond
((conduct/check-signal "finished" event)
(message "Task ended: %s" (buffer-name (process-buffer process)))
(kill-buffer (process-buffer process)))
((conduct/check-signal "exited" event) (kill-buffer (process-buffer process)))
((conduct/check-signal "deleted" event) (kill-buffer (process-buffer process)))
((conduct/check-signal "failed" event)
(message "Task failed: %s" (buffer-name (process-buffer process)))
(kill-buffer (process-buffer process)))
((conduct/check-signal "killed" event)
(kill-buffer (process-buffer process)))
(t (message (format "Process: %s had the event '%s'" process event)))))

193
dotfiles/emacs/init.el Normal file
View File

@@ -0,0 +1,193 @@
;;; init.el -*- lexical-binding: t; -*- This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
(company +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
(modeline) ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
;;vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
(dired +icons) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
(lsp +eglot) ; M-x vscode
(magit +forge) ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;; rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
(elixir +lsp +tree-sitter) ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
(json +lsp +tree-sitter) ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
ledger ; be audit you can be
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
(nix +lsp) ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org +present +pandoc +roam2) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python +lsp) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp +tree-sitter) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
(web +lsp +tree-sitter) ; the tubes
yaml ; JSON, but readable
;;zig ; C, but simpler
:email
(mu4e +org)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
literate
(default +bindings +smartparens))

View File

@@ -0,0 +1,68 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
(package! org-ql)
(package! org-bullets)
(package! org-present)
(package! visual-fill-column)
(package! direnv)
;(package! doom-nano-modeline
; :recipe (:repo "ronisbr/doom-nano-modeline" :host github))
(package! yuck-mode)
(package! org-ql)
(package! verb)
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;; (package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/radian-software/straight.el#the-recipe-format
;; (package! another-package
;; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to s)kpecify
;; `:files' in the `:recipe':
;; (package! this-package
;; :recipe (:host github :repo "username/repo"
;; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;; (package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;; (package! builtin-package :recipe (:nonrecursive t))
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see radian-software/straight.el#279)
;; (package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;; (package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;; (unpin! pinned-package)
;; ...or multiple packages
;; (unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;; (unpin! t)

4
dotfiles/ghostty.conf Normal file
View File

@@ -0,0 +1,4 @@
theme = dankcolors
app-notifications = no-clipboard-copy,no-config-reload
font-family = "JetBrainsMono NF Regular"

34
dotfiles/hypridle.conf Normal file
View File

@@ -0,0 +1,34 @@
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
}
listener {
timeout = 150 # 2.5min.
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = brightnessctl -r # monitor backlight restore.
}
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
listener {
timeout = 150 # 2.5min.
# on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
# on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
}
listener {
timeout = 1800 # 5min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {
timeout = 2000 # 5.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected after timeout has fired.
}
listener {
timeout = 1800 # 30min
on-timeout = systemctl suspend # suspend pc
}

170
dotfiles/hyprland.base.conf Normal file
View File

@@ -0,0 +1,170 @@
exec-once = dms run
exec-once = systemctl --user start kanshi
exec-once = systemctl --user start hypridle
exec-once = systemctl --user start hyprpolkitagent
input {
kb_layout = us
follow_mouse = 1
sensitivity = 0.5
touchpad {
natural_scroll = no
}
}
general {
gaps_in = 30
gaps_out = 5, 20, 20, 20
border_size = 0
col.active_border = rgba(ffffff88)
col.inactive_border = rgba(ffffff22)
layout = master
# layout = master
}
master {
orientation = center
}
decoration {
active_opacity = 1
inactive_opacity = 1
dim_inactive = true
dim_strength = 0.2
dim_special = 0
rounding = 5
border_part_of_window = false
blur {
enabled = true
size = 5
passes = 2
brightness = 0.8
}
shadow {
enabled = true
range = 30
render_power = 4
color = rgba(00000099)
}
}
# Ultraide gaps
# workspace = w[t1] m[DP-4] s[false], gapsout:10 1500
# workspace = w[t1] m[DP-4] s[true], gapsout:10 1800
# workspace = w[t2] m[DP-4] s[true], gapsout:10 1000
gesture = 4, horizontal, workspace
gesture = 4, down, mod: ALT, close
gesture = 4, up, mod: SUPER, fullscreen
group {
col.border_active = rgba(7d32a899) rgba(da16f099) 45deg
col.border_inactive = rgba(cccccc88)
groupbar {
font_family = "Iosevka Bold"
font_size = 10
height = 22
text_color = 0xccccccff
col.active = rgba(7d32a899)
col.inactive = rgba(00000088)
}
}
animations {
enabled = yes
}
animation = specialWorkspace, 1, 10, default, fade
misc {
disable_hyprland_logo=true
}
windowrule=float on,pin on,opaque on,no_dim on,no_shadow on, no_blur on, border_size 0, match:title Picture-in-Picture
# windowrule = opacity 0.5, class:kitty
$mainMod = SUPER
bindle = ,XF86MonBrightnessUp, exec, brightnessctl set +10%
bindle = ,XF86MonBrightnessDown, exec, brightnessctl set 10%-
bindle=, XF86AudioRaiseVolume, exec, amixer sset Master 5%+
bindle=, XF86AudioRaiseVolume, exec, eww update volume=$(amixer sget Master | awk -F"[][]" '/Left:/ { print $2 }' | tr -d '%')
bindle=, XF86AudioLowerVolume, exec, amixer sset Master 5%-
bindle=, XF86AudioLowerVolume, exec, eww update volume=$(amixer sget Master | awk -F"[][]" '/Left:/ { print $2 }' | tr -d '%')
bindle=, XF86AudioMute, exec, amixer sset Master 1+ toggle
bindle=, XF86AudioMute, exec, eww update volume=$(amixer sget Master | awk -F"[][]" '/Left:/ { print $2 }' | tr -d '%')
bindle=, XF86Calculator, exec, kitty -e octave
bindle=, XF86AudioPlay, exec, playerctl play-pause
bindle=, XF86AudioNext, exec, playerctl next
bindle=, XF86AudioPrev, exec, playerctl previous
bind = $mainMod, F9, exec, hyprctl keyword monitor "DP-4, 2560x1440@60, 0x0, 1"
bind = $mainMod, F10, exec, hyprctl keyword monitor "DP-4, 5120x1440@60, 0x0, 1"
bind = $mainMod, RETURN, exec, kitty
bind = $mainMod, W, killactive,
bind = $mainMod SHIFT, F, togglefloating,
bind = $mainMod, SPACE, exec, dms ipc call spotlight toggle
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, V, togglesplit, # dwindle
bind = $mainMod, G, togglegroup,
bind = $mainMod SHIFT, G, moveoutofgroup,
bind = $mainMod, TAB, changegroupactive,
bind = $mainMod, F, fullscreen
bind = $mainMod, b, exec, eww open --toggle side-panel
bind = $mainMod, Print, exec, grim -g "$(slurp -d)" - | wl-copy
bind = $mainMod SHIFT, S, exec, grim -g "$(slurp -d)" - | wl-copy
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
bind = $mainMod SHIFT, h, movewindow, l
bind = $mainMod SHIFT, l, movewindow, r
bind = $mainMod SHIFT, k, movewindow, u
bind = $mainMod SHIFT, j, movewindow, d
# Switch workspaces with mainMod + [0-9]
bind=SUPER,1,moveworkspacetomonitor,1 current
bind=SUPER,1,workspace,1
bind=SUPER,2,moveworkspacetomonitor,2 current
bind=SUPER,2,workspace,2
bind=SUPER,3,moveworkspacetomonitor,3 current
bind=SUPER,3,workspace,3
bind=SUPER,4,moveworkspacetomonitor,4 current
bind=SUPER,4,workspace,4
bind=SUPER,5,moveworkspacetomonitor,5 current
bind=SUPER,5,workspace,5
bind=SUPER,6,moveworkspacetomonitor,6 current
bind=SUPER,6,workspace,6
bind=SUPER,7,moveworkspacetomonitor,7 current
bind=SUPER,7,workspace,7
bind=SUPER,8,moveworkspacetomonitor,8 current
bind=SUPER,8,workspace,8
bind=SUPER,9,moveworkspacetomonitor,9 current
bind=SUPER,9,workspace,9
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, grave, togglespecialworkspace, magic
bind = $mainMod SHIFT, grave, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

View File

@@ -0,0 +1,5 @@
source = ./base.conf
# monitor = eDP-2, 2560x1600@165, 0x0, 1
# monitor = DP-4, 2560x1440@120, 0x0, 1
# monitor = DP-3, 1280x800, 2560x1440, 1
monitor = , preferred, auto, 1

78
dotfiles/hyprlock.conf Normal file
View File

@@ -0,0 +1,78 @@
$font = Monospace
general {
hide_cursor = false
}
auth {
fingerprint {
enabled = true
ready_message = Scan fingerprint to unlock
present_message = Scanning...
retry_delay = 250
}
}
animations {
enabled = true
bezier = linear, 1, 1, 0, 0
animation = fadeIn, 1, 5, linear
animation = fadeOut, 1, 5, linear
animation = inputFieldDots, 1, 2, linear
}
background {
monitor =
path = screenshot
blur_passes = 3
}
input-field {
monitor =
size = 20%, 5%
outline_thickness = 3
inner_color = rgba(0, 0, 0, 0.0) # no fill
outer_color = rgba(e208ffee) rgba(9008ffee) 45deg
check_color = rgba(00ff99ee) rgba(ff6633ee) 120deg
fail_color = rgba(ff6633ee) rgba(ff0066ee) 40deg
font_color = rgb(143, 143, 143)
fade_on_empty = false
rounding = 15
font_family = $font
placeholder_text = Input password...
fail_text = $PAMFAIL
dots_spacing = 0.3
# hide_input = true
position = 0, -20
halign = center
valign = center
}
label {
monitor =
text = $TIME
font_size = 90
font_family = $font
position = -30, 0
halign = right
valign = top
}
# DATE
label {
monitor =
text = cmd[update:60000] date +"%A, %d %B %Y"
font_size = 25
font_family = $font
position = -30, -150
halign = right
valign = top
}

View File

@@ -0,0 +1,13 @@
wallpaper {
monitor = eDP-2
path = ~/Pictures/aishot-1745.jpg
fit_mode = cover
}
wallpaper {
monitor = DP-4
path = ~/Pictures/creature.jpg
fit_mode = cover
}
splash = false

78
dotfiles/kitty/kitty.conf Normal file
View File

@@ -0,0 +1,78 @@
font_size 12.0
# font_family PragmataPro Mono Liga
font_family JetBrainsMono Nerd Font
# bold_font Iosevka
# italic_font Iosevka
# bold_italic_font Iosevka
hide_window_decorations yes
tab_bar_style powerline
enable_audio_bell no
cursor_shape beam
confirm_os_window_close 0
update_check_interval 0
window_padding_width 5
# background #292D3E
# background_opacity 0.6
# vim:ft=kitty
background #1a1b26
foreground #c0caf5
selection_background #283457
selection_foreground #c0caf5
url_color #73daca
cursor #c0caf5
cursor_text_color #1a1b26
# Tabs
active_tab_background #7aa2f7
active_tab_foreground #16161e
inactive_tab_background #292e42
inactive_tab_foreground #545c7e
#tab_bar_background #15161e
# Windows
active_border_color #7aa2f7
inactive_border_color #292e42
# normal
color0 #15161e
color1 #f7768e
color2 #9ece6a
color3 #e0af68
color4 #7aa2f7
color5 #bb9af7
color6 #7dcfff
color7 #a9b1d6
# bright
color8 #414868
color9 #ff899d
color10 #9fe044
color11 #faba4a
color12 #8db0ff
color13 #c7a9ff
color14 #a4daff
color15 #c0caf5
# extended colors
color16 #ff9e64
color17 #db4b4b
# map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j
# map ctrl+k kitten pass_keys.py neighboring_window top ctrl+k
# map ctrl+h kitten pass_keys.py neighboring_window left ctrl+h
# map ctrl+l kitten pass_keys.py neighboring_window right ctrl+l
allow_remote_control yes
listen_on unix:@mykitty
enabled_layouts tall:bias=50;full_size=1;mirrored=false
remember_window_size no
include dank-tabs.conf
include dank-theme.conf

27
dotfiles/lazygit.yml Normal file
View File

@@ -0,0 +1,27 @@
services:
'git.5sigma.io': 'gitea:git.5sigma.io'
gui:
theme:
activeBorderColor:
- '#b4befe'
- bold
inactiveBorderColor:
- '#a6adc8'
optionsTextColor:
- '#89b4fa'
selectedLineBgColor:
- '#313244'
cherryPickedCommitBgColor:
- '#45475a'
cherryPickedCommitFgColor:
- '#b4befe'
unstagedChangesColor:
- '#f38ba8'
defaultFgColor:
- '#cdd6f4'
searchingActiveBorderColor:
- '#f9e2af'
authorColors:
'*': '#b4befe'

7
dotfiles/mako.conf Normal file
View File

@@ -0,0 +1,7 @@
border-radius=5
border-size=0
default-timeout=60000
background-color=#000000cc
height=200
width=500
padding=25

652
dotfiles/niri.kdl Normal file
View File

@@ -0,0 +1,652 @@
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://yalter.github.io/niri/Configuration:-Introduction
// Input device configuration.
// Find the full list of options on the wiki:
// https://yalter.github.io/niri/Configuration:-Input
input {
keyboard {
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// For example:
// layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
// If this section is empty, niri will fetch xkb settings
// from org.freedesktop.locale1. You can control these using
// localectl set-x11-keymap.
}
// Enable numlock on startup, omitting this setting disables it.
numlock
}
// Next sections include libinput settings.
// Omitting settings disables them, or leaves them at their default values.
// All commented-out settings here are examples, not defaults.
touchpad {
// off
// tap
dwt
dwtp
// drag false
// drag-lock
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "two-finger"
disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "no-scroll"
}
trackpoint {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "on-button-down"
// scroll-button 273
// scroll-button-lock
// middle-emulation
}
// Uncomment this to make the mouse warp to the center of newly focused windows.
// warp-mouse-to-focus
// Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
// focus-follows-mouse max-scroll-amount="0%"
}
gestures {
dnd-edge-view-scroll {
trigger-width 30
delay-ms 100
max-speed 1500
}
dnd-edge-workspace-switch {
trigger-height 50
delay-ms 100
max-speed 1500
}
hot-corners {
// off
top-left
// top-right
// bottom-left
// bottom-right
}
}
// You can configure outputs by their name, which you can find
// by running `niri msg outputs` while inside a niri instance.
// The built-in laptop monitor is usually called "eDP-1".
// Find more information on the wiki:
// https://yalter.github.io/niri/Configuration:-Outputs
// Remember to uncomment the node by removing "/-"!
output "eDP-2" {
mode "2560x1600@165"
scale 1
}
output "DP-4" {
// Uncomment this line to disable this output.
// off
// Resolution and, optionally, refresh rate of the output.
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
// If the refresh rate is omitted, niri will pick the highest refresh rate
// for the resolution.
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
// mode custom=true "5120x1440@60"
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
scale 1
// Transform allows to rotate the output counter-clockwise, valid values are:
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
transform "normal"
// Position of the output in the global coordinate space.
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
// The cursor can only move between directly adjacent outputs.
// Output scale and rotation has to be taken into account for positioning:
// outputs are sized in logical, or scaled, pixels.
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
// so to put another output directly adjacent to it on the right, set its x to 1920.
// If the position is unset or results in an overlap, the output is instead placed
// automatically.
position x=0 y=0
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://yalter.github.io/niri/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 30
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
// or right edge of the screen.
// - "always", the focused column will always be centered.
// - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column.
center-focused-column "never"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
// preset-window-heights { }
// You can change the default width of the new windows.
default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
// default-column-width {}
// By default focus ring and border are rendered as a solid background rectangle
// behind windows. That is, they will show up through semitransparent windows.
// This is because windows using client-side decorations can have an arbitrary shape.
//
// If you don't like that, you should uncomment `prefer-no-csd` below.
// Niri will draw focus ring and border *around* windows that agree to omit their
// client-side decorations.
//
// Alternatively, you can override it with a window rule called
// `draw-border-with-background`.
// You can change how the focus ring looks.
focus-ring {
// Uncomment this line to disable the focus ring.
off
// How many logical pixels the ring extends out from the windows.
width 1
// Colors can be set in a variety of ways:
// - CSS named colors: "red"
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
// Color of the ring on the active monitor.
active-color "#7fc8ff"
// Color of the ring on inactive monitors.
//
// The focus ring only draws around the active window, so the only place
// where you can see its inactive-color is on other monitors.
inactive-color "#505050"
// You can also use gradients. They take precedence over solid colors.
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
// The angle is the same as in linear-gradient, and is optional,
// defaulting to 180 (top-to-bottom gradient).
// You can use any CSS linear-gradient tool on the web to set these up.
// Changing the color space is also supported, check the wiki for more info.
//
// active-gradient from="#80c8ff" to="#c7ff7f" angle=45
// You can also color the gradient relative to the entire view
// of the workspace, rather than relative to just the window itself.
// To do that, set relative-to="workspace-view".
//
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// You can also add a border. It's similar to the focus ring, but always visible.
border {
// The settings are the same as for the focus ring.
// If you enable the border, you probably want to disable the focus ring.
// off
width 1
active-color "rgba(200,200,200,0.5)"
inactive-color "rgba(0,0,0,0.5)"
// Color of the border around windows that request your attention.
urgent-color "#9b0000"
// Gradients can use a few different interpolation color spaces.
// For example, this is a pastel rainbow gradient via in="oklch longer hue".
//
// active-gradient from="#e5989b" to="#ffb4a2" angle=45 relative-to="workspace-view" in="oklch longer hue"
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// You can enable drop shadows for windows.
shadow {
// Uncomment the next line to enable shadows.
// on
// By default, the shadow draws only around its window, and not behind it.
// Uncomment this setting to make the shadow draw behind its window.
//
// Note that niri has no way of knowing about the CSD window corner
// radius. It has to assume that windows have square corners, leading to
// shadow artifacts inside the CSD rounded corners. This setting fixes
// those artifacts.
//
// However, instead you may want to set prefer-no-csd and/or
// geometry-corner-radius. Then, niri will know the corner radius and
// draw the shadow correctly, without having to draw it behind the
// window. These will also remove client-side shadows if the window
// draws any.
//
// draw-behind-window true
// You can change how shadows look. The values below are in logical
// pixels and match the CSS box-shadow properties.
// Softness controls the shadow blur radius.
softness 30
// Spread expands the shadow.
spread 5
// Offset moves the shadow relative to the window.
offset x=0 y=5
// You can also change the shadow color and opacity.
color "#0007"
}
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
// You can think of them as a kind of outer gaps. They are set in logical pixels.
// Left and right struts will cause the next window to the side to always be visible.
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
// layer-shell panels and regular gaps.
struts {
// left 64
// right 64
// top 64
// bottom 64
}
}
// Add lines like this to spawn processes at startup.
// Note that running niri as a session supports xdg-desktop-autostart,
// which may be more convenient to use.
// See the binds section below for more spawn examples.
// spawn-at-startup ""
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
spawn-sh-at-startup "systemctl --user start kanshi"
hotkey-overlay {
// Uncomment this line to disable the "Important Hotkeys" pop-up at startup.
skip-at-startup
}
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
// screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
// You can also set this to null to disable saving screenshots to disk.
screenshot-path null
// Animation settings.
// The wiki explains how to configure individual animations:
// https://yalter.github.io/niri/Configuration:-Animations
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
}
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://yalter.github.io/niri/Configuration:-Window-Rules
// Work around WezTerm's initial configure bug
// by setting an empty default-column-width.
window-rule {
// This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives.
// You can get away with just app-id="wezterm" if you want.
match app-id=r#"^org\.wezfurlong\.wezterm$"#
default-column-width {}
}
// Open the Firefox picture-in-picture player as floating by default.
window-rule {
// This app-id regular expression will work for both:
// - host Firefox (app-id is "firefox")
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
}
// Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
block-out-from "screen-capture"
// Use this instead if you want them visible on third-party screenshot tools.
// block-out-from "screencast"
}
// Example: enable rounded corners for all windows.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+Return hotkey-overlay-title="Kitty" { spawn "kitty"; }
Mod+Space hotkey-overlay-title="Launcher" { spawn-sh "dms ipc call spotlight toggle"; }
Super+Alt+L hotkey-overlay-title="Lock the Screen" { spawn-sh "dms ipc call lock lock"; }
Mod+F10 hotkey-overlay-title="Max Resolution" { spawn-sh "niri msg output DP-4 custom-mode 5120x1440@60"; }
Mod+F9 hotkey-overlay-title="Max Resolution" { spawn-sh "niri msg output DP-4 custom-mode 2560x1440@60"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
// Using spawn-sh allows to pass multiple arguments together with the command.
// "-l 1.0" limits the volume to 100%.
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
// Example media keys mapping using playerctl.
// This will work with any MPRIS-enabled media player.
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
// Example brightness key mappings for brightnessctl.
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
// but you need to manually put each argument in separate "" quotes.
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
Mod+O repeat=false { toggle-overview; }
Mod+F14 repeat=false { toggle-overview; }
Mod+W repeat=false { close-window; }
Mod+Left { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
Mod+Right { focus-column-right; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
Mod+Shift+Left { move-column-left; }
Mod+Shift+Down { move-window-down; }
Mod+Shift+Up { move-window-up; }
Mod+Shift+Right { move-column-right; }
Mod+Shift+H { move-column-left; }
Mod+Shift+J { move-window-down; }
Mod+Shift+K { move-window-up; }
Mod+Shift+L { move-column-right; }
// Alternative commands that move across workspaces when reaching
// the first or last window in a column.
// Mod+J { focus-window-or-workspace-down; }
// Mod+K { focus-window-or-workspace-up; }
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Ctrl+Left { focus-monitor-left; }
Mod+Ctrl+Down { focus-monitor-down; }
Mod+Ctrl+Up { focus-monitor-up; }
Mod+Ctrl+Right { focus-monitor-right; }
Mod+Ctrl+H { focus-monitor-left; }
Mod+Ctrl+J { focus-monitor-down; }
Mod+Ctrl+K { focus-monitor-up; }
Mod+Ctrl+L { focus-monitor-right; }
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// You can bind mouse wheel scroll ticks using the following syntax.
// These binds will change direction based on the natural-scroll setting.
//
// To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; }
// Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+Ctrl+1 { focus-column 1; }
Mod+Ctrl+2 { focus-column 2; }
Mod+Ctrl+3 { focus-column 3; }
Mod+Ctrl+4 { focus-column 4; }
Mod+Ctrl+5 { focus-column 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+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; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
// The following binds move the focused window in and out of a column.
// If the window is alone, they will consume it into the nearby column to the side.
// If the window is already in a column, they will expel it out.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
// Consume one window from the right to the bottom of the focused column.
Mod+Comma { consume-window-into-column; }
// Expel the bottom window from the focused column to the right.
Mod+Period { expel-window-from-column; }
Mod+R { switch-preset-column-width; }
// Cycling through the presets in reverse order is also possible.
// Mod+R { switch-preset-column-width-back; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
// Expand the focused column to space not taken up by other fully visible columns.
// Makes the column "fill the rest of the space".
Mod+Ctrl+F { expand-column-to-available-width; }
Mod+C { center-column; }
// Center all fully visible columns on screen.
Mod+Ctrl+C { center-visible-columns; }
// Finer width adjustments.
// This command can also:
// * set width in pixels: "1000"
// * adjust width in pixels: "-5" or "+5"
// * set width as a percentage of screen width: "25%"
// * adjust width as a percentage of screen width: "-10%" or "+10%"
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
// set-column-width "100" will make the column occupy 200 physical screen pixels.
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
// Finer height adjustments when in column with other windows.
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
// Move the focused window between the floating and the tiling layout.
Mod+V { toggle-window-floating; }
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
// Toggle tabbed column display mode.
// Windows in this column will appear as vertical tabs,
// rather than stacked on top of each other.
Mod+Tab { toggle-column-tabbed-display; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
// Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here
// so they may, for example, forward the key presses as-is to a remote machine.
// It's a good idea to bind an escape hatch to toggle the inhibitor,
// so a buggy application can't hold your session hostage.
//
// The allow-inhibiting=false property can be applied to other binds as well,
// which ensures niri always processes them, even when an inhibitor is active.
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
Ctrl+Alt+Delete { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
}

View File

@@ -0,0 +1,7 @@
require("nvchad.mappings")
local map = vim.keymap.set
map("n", "<leader>tr", function()
vim.lsp.codelens.run()
end, { desc = "Run codelense" })

View File

@@ -0,0 +1,7 @@
require("nvchad.mappings")
local map = vim.keymap.set
map("n", "<leader>ca", function()
vim.cmd.RustLsp("codeAction")
end, { silent = true, buffer = bufnr, desc = "LSP Code action" })

2
dotfiles/nvim/init.lua Normal file
View File

@@ -0,0 +1,2 @@
require "init"
require "extraConfig"

View File

@@ -0,0 +1,24 @@
-- This file needs to have same structure as nvconfig.lua
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
-- Please read that file to know all available options :(
---@type ChadrcConfig
local M = {}
M.base46 = {
theme = "catppuccin",
-- hl_override = {
-- Comment = { italic = true },
-- ["@comment"] = { italic = true },
-- },
}
-- M.nvdash = { load_on_startup = true }
-- M.ui = {
-- tabufline = {
-- lazyload = false
-- }
--}
return M

View File

@@ -0,0 +1,21 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
elixir = { "mix" },
javascript = { "prettier" },
css = { "prettier" },
html = { "prettier" },
html = { "prettier" },
heex = { "mix" },
nix = { "nixfmt" },
json = { "prettier" },
},
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 2000,
lsp_fallback = true,
},
}
return options

View File

@@ -0,0 +1,47 @@
return {
defaults = { lazy = true },
install = { colorscheme = { "nvchad" } },
ui = {
icons = {
ft = "",
lazy = "󰂠 ",
loaded = "",
not_loaded = "",
},
},
performance = {
rtp = {
disabled_plugins = {
"2html_plugin",
"tohtml",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"matchit",
"tar",
"tarPlugin",
"rrhelper",
"spellfile_plugin",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
"tutor",
"rplugin",
"syntax",
"synmenu",
"optwin",
"compiler",
"bugreport",
-- "ftplugin",
},
},
},
}

View File

@@ -0,0 +1,28 @@
-- load defaults i.e lua_lsp
require("nvchad.configs.lspconfig").defaults()
local lspconfig = require("lspconfig")
-- lspconfig.elixirls.setup({
-- cmd = { "elixir-ls" },
-- })
-- EXAMPLE
local servers = { "html", "cssls" }
local nvlsp = require("nvchad.configs.lspconfig")
-- lsps with default config
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
on_attach = nvlsp.on_attach,
on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
})
end
-- configuring single server, example: typescript
-- lspconfig.ts_ls.setup {
-- on_attach = nvlsp.on_attach,
-- on_init = nvlsp.on_init,
-- capabilities = nvlsp.capabilities,
-- }

View File

@@ -0,0 +1,11 @@
require("telescope").setup({
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
},
},
})

View File

@@ -0,0 +1,37 @@
vim.g.base46_cache = vim.fn.stdpath("data") .. "/base46/"
vim.g.mapleader = " "
-- bootstrap lazy and all plugins
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
local repo = "https://github.com/folke/lazy.nvim.git"
vim.fn.system({ "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(lazypath)
local lazy_config = require("configs.lazy")
-- load plugins
require("lazy").setup({
{
"NvChad/NvChad",
lazy = false,
branch = "v2.5",
import = "nvchad.plugins",
},
{ import = "plugins" },
}, lazy_config)
-- load theme
dofile(vim.g.base46_cache .. "defaults")
dofile(vim.g.base46_cache .. "statusline")
require("options")
require("nvchad.autocmds")
vim.schedule(function()
require("mappings")
end)

View File

@@ -0,0 +1,54 @@
require("nvchad.mappings")
-- add yours here
local map = vim.keymap.set
local builtin = require("telescope.builtin")
local nomap = vim.keymap.del
local nvim_tmux_nav = require("nvim-tmux-navigation")
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
map("n", "<leader>tt", function()
require("base46").toggle_transparency()
end, { desc = "Toggle transparency" })
map("i", "<C-CR>", function()
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "")
end, { desc = "Copilot Accept", silent = true, nowait = true, expr = true, noremap = true })
map("n", "@c", function()
require("CopilotChat").open()
end, { desc = "Copilot chat" })
map("n", "@p", function()
require("copilot.panel").open()
end, { desc = "Copilot chat" })
map("n", "@d", function()
require("copilot.panel").ask("Create documentation for the this code")
end, { desc = "Copilot chat" })
map("n", "<leader>si", function()
builtin.lsp_document_symbols()
end, { desc = "LSP Definitions" })
map("n", "<leader>sd", function()
builtin.lsp_definitions()
end, { desc = "LSP Definitions" })
map("n", "<leader>sr", function()
builtin.lsp_references()
end, { desc = "LSP References" })
map("n", "<leader>ss", function()
builtin.lsp_workspace_symbols()
end, { desc = "LSP workspace symbols" })
nomap("n", "<leader>h")
nomap("n", "<leader>v")
map("n", "<C-h>", nvim_tmux_nav.NvimTmuxNavigateLeft, { desc = "Navigate left" })
map("n", "<C-j>", nvim_tmux_nav.NvimTmuxNavigateDown, { desc = "Navigate down" })
map("n", "<C-k>", nvim_tmux_nav.NvimTmuxNavigateUp, { desc = "Navigate up" })
map("n", "<C-l>", nvim_tmux_nav.NvimTmuxNavigateRight, { desc = "Navigate right" })

View File

@@ -0,0 +1,7 @@
require("nvchad.options")
-- add yours here!
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
--

View File

@@ -0,0 +1,145 @@
return {
{ import = "nvchad.blink.lazyspec" },
{
"stevearc/conform.nvim",
event = "BufWritePre", -- uncomment for format on save
opts = require("configs.conform"),
},
-- These are some examples, uncomment them if you want to see them work!
{
"neovim/nvim-lspconfig",
config = function()
require("configs.lspconfig")
end,
},
{
"nvim-tree/nvim-tree.lua",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
opts = function()
return {
filters = { dotfiles = false },
disable_netrw = true,
hijack_cursor = true,
sync_root_with_cwd = true,
update_focused_file = {
enable = true,
update_root = false,
},
view = {
width = 30,
adaptive_size = true,
preserve_window_proportions = true,
},
renderer = {
root_folder_label = false,
highlight_git = true,
indent_markers = { enable = true },
icons = {
glyphs = {
default = "󰈚",
folder = {
default = "",
empty = "",
empty_open = "",
open = "",
symlink = "",
},
git = { unmerged = "" },
},
},
},
}
end,
},
-- {
-- "hrsh7th/nvim-cmp",
-- dependencies = {
-- {
-- "zbirenbaum/copilot-cmp",
-- config = function()
-- require("copilot_cmp").setup()
-- end,
-- },
-- },
-- opts = {
-- sources = {
-- { name = "nvim_lsp", group_index = 2 },
-- { name = "copilot", group_index = 2 },
-- { name = "luasnip", group_index = 2 },
-- { name = "buffer", group_index = 2 },
-- { name = "nvim_lua", group_index = 2 },
-- { name = "path", group_index = 2 },
-- },
-- },
-- },
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release",
},
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim",
"sindrets/diffview.nvim",
"nvim-telescope/telescope.nvim",
},
config = true,
},
{
lazy = false,
"CopilotC-Nvim/CopilotChat.nvim",
dependencies = {
{ "zbirenbaum/copilot.lua" }, -- or zbirenbaum/copilot.lua
{ "nvim-lua/plenary.nvim", branch = "master" }, -- for curl, log and async functions
},
build = "make tiktoken", -- Only on MacOS or Linux
opts = {
-- See Configuration section for options
},
-- See Commands section for default commands if you want to lazy load on them
},
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
})
end,
},
{
"giuxtaposition/blink-cmp-copilot",
dependencies = {
{ "zbirenbaum/copilot.lua" },
},
},
-- {
-- "zbirenbaum/copilot-cmp",
-- config = function()
-- require("copilot_cmp").setup()
-- end,
-- },
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"vim",
"lua",
"vimdoc",
"html",
"css",
"elixir",
"rust",
"heex",
"javascript",
},
},
},
{
"alexghergh/nvim-tmux-navigation",
lazy = false,
},
}

View File

@@ -0,0 +1,33 @@
return {
{
"elixir-tools/elixir-tools.nvim",
version = "*",
event = { "BufReadPre", "BufNewFile" },
config = function()
local elixir = require("elixir")
local elixirls = require("elixir.elixirls")
elixir.setup({
nextls = { enable = true },
elixirls = {
enable = true,
settings = elixirls.settings({
dialyzerEnabled = false,
enableTestLenses = true,
}),
on_attach = function(client, bufnr)
vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
end,
},
projectionist = {
enable = true,
},
})
end,
dependencies = {
"nvim-lua/plenary.nvim",
},
},
}

View File

@@ -0,0 +1,7 @@
return {
{
"mrcjkb/rustaceanvim",
version = "^5", -- Recommended
lazy = false, -- This plugin is already lazy
},
}

7
dotfiles/ranger.conf Normal file
View File

@@ -0,0 +1,7 @@
set preview_images true
set preview_images_method kitty
set draw_borders true
map ;e fm.execute_console('shell unzip %f')
map ;e fm.execute_console('shell gwenview %f')

66
dotfiles/tmux.conf Normal file
View File

@@ -0,0 +1,66 @@
set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# UseAlt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
set -g @catppuccin_flavour 'mocha'
# set -g @plugin 'niksingh710/minimal-tmux-status'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g status-bg default
set -g status-style bg=default
set -g status-left-length 100
set -g status-left-style default
set -g status-left " "
set -g status-right-length 100
set -g status-right-style default
set -g status-right " "
# set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key b set-option status
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

731
flake.lock generated Normal file
View File

@@ -0,0 +1,731 @@
{
"nodes": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1767024902,
"narHash": "sha256-sMdk6QkMDhIOnvULXKUM8WW8iyi551SWw2i6KQHbrrU=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "b8a0c5ba5a9fbd2c660be7dd98bdde0ff3798556",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"firefox-keyfox-theme": {
"flake": false,
"locked": {
"lastModified": 1764929602,
"narHash": "sha256-Ri30xBBhdApdOhdzt0b+qWcpILM1RPmngUS2VW+V8As=",
"owner": "alfaaarex",
"repo": "keyfox",
"rev": "860cc570fc5b888a01fb6f0519a4c5dbfb356d9f",
"type": "github"
},
"original": {
"owner": "alfaaarex",
"repo": "keyfox",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1768942641,
"narHash": "sha256-i25tkhqjsfo0YKz8To/+gzazW1v4f8qUGqJQ8OLrkqE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "9997de2f62d1875644f02ddf96cf485a4baecb6f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1753964049,
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprgraphics": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1766946335,
"narHash": "sha256-MRD+Jr2bY11MzNDfenENhiK6pvN+nHygxdHoHbZ1HtE=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "4af02a3925b454deb1c36603843da528b67ded6c",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprgraphics": "hyprgraphics",
"hyprland-guiutils": "hyprland-guiutils",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"hyprwire": "hyprwire",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems",
"xdph": "xdph"
},
"locked": {
"lastModified": 1768919552,
"narHash": "sha256-ixrDZEr5iwbzjGMbrknWSt8mb+EevYGZ0r291zo/KWg=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "c44292c72339b3d7820ca7444d45bab7e34ec74e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-guiutils": {
"inputs": {
"aquamarine": [
"hyprland",
"aquamarine"
],
"hyprgraphics": [
"hyprland",
"hyprgraphics"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprtoolkit": "hyprtoolkit",
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1767023960,
"narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"type": "github"
}
},
"hyprland-plugins": {
"inputs": {
"hyprland": [
"hyprland"
],
"nixpkgs": [
"hyprland-plugins",
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland-plugins",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1767723101,
"narHash": "sha256-jObY8O7OI+91hoE137APsDxm0235/Yx+HhFIip187zM=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "fef398ed5e4faf59bc43b915e46a75cfe8b16697",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-plugins",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1765214753,
"narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1764612430,
"narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "0d00dc118981531aa731150b6ea551ef037acddd",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprtoolkit": {
"inputs": {
"aquamarine": [
"hyprland",
"hyprland-guiutils",
"aquamarine"
],
"hyprgraphics": [
"hyprland",
"hyprland-guiutils",
"hyprgraphics"
],
"hyprlang": [
"hyprland",
"hyprland-guiutils",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprland-guiutils",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprland-guiutils",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"hyprland-guiutils",
"nixpkgs"
],
"systems": [
"hyprland",
"hyprland-guiutils",
"systems"
]
},
"locked": {
"lastModified": 1764592794,
"narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "5cfe0743f0e608e1462972303778d8a0859ee63e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprtoolkit",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1766253372,
"narHash": "sha256-1+p4Kw8HdtMoFSmJtfdwjxM4bPxDK9yg27SlvUMpzWA=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "51a4f93ce8572e7b12b7284eb9e6e8ebf16b4be9",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1763640274,
"narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"hyprwire": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1767473322,
"narHash": "sha256-RGOeG+wQHeJ6BKcsSB8r0ZU77g9mDvoQzoTKj2dFHwA=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "d5e7d6b49fe780353c1cf9a1cf39fa8970bd9d11",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwire",
"type": "github"
}
},
"kwin-effects-forceblur": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1755098995,
"narHash": "sha256-6FN7XEf27DenQHDIKjrjOW3tGIaJlyqRlXarmt1v+M0=",
"owner": "taj-ny",
"repo": "kwin-effects-forceblur",
"rev": "51a1d49d7fd7df3ce40ccf6ba4c4410cf6f510e1",
"type": "github"
},
"original": {
"owner": "taj-ny",
"repo": "kwin-effects-forceblur",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1767379071,
"narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fb7944c166a3b630f177938e478f0378e64ce108",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1768886240,
"narHash": "sha256-C2TjvwYZ2VDxYWeqvvJ5XPPp6U7H66zeJlRaErJKoEM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nvchad-starter": {
"flake": false,
"locked": {
"lastModified": 1753939018,
"narHash": "sha256-xdLr6tlU9uA+wu0pqha2br0fdVm+1MjgjbB5awz9ICU=",
"owner": "NvChad",
"repo": "starter",
"rev": "e3572e1f5e1c297212c3deeb17b7863139ce663e",
"type": "github"
},
"original": {
"owner": "NvChad",
"ref": "main",
"repo": "starter",
"type": "github"
}
},
"nvchad4nix": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"nvchad-starter": "nvchad-starter"
},
"locked": {
"lastModified": 1768710268,
"narHash": "sha256-45Whm5k/sNiBzGJWKJvz50Z9NQVycXmM2bb0YBzsT9U=",
"owner": "nix-community",
"repo": "nix4nvchad",
"rev": "25267531fec57db1b3c55e6646c1ea8c9721bac6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix4nvchad",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1767281941,
"narHash": "sha256-6MkqajPICgugsuZ92OMoQcgSHnD6sJHwk8AxvMcIgTE=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "f0927703b7b1c8d97511c4116eb9b4ec6645a0fa",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"quickshell": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1769593411,
"narHash": "sha256-WW00FaBiUmQyxvSbefvgxIjwf/WmRrEGBbwMHvW/7uQ=",
"ref": "refs/heads/master",
"rev": "1e4d804e7f3fa7465811030e8da2bf10d544426a",
"revCount": 732,
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
},
"original": {
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
}
},
"root": {
"inputs": {
"firefox-keyfox-theme": "firefox-keyfox-theme",
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
"kwin-effects-forceblur": "kwin-effects-forceblur",
"nixpkgs": "nixpkgs_2",
"nvchad4nix": "nvchad4nix",
"quickshell": "quickshell"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1761431178,
"narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "4b8801228ff958d028f588f0c2b911dbf32297f9",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

79
flake.nix Normal file
View File

@@ -0,0 +1,79 @@
{
description = "Joes Nix Setup";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nvchad4nix = {
url = "github:nix-community/nix4nvchad";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
kwin-effects-forceblur = {
url = "github:taj-ny/kwin-effects-forceblur";
inputs.nixpkgs.follows = "nixpkgs";
};
quickshell = {
url = "git+https://git.outfoxxed.me/quickshell/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-keyfox-theme = {
url = "github:alfaaarex/keyfox";
flake = false;
};
};
outputs =
{ self, nixpkgs, ... }@inputs:
{
nixosConfigurations = {
server = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "x86_64-linux";
modules = [
./nixcore.nix
./locale.nix
./system.nix
];
};
specter = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "x86_64-linux";
modules = [
./nixcore.nix
./terminal.nix
./system.nix
./laptop.nix
./hardware.specter.nix
./sound.nix
./locale.nix
./development_tools.nix
./desktop.nix
./user.nix
./fonts.nix
./networking.nix
./logi.nix
./home.nix
./dotfiles.nix
./qmk.nix
./bluetooth.nix
./monitor.nix
./personal_apps.nix
./greetd.nix
];
};
};
};
}

13
flakes/rust.nix Normal file
View File

@@ -0,0 +1,13 @@
{
description = "A simple rust environment";
inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; };
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
devShells.${system}.default = pkgs.mkShell {
packages = [ pkgs.rustc pkgs.cargo pkgs.rust-analyzer ];
};
};
}

37
fonts.nix Normal file
View File

@@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
...
}:
{
fonts.enableDefaultPackages = true;
fonts.packages = with pkgs; [
nerd-fonts.droid-sans-mono
nerd-fonts.fira-code
fira
jetbrains-mono
nerd-fonts.jetbrains-mono
iosevka
roboto
inter
source-code-pro
source-sans-pro
source-serif-pro
inconsolata
];
fonts.fontconfig = {
antialias = true;
cache32Bit = true;
hinting.enable = true;
hinting.autohint = true;
subpixel.rgba = "rgb";
defaultFonts = {
monospace = [ "Source Code Pro" ];
sansSerif = [ "Source Sans Pro" ];
serif = [ "Source Serif Pro" ];
};
};
}

37
greetd.nix Normal file
View File

@@ -0,0 +1,37 @@
{
config,
pkgs,
inputs,
...
}:
let
tuigreet = "${pkgs.tuigreet}/bin/tuigreet";
niri-session = "${pkgs.niri}/bin/niri-session";
hyprland-session = "${pkgs.hyprland}/share/wayland-sessions";
in
{
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.tuigreet}/bin/tuigreet --sessions ${config.services.displayManager.sessionData.desktops}/share/xsessions:${config.services.displayManager.sessionData.desktops}/share/wayland-sessions --remember --remember-user-session";
user = "greeter";
};
};
};
# this is a life saver.
# literally no documentation about this anywhere.
# might be good to write about this...
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal"; # Without this errors will spam on screen
# Without these bootlogs will spam on screen
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
}

142
hardware.specter.nix Normal file
View File

@@ -0,0 +1,142 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
# boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
boot.extraModulePackages = [ ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "specter";
services.xserver.videoDrivers = [ "amdgpu" ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/ec9bc14c-0c84-417a-87cc-86b463542958";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/DBDB-72C3";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
fileSystems."/home/joe/projects" = {
device = "/dev/disk/by-uuid/82f95a15-f3d0-4eb9-843d-9eab68491e7c";
fsType = "btrfs";
};
fileSystems."/home/joe/backup" = {
device = "/dev/disk/by-uuid/83503573-ddc4-4291-a515-b877f1d85c39";
fsType = "ext4";
options = [
"x-systemd.automount"
"noauto"
];
};
# fileSystems."/home/joe/travel" = {
# device = "/dev/disk/by-uuid/0D7A-0971";
# fsType = "vfat";
# options = [
# "x-systemd.automount"
# "noauto"
# "nofail",
# "uid=1000"
# "gid=100"
# "dmask=007"
# "fmask=117"
# ];
# };
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
boot.kernelParams =
lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8")
[ "rtc_cmos.use_acpi_alarm=1" ];
# AMD has better battery life with PPD over TLP:
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
services.power-profiles-daemon.enable = lib.mkDefault true;
services.upower.enable = true;
# Fix TRRS headphones missing a mic
# https://community.frame.work/t/headset-microphone-on-linux/12387/3
boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") ''
options snd-hda-intel model=dell-headset-multi
'';
# For fingerprint support
services.fprintd.enable = lib.mkDefault true;
# security.pam.services.login.fprintAuth = false;
# Custom udev rules
services.udev.extraRules = ''
# Ethernet expansion card support
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
# LED MATRIX
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0020", MODE="0660", TAG+="uaccess"
'';
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Needed for desktop environments to detect/manage display brightness
hardware.sensor.iio.enable = lib.mkDefault true;
hardware.keyboard.qmk.enable = lib.mkDefault true;
# Allow `services.libinput.touchpad.disableWhileTyping` to work correctly.
# Set unconditionally because libinput can also be configured dynamically via
# gsettings.
services.libinput.touchpad.disableWhileTyping = true;
environment.etc."libinput/local-overrides.quirks".text = ''
[Framework Laptop 16 Keyboard Module]
MatchName=Framework Laptop 16 Keyboard Module*
MatchUdevType=keyboard
MatchDMIModalias=dmi:*svnFramework:pnLaptop16*
AttrKeyboardIntegration=internal
'';
# Everything is updateable through fwupd
services.fwupd.enable = true;
}

41
home.nix Normal file
View File

@@ -0,0 +1,41 @@
{
config,
pkgs,
inputs,
...
}:
{
imports = [
inputs.home-manager.nixosModules.default
];
home-manager = {
useGlobalPkgs = true;
users.joe = {
home.stateVersion = "18.09";
xdg.enable = true;
xdg.desktopEntries.kitty_overlay = {
name = "Kitty Overlay";
genericName = "Kitten Overlay";
exec = "kitten quick-access-terminal";
terminal = false;
categories = [
"Application"
];
};
xdg.desktopEntries.mongodb_compass = {
name = "MongoDB Compass (libsecret)";
genericName = "MongoDB GUI";
exec = "mongodb-compass --password-store=\"gnome-libsecret\" --ignore-additional-command-line-flags";
terminal = false;
categories = [
"Application"
"Database"
"Development"
];
};
};
};
}

62
laptop.nix Normal file
View File

@@ -0,0 +1,62 @@
{
config,
lib,
pkgs,
...
}:
let
emacsWithPackages = (pkgs.emacsPackagesFor pkgs.emacs30-pgtk).emacsWithPackages;
myemacs = emacsWithPackages (epkgs: [ epkgs.mu4e ]);
in
{
services.pcscd.enable = true;
services.fwupd.enable = true;
environment.systemPackages = with pkgs; [
brightnessctl
ghostscript
fprintd
font-awesome
myemacs
virtiofsd
rocmPackages.rocm-smi
];
users.users.joe.packages = with pkgs; [
system76-keyboard-configurator
(import ./scripts/sat-connect.nix { inherit pkgs; })
];
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.acpid = {
enable = true;
handlers.lidClosed = {
event = "button/lid \\w+ close";
action = ''
cat /sys/class/backlight/amdgpu_bl2/device/enabled
if grep -Fxq disabled /sys/class/backlight/amdgpu_bl2/device/enabled
then
echo "Lid closed. Disabling fprintd."
systemctl stop fprintd
ln -s /dev/null /run/systemd/transient/fprintd.service
systemctl daemon-reload
fi
'';
};
handlers.lidOpen = {
event = "button/lid \\w+ open";
action = ''
if ! $(systemctl is-active --quiet fprintd); then
echo "Lid open. Enabling fprintd."
rm -f /run/systemd/transient/fprintd.service
systemctl daemon-reload
systemctl start fprintd
fi
'';
};
};
}

22
locale.nix Normal file
View File

@@ -0,0 +1,22 @@
{
config,
lib,
pkgs,
...
}:
{
time.timeZone = "America/Chicago";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
}

79
logi.nix Normal file
View File

@@ -0,0 +1,79 @@
{ pkgs, ... }:
{
# Install logiops package
environment.systemPackages = [ pkgs.logiops ];
# Create systemd service
systemd.services.logiops = {
description = "An unofficial userspace driver for HID++ Logitech devices";
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.logiops}/bin/logid";
};
};
# Configuration for logiops
environment.etc."logid.cfg".text = ''
devices: ({
name: "Wireless Mouse MX Master 3";
smartshift: {
on: true;
threshold: 12;
};
hiresscroll: {
hires: true;
target: false;
};
dpi: 1200;
buttons: ({
cid: 0xc3;
action = {
type: "Gestures";
gestures: ({
direction: "Left";
mode: "OnRelease";
action = {
type = "Keypress";
keys: ["KEY_F15"];
};
}, {
direction: "Right";
mode: "OnRelease";
action = {
type = "Keypress";
keys: ["KEY_F16"];
};
}, {
direction: "Down";
mode: "OnRelease";
action = {
type: "Keypress";
keys: ["KEY_F17"];
};
}, {
direction: "Up";
mode: "OnRelease";
action = {
type: "Keypress";
keys: ["KEY_F18"];
};
}, {
direction: "None";
mode: "OnRelease";
action = {
type = "Keypress";
keys: ["KEY_F14"];
};
});
};
}, {
cid: 0xc4;
action = {
type: "Keypress";
keys: ["KEY_F19"];
};
});
});
'';
}

54
monitor.nix Normal file
View File

@@ -0,0 +1,54 @@
{ pkgs, ... }:
{
services.logind.settings.Login = {
HandleLidSwitch = "suspend";
HandleLidSwitchDocked = "ignore";
HandleLidSwitchExternalPower = "suspend";
};
home-manager.users.joe = {
services.kanshi = {
systemdTarget = "";
enable = true;
settings = [
{
profile.name = "undocked";
# profile.exec = "";
profile.outputs = [
{
criteria = "eDP-2";
status = "enable";
}
];
}
{
profile.name = "docked";
# profile.exec = "";
profile.outputs = [
{
criteria = "eDP-2";
status = "disable";
}
{
criteria = "DP-4";
status = "enable";
position = "0,0";
# mode = "5120x1440@60Hz";
}
];
}
];
};
};
systemd.user.services.kanshi = {
enable = true;
description = "kanshi daemon";
wantedBy = [ ];
after = [ ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.kanshi}/bin/kanshi -c kanshi_config_file";
};
};
}

15
networking.nix Normal file
View File

@@ -0,0 +1,15 @@
{
config,
lib,
pkgs,
...
}:
{
networking.extraHosts = "";
# fileSystems."/home/joe/media" = {
# device = "nas.5sigma.net:/share/media";
# fsType = "nfs";
# options = [ "x-systemd.automount" "noauto" "nofail" ];
# };
}

28
nixcore.nix Normal file
View File

@@ -0,0 +1,28 @@
{
config,
lib,
pkgs,
...
}:
{
system.stateVersion = "23.11"; # Did you read the comment?
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.trusted-users = [
"root"
"joe"
];
boot.tmp.cleanOnBoot = true;
users.users.joe.packages = with pkgs; [
(import ./scripts/rebuild.nix { inherit pkgs; })
(import ./scripts/rebuild-boot.nix { inherit pkgs; })
(import ./scripts/rebuild-dry.nix { inherit pkgs; })
(import ./scripts/nixupdate.nix { inherit pkgs; })
(import ./scripts/nixclean.nix { inherit pkgs; })
];
}

94
personal_apps.nix Normal file
View File

@@ -0,0 +1,94 @@
{
config,
lib,
pkgs,
inputs,
...
}:
{
virtualisation.docker.enable = true;
virtualisation.libvirtd.enable = true;
security.polkit.enable = true;
programs.virt-manager.enable = true;
services = {
gvfs.enable = true;
printing.enable = true;
printing.drivers = [ pkgs.brlaser ];
};
programs.steam.enable = true;
users.users.joe.packages = with pkgs; [
element-desktop
handbrake
luajitPackages.luarocks_bootstrap
texliveFull
darktable
qcad
spotify
octaveFull
gimp
inkscape
libreoffice-still
freecad
ocs-url
pandoc
teams-for-linux
krita
zoom-us
discord
proxmox-backup-client
blender
playerctl
gnucash
nomachine-client
proton-pass-cli
mattermost-desktop
font-awesome
];
# systemd.services."backup" = {
# script = ''
# export PBS_REPOSITORY='backup@pbs!workstation-backup@backup.5sigma.net:main'
# export PBS_PASSWORD='edd3be5c-2c75-4832-82f4-c1027361ae8d'
# ${pkgs.proxmox-backup-client}/bin/proxmox-backup-client backup nix.pxar:/home/joe/.config/nix projects.pxar:/home/joe/projects;
# '';
# serviceConfig = {
# Type = "oneshot";
# User = "joe";
# };
# wantedBy = [ "default.target" ];
# };
#
# systemd.timers."backup" = {
# enable = true;
# wantedBy = [ "timers.target" ];
# timerConfig = {
# OnBootSec = "15m";
# OnUnitActiveSec = "1d";
# Unit = "backup.service";
# };
# };
# EMAIL CHECKING
# systemd.timers."mail-check" = {
# enable = true;
# wantedBy = [ "timers.target" ];
# timerConfig = {
# OnBootSec = "5m";
# OnUnitActiveSec = "5m";
# Unit = "mail-check.service";
# };
# };
# systemd.services."mail-check" = {
# script = ''
# ${pkgs.isync}/bin/mbsync -a
# '';
# serviceConfig = {
# Type = "oneshot";
# User = "joe";
# };
# wantedBy = [ "default.target" ];
# };
}

18
qmk.nix Normal file
View File

@@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
via
vial
fprintd
qmk
qmk_hid
];
hardware.keyboard.qmk.enable = lib.mkDefault true;
services.udev.packages = [ pkgs.via ];
}

34
scripts/new-elixir.nix Normal file
View File

@@ -0,0 +1,34 @@
{ pkgs }:
pkgs.writeShellScriptBin "new-elixir" ''
nix-shell -p elixir --run "mix new $1 --sup"
cd $1
echo '
{
description = "$1";
inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; };
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
erlang = pkgs.beam.packages.erlang_26.erlang;
elixir = pkgs.beam.packages.erlang_26.elixir;
in {
devShells.''${system}.default = pkgs.mkShell {
packages = [
pkgs.fswatch
erlang
elixir
pkgs.inotify-tools
pkgs.lexical
];
};
};
}
' > flake.nix
echo 'use flake' > .envrc
direnv allow
git init
''

8
scripts/nixclean.nix Normal file
View File

@@ -0,0 +1,8 @@
{ pkgs }:
pkgs.writeShellScriptBin "nixclean" ''
nix-collect-garbage -d
sudo -v
sudo nix-collect-garbage -d
rebuild
''

9
scripts/nixupdate.nix Normal file
View File

@@ -0,0 +1,9 @@
{ pkgs }:
pkgs.writeShellScriptBin "nixupdate" ''
cd /home/joe/.config/nix
nix flake update
sudo -v
sudo nixos-rebuild --flake .#$hostname boot
sudo reboot
''

7
scripts/rebuild-boot.nix Normal file
View File

@@ -0,0 +1,7 @@
{ pkgs }:
pkgs.writeShellScriptBin "rebuild-boot" ''
sudo -v
cd /home/joe/.config/nix
sudo nixos-rebuild --flake .#$hostname boot
''

7
scripts/rebuild-dry.nix Normal file
View File

@@ -0,0 +1,7 @@
{ pkgs }:
pkgs.writeShellScriptBin "rebuild-dry" ''
sudo -v
cd /home/joe/.config/nix
sudo nixos-rebuild --flake .#$hostname dry-build
''

7
scripts/rebuild.nix Normal file
View File

@@ -0,0 +1,7 @@
{ pkgs }:
pkgs.writeShellScriptBin "rebuild" ''
sudo -v
cd /home/joe/.config/nix
sudo nixos-rebuild --flake .#$hostname switch
''

7
scripts/sat-connect.nix Normal file
View File

@@ -0,0 +1,7 @@
{ pkgs }:
# nmcli dev wifi connect SIGMASat password `gpg -dq /home/joe/.wifi-password.gpg`
pkgs.writeShellScriptBin "sat-connect" ''
nmcli dev wifi list
nmcli dev wifi connect SIGMASat password itsallstars
''

5
scripts/tat.nix Normal file
View File

@@ -0,0 +1,5 @@
{ pkgs }:
pkgs.writeShellScriptBin "tat" ''
tmux new -A -s $(basename $(pwd))
''

13
sound.nix Normal file
View File

@@ -0,0 +1,13 @@
{
config,
lib,
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
pavucontrol
alsa-utils
pamixer
];
}

16
system.nix Normal file
View File

@@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
{
services = {
devmon.enable = true;
openssh.enable = true;
rpcbind.enable = true;
};
networking.networkmanager.enable = true;
}

169
terminal.nix Normal file
View File

@@ -0,0 +1,169 @@
{
config,
lib,
pkgs,
...
}:
{
environment.systemPackages = with pkgs; [
util-linux
rclone
neovim
fd
jq
btop
lshw
gnupg
git
git-lfs
ranger
nixfmt
aspell
aspellDicts.en
aspellDicts.en-computers
aspellDicts.en-science
fishPlugins.done
fishPlugins.fzf-fish
fishPlugins.forgit
killall
nodejs
libtool
grc
fzf
ispell
fishPlugins.grc
unzip
ripgrep
usbutils
sqlite
silver-searcher
bat
exfatprogs
eza
screen
libsecret
cmake
gnumake
gcc
lazygit
];
programs.git = {
package = pkgs.gitFull;
enable = true;
config = {
user = {
email = "joe@5sigma.io";
};
# credential.helper = "libsecret";
};
# aliases = {
# aa = "add --all";
# c = "commit";
# co = "checkout";
# st = "status";
# };
};
programs.dconf.enable = true;
programs.partition-manager.enable = true;
environment.variables = {
EDITOR = "nvim";
ERL_AFLAGS = "-kernel shell_history enabled";
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
users.users.joe.shell = pkgs.nushell;
home-manager.users.joe = {
programs = {
starship = {
enableNushellIntegration = true;
enableFishIntegration = true;
enableBashIntegration = true;
enable = true;
settings = {
add_newline = true;
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
};
};
zoxide = {
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
};
carapace = {
enable = true;
enableNushellIntegration = true;
};
direnv = {
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
enableBashIntegration = true;
};
nushell = {
enable = true;
# The config.nu can be anywhere you want if you like to edit your Nushell with Nu
configFile.source = ./dotfiles/config.nu;
# for editing directly to config.nu
extraConfig = ''
let carapace_completer = {|spans|
carapace $spans.0 nushell ...$spans | from json
}
$env.config = {
show_banner: false,
completions: {
case_sensitive: false #
quick: true
partial: true
algorithm: "fuzzy"
external: {
enable: true
max_results: 100
completer: $carapace_completer # check 'carapace_completer'
}
}
}
$env.PATH = ($env.PATH |
split row (char esep) |
prepend /home/myuser/.apps |
append /usr/bin/env
)
'';
shellAliases = {
cat = "bat --theme ansi";
};
};
};
};
programs = {
fish = {
enable = true;
shellAliases = {
ls = "eza";
cat = "bat --theme ansi";
};
};
};
# programs.bash = {
# interactiveShellInit = ''
# if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
# then
# shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
# exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
# fi
# '';
# };
}

24
user.nix Normal file
View File

@@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
inputs,
...
}:
{
users.users.joe = {
isNormalUser = true;
description = "Joe bellus";
extraGroups = [
"networkmanager"
"wheel"
"audio"
"docker"
"libvirtd"
"dialout"
"tty"
];
};
}