diff --git a/hosts/default/hardware.nix b/hosts/default/hardware.nix index 663d0fc..59ffcb9 100644 --- a/hosts/default/hardware.nix +++ b/hosts/default/hardware.nix @@ -4,7 +4,6 @@ { config, lib, - pkgs, modulesPath, ... }: { diff --git a/modules/core/user.nix b/modules/core/user.nix index 93d3771..9c1e158 100644 --- a/modules/core/user.nix +++ b/modules/core/user.nix @@ -28,7 +28,7 @@ in { home = { username = "${username}"; homeDirectory = "/home/${username}"; - stateVersion = "23.11"; + stateVersion = "25.11"; }; }; }; @@ -43,7 +43,7 @@ in { "lp" "networkmanager" "scanner" - "wheel" # subdo access + "wheel" # sudo access "vboxusers" # Virtual Box "gamemode" ]; diff --git a/modules/home/bash-aliases.nix b/modules/home/bash-aliases.nix deleted file mode 100644 index e6ab54f..0000000 --- a/modules/home/bash-aliases.nix +++ /dev/null @@ -1,130 +0,0 @@ -{ - host, - username, - ... -}: { - programs.bash = { - shellAliases = { - # GarandOS aliases - pullos = "git -C /home/${username}/garandos pull"; - upd = "nh os switch --hostname ${host}"; - upg = "nh os switch --hostname ${host} --update"; - upf = "sudo nix flake update"; - upd-bt = "nh os boot --hostname ${host}"; - upd-ts = "nh os test --hostname ${host}"; - upd-bd = "nh os build --hostname ${host}"; - ncg = "nh clean all"; - - # Development aliases - srvenv = "source .venv/bin/activate"; - "..srvenv" = "source ../.venv/bin/activate"; - pm = "uv run manage.py"; - f8 = "uv run flake8 ."; - bbr = "bun --bun run"; - mkgidf = "git add . --intent-to-add . && git diff > git-diff.txt"; - zed = "MANGOHUD=0 /home/${username}/.local/bin/zed"; - - # Development aliases for nix flake - nd = "nix develop"; - nb = "nix build"; - nr = "nix run"; - nbr = "nix build && nix run"; - nbd = "nix build .#develop"; - nrd = "nix run .#develop"; - nbrd = "nix build .#develop && nix run .#develop"; - - # System aliases - # flush-codium = "sudo killall codium && sudo rm -rf ~/.config/VSCodium/Cache && sudo rm -rf ~/.config/VSCodium/CachedData"; - kys = "shutdown now"; - ookla = "speedtest"; - hypr-cli = "hyprctl clients"; - - # Navigation aliases - "~" = "cd ~"; - ".." = "cd .."; - "..." = "cd ../.."; - "...." = "cd ../../.."; - "....." = "cd ../../../.."; - - # Modifies commands - cat = "bat"; - cp = "cp -i"; - mv = "mv -i"; - rm = "trash -v"; - mkdir = "mkdir -p"; - ps = "ps auxf"; - ping = "ping -c 10"; - less = "less -R"; - cls = "clear"; - multitail = "multitail --no-repeat -c"; - freshclam = "sudo freshclam"; - - # Alias"s for multiple directory listing commands - la = "eza -alh --icons"; # show hidden files - ls = "eza -aF --icons --color=always"; # add colors and file type extensions - lx = "eza -lh --icons --sort=extension"; # sort by extension - lk = "eza -lh --icons --sort=size --reverse"; # sort by size - lc = "eza -lh --icons --sort=changed"; # sort by change time - lu = "eza -lh --icons --sort=accessed"; # sort by access time - lr = "eza -lh --icons --recurse"; # recursive ls - lt = "eza -lh --icons --sort=modified"; # sort by date - lm = "eza -alh --icons | more"; # pipe through "more" - lw = "eza -xh --icons"; # wide listing format - ll = "eza -lh --icons"; # long listing format - labc = "eza -lah --icons --sort=name"; # alphabetical sort - lf = "eza -lh --icons | grep -v '^d'"; # files only (przybliżenie) - ldir = "eza -lh --icons --only-dirs"; # directories only - lla = "eza -alh --icons"; # List and Hidden Files - las = "eza -a --icons"; # Hidden Files - lls = "eza -lh --icons"; # List - - # chmod commands - mx = "chmod a+x"; - "000" = "chmod -R 000"; - "644" = "chmod -R 644"; - "666" = "chmod -R 666"; - "755" = "chmod -R 755"; - "777" = "chmod -R 777"; - - # Search command line history - h = "history | grep "; - - # Search running processes - p = "ps aux | grep "; - topcpu = "/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10"; - - # Search files in the current folder - f = "find . | grep "; - - # Count all files (recursively) in the current folder - countfiles = "for t in files links directories; do echo \`find . -type \${t:0:1} | wc -l\` \$t; done 2> /dev/null"; - - # Alias"s to show disk space and space used in a folder - diskspace = "du -S | sort -n -r |more"; - folders = "du -h --max-depth=1"; - folderssort = "find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn"; - tree = "tree -CAhF --dirsfirst"; - treed = "tree -CAFd"; - mountedinfo = "df -hT"; - - # Show all logs in /var/log - logs = "sudo find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f"; - - # fix kitty ssh connection - kssh = "kitty +kitten ssh"; - - docker-clean = "docker container prune -f ; docker image prune -f ; docker network prune -f ; docker volume prune -f"; - - # Remove a directory and all files - rmd = "/bin/rm --recursive --force --verbose "; - - # Fun aliases - pasjans = "ttysolitaire -p 10 --no-background-color"; - fc = "fortune | cowsay"; - - # Network aliases - kssh-server = "kssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver"; - ssh-server = "ssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver"; - }; - }; -} diff --git a/modules/home/bash-functions.nix b/modules/home/bash-functions.nix deleted file mode 100644 index 94187d9..0000000 --- a/modules/home/bash-functions.nix +++ /dev/null @@ -1,146 +0,0 @@ -_: { - programs.bash = { - bashrcExtra = '' - # Quick directory creation and navigation - mkcd() { - mkdir -p "$1" && cd "$1" - } - - # Extract various archive formats - extract() { - for archive in "$@"; do - if [ -f "$archive" ]; then - case "$archive" in - *.tar.bz2) tar xvjf "$archive" ;; - *.tar.gz) tar xvzf "$archive" ;; - *.bz2) bunzip2 "$archive" ;; - *.rar) unrar x "$archive" ;; - *.gz) gunzip "$archive" ;; - *.tar) tar xvf "$archive" ;; - *.tbz2) tar xvjf "$archive" ;; - *.tgz) tar xvzf "$archive" ;; - *.zip) unzip "$archive" ;; - *.Z) uncompress "$archive" ;; - *.7z) 7z x "$archive" ;; - *) echo "don't know how to extract '$archive'..." ;; - esac - else - echo "'$archive' is not a valid file!" - fi - done - } - - # Find files quickly - ff() { - find . -name "*$1*" -type f - } - - # Find directories quickly - fd() { - find . -name "*$1*" -type d - } - - # IP address lookup - alias whatismyip="whatsmyip" - function whatsmyip () { - # Internal IP Lookup. - if command -v ip &> /dev/null; then - echo -n "Internal IP: " - ip addr show wlan0 | grep "inet " | awk '{print $2}' | cut -d/ -f1 - else - echo -n "Internal IP: " - ifconfig wlan0 | grep "inet " | awk '{print $2}' - fi - - # External IP Lookup - echo -n "External IP: " - curl -4 ifconfig.me - } - - # Searches for text in all files in the current folder - ftext() { - # -i case-insensitive - # -I ignore binary files - # -H causes filename to be printed - # -r recursive search - # -n causes line number to be printed - # optional: -F treat search term as a literal, not a regular expression - # optional: -l only print filenames and not the matching lines ex. grep -irl "$1" * - grep -iIHrn --color=always "$1" . | less -r - } - - # Copy file with a progress bar - cpp() { - set -e - strace -q -ewrite cp -- "$1" "$2" 2>&1 | - awk '{ - count += $NF - if (count % 10 == 0) { - percent = count / total_size * 100 - printf "%3d%% [", percent - for (i=0;i<=percent;i++) - printf "=" - printf ">" - for (i=percent;i<100;i++) - printf " " - printf "]\r" - } - } - END { print "" }' total_size="$(stat -c '%s' "$1")" count=0 - } - - # Copy and go to the directory - cpg() { - if [ -d "$2" ]; then - cp "$1" "$2" && cd "$2" - else - cp "$1" "$2" - fi - } - - # Move and go to the directory - mvg() { - if [ -d "$2" ]; then - mv "$1" "$2" && cd "$2" - else - mv "$1" "$2" - fi - } - - # Create and go to the directory - mkdirg() { - mkdir -p "$1" - cd "$1" - } - - # Goes up a specified number of directories (i.e. up 4) - up() { - local d="" - limit=$1 - for ((i = 1; i <= limit; i++)); do - d=$d/.. - done - d=$(echo $d | sed 's/^\///') - if [ -z "$d" ]; then - d=.. - fi - cd $d - } - - # Automatically do an ls after each cd, z, or zoxide - cd () - { - if [ -n "$1" ]; then - builtin cd "$@" && ls - else - builtin cd ~ && ls - fi - } - - # Returns the last 2 fields of the working directory - pwdtail() { - pwd | awk -F/ '{nlast = NF -1;print $nlast"/"$NF}' - } - ''; - }; -} diff --git a/modules/home/bash/aliases.nix b/modules/home/bash/aliases.nix new file mode 100644 index 0000000..d4f2eb6 --- /dev/null +++ b/modules/home/bash/aliases.nix @@ -0,0 +1,128 @@ +{ + username, + host, + ... +}: { + programs.bash.shellAliases = { + # GarandOS aliases + pullos = "git -C /home/${username}/garandos pull"; + upd = "nh os switch --hostname ${host}"; + upg = "nh os switch --hostname ${host} --update"; + upf = "sudo nix flake update"; + upd-bt = "nh os boot --hostname ${host}"; + upd-ts = "nh os test --hostname ${host}"; + upd-bd = "nh os build --hostname ${host}"; + ncg = "nh clean all"; + + # Development aliases + srvenv = "source .venv/bin/activate"; + "..srvenv" = "source ../.venv/bin/activate"; + pm = "uv run manage.py"; + f8 = "uv run flake8 ."; + bbr = "bun --bun run"; + mkgidf = "git add . --intent-to-add . && git diff > git-diff.txt"; + zed = "MANGOHUD=0 /home/${username}/.local/bin/zed"; + + # Development aliases for nix flake + nd = "nix develop"; + nb = "nix build"; + nr = "nix run"; + nbr = "nix build && nix run"; + nbd = "nix build .#develop"; + nrd = "nix run .#develop"; + nbrd = "nix build .#develop && nix run .#develop"; + + # System aliases + # flush-codium = "sudo killall codium && sudo rm -rf ~/.config/VSCodium/Cache && sudo rm -rf ~/.config/VSCodium/CachedData"; + kys = "shutdown now"; + ookla = "speedtest"; + hypr-cli = "hyprctl clients"; + + # Navigation aliases + "~" = "cd ~"; + ".." = "cd .."; + "..." = "cd ../.."; + "...." = "cd ../../.."; + "....." = "cd ../../../.."; + + # Modifies commands + cat = "bat"; + cp = "cp -i"; + mv = "mv -i"; + rm = "trash -v"; + mkdir = "mkdir -p"; + ps = "ps auxf"; + ping = "ping -c 10"; + less = "less -R"; + cls = "clear"; + multitail = "multitail --no-repeat -c"; + freshclam = "sudo freshclam"; + + # Alias"s for multiple directory listing commands + la = "eza -alh --icons"; # show hidden files + ls = "eza -aF --icons --color=always"; # add colors and file type extensions + lx = "eza -lh --icons --sort=extension"; # sort by extension + lk = "eza -lh --icons --sort=size --reverse"; # sort by size + lc = "eza -lh --icons --sort=changed"; # sort by change time + lu = "eza -lh --icons --sort=accessed"; # sort by access time + lr = "eza -lh --icons --recurse"; # recursive ls + lt = "eza -lh --icons --sort=modified"; # sort by date + lm = "eza -alh --icons | more"; # pipe through "more" + lw = "eza -xh --icons"; # wide listing format + ll = "eza -lh --icons"; # long listing format + labc = "eza -lah --icons --sort=name"; # alphabetical sort + lf = "eza -lh --icons | grep -v '^d'"; # files only (przybliżenie) + ldir = "eza -lh --icons --only-dirs"; # directories only + lla = "eza -alh --icons"; # List and Hidden Files + las = "eza -a --icons"; # Hidden Files + lls = "eza -lh --icons"; # List + + # chmod commands + mx = "chmod a+x"; + "000" = "chmod -R 000"; + "644" = "chmod -R 644"; + "666" = "chmod -R 666"; + "755" = "chmod -R 755"; + "777" = "chmod -R 777"; + + # Search command line history + h = "history | grep "; + + # Search running processes + p = "ps aux | grep "; + topcpu = "/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10"; + + # Search files in the current folder + f = "find . | grep "; + + # Count all files (recursively) in the current folder + countfiles = "for t in files links directories; do echo \`find . -type \${t:0:1} | wc -l\` \$t; done 2> /dev/null"; + + # Alias"s to show disk space and space used in a folder + diskspace = "du -S | sort -n -r |more"; + folders = "du -h --max-depth=1"; + folderssort = "find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn"; + tree = "tree -CAhF --dirsfirst"; + treed = "tree -CAFd"; + mountedinfo = "df -hT"; + + # Show all logs in /var/log + logs = "sudo find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f"; + + # fix kitty ssh connection + kssh = "kitty +kitten ssh"; + + docker-clean = "docker container prune -f ; docker image prune -f ; docker network prune -f ; docker volume prune -f"; + + # Remove a directory and all files + rmd = "/bin/rm --recursive --force --verbose "; + + # Fun aliases + pasjans = "ttysolitaire -p 10 --no-background-color"; + fc = "fortune | cowsay"; + + # Network aliases + kssh-server = "kssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver"; + ssh-server = "ssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver"; + }; +} diff --git a/modules/home/bash.nix b/modules/home/bash/default.nix similarity index 69% rename from modules/home/bash.nix rename to modules/home/bash/default.nix index 40d70d6..3a14c5f 100644 --- a/modules/home/bash.nix +++ b/modules/home/bash/default.nix @@ -6,4 +6,8 @@ _: { # fastfetch # ''; }; + imports = [ + ./aliases.nix + ./functions.nix + ]; } diff --git a/modules/home/bash/functions.nix b/modules/home/bash/functions.nix new file mode 100644 index 0000000..ed520f4 --- /dev/null +++ b/modules/home/bash/functions.nix @@ -0,0 +1,144 @@ +_: { + programs.bash.bashrcExtra = '' + # Quick directory creation and navigation + mkcd() { + mkdir -p "$1" && cd "$1" + } + + # Extract various archive formats + extract() { + for archive in "$@"; do + if [ -f "$archive" ]; then + case "$archive" in + *.tar.bz2) tar xvjf "$archive" ;; + *.tar.gz) tar xvzf "$archive" ;; + *.bz2) bunzip2 "$archive" ;; + *.rar) unrar x "$archive" ;; + *.gz) gunzip "$archive" ;; + *.tar) tar xvf "$archive" ;; + *.tbz2) tar xvjf "$archive" ;; + *.tgz) tar xvzf "$archive" ;; + *.zip) unzip "$archive" ;; + *.Z) uncompress "$archive" ;; + *.7z) 7z x "$archive" ;; + *) echo "don't know how to extract '$archive'..." ;; + esac + else + echo "'$archive' is not a valid file!" + fi + done + } + + # Find files quickly + ff() { + find . -name "*$1*" -type f + } + + # Find directories quickly + fd() { + find . -name "*$1*" -type d + } + + # IP address lookup + alias whatismyip="whatsmyip" + function whatsmyip () { + # Internal IP Lookup. + if command -v ip &> /dev/null; then + echo -n "Internal IP: " + ip addr show wlan0 | grep "inet " | awk '{print $2}' | cut -d/ -f1 + else + echo -n "Internal IP: " + ifconfig wlan0 | grep "inet " | awk '{print $2}' + fi + + # External IP Lookup + echo -n "External IP: " + curl -4 ifconfig.me + } + + # Searches for text in all files in the current folder + ftext() { + # -i case-insensitive + # -I ignore binary files + # -H causes filename to be printed + # -r recursive search + # -n causes line number to be printed + # optional: -F treat search term as a literal, not a regular expression + # optional: -l only print filenames and not the matching lines ex. grep -irl "$1" * + grep -iIHrn --color=always "$1" . | less -r + } + + # Copy file with a progress bar + cpp() { + set -e + strace -q -ewrite cp -- "$1" "$2" 2>&1 | + awk '{ + count += $NF + if (count % 10 == 0) { + percent = count / total_size * 100 + printf "%3d%% [", percent + for (i=0;i<=percent;i++) + printf "=" + printf ">" + for (i=percent;i<100;i++) + printf " " + printf "]\r" + } + } + END { print "" }' total_size="$(stat -c '%s' "$1")" count=0 + } + + # Copy and go to the directory + cpg() { + if [ -d "$2" ]; then + cp "$1" "$2" && cd "$2" + else + cp "$1" "$2" + fi + } + + # Move and go to the directory + mvg() { + if [ -d "$2" ]; then + mv "$1" "$2" && cd "$2" + else + mv "$1" "$2" + fi + } + + # Create and go to the directory + mkdirg() { + mkdir -p "$1" + cd "$1" + } + + # Goes up a specified number of directories (i.e. up 4) + up() { + local d="" + limit=$1 + for ((i = 1; i <= limit; i++)); do + d=$d/.. + done + d=$(echo $d | sed 's/^\///') + if [ -z "$d" ]; then + d=.. + fi + cd $d + } + + # Automatically do an ls after each cd, z, or zoxide + cd () + { + if [ -n "$1" ]; then + builtin cd "$@" && ls + else + builtin cd ~ && ls + fi + } + + # Returns the last 2 fields of the working directory + pwdtail() { + pwd | awk -F/ '{nlast = NF -1;print $nlast"/"$NF}' + } + ''; +} diff --git a/modules/home/bat.nix b/modules/home/bat.nix index 1cff829..257d744 100644 --- a/modules/home/bat.nix +++ b/modules/home/bat.nix @@ -7,11 +7,7 @@ enable = true; config = { pager = "less -FR"; - # other styles available and cane be combined - # style = "numbers,changes,headers,rule,grid"; style = "full"; - # Bat has other thems as well - # Dracula,ansi,Catppuccin,base16,base16-256,GitHub,Nord,etc theme = lib.mkForce "base16"; }; extraPackages = with pkgs.bat-extras; [ diff --git a/modules/home/cava.nix b/modules/home/cava.nix index 0791754..1feaadf 100644 --- a/modules/home/cava.nix +++ b/modules/home/cava.nix @@ -5,38 +5,7 @@ _: { general = { bar_spacing = 1; bar_width = 2; - frame_rate = 60; - }; - color = { - #gradient = 1; - #gradient_color_1 = "'#011f30'"; - #gradient_color_2 = "'#09465b'"; - #gradient_color_3 = "'#045a93'"; - #gradient_color_4 = "'#00aa00'"; - #gradient_color_5 = "'#ffff00'"; - #gradient_color_6 = "'#cc8033'"; - #gradient_color_7 = "'#aa0000'"; - #gradient_color_8 = "'#ff00ff'"; - # Old config - #gradient = 1; - #gradient_color_1 = "'#8bd5ca'"; - #gradient_color_2 = "'#91d7e3'"; - #gradient_color_3 = "'#7dc4e4'"; - #gradient_color_4 = "'#8aadf4'"; - #gradient_color_5 = "'#c6a0f6'"; - #gradient_color_6 = "'#f5bde6'"; - #gradient_color_7 = "'#ee99a0'"; - #gradient_color_8 = "'#ed8796'"; - # Dracula - gradient = 1; - gradient_color_1 = "'#8BE9FD'"; - gradient_color_2 = "'#9AEDFE'"; - gradient_color_3 = "'#CAA9FA'"; - gradient_color_4 = "'#BD93F9'"; - gradient_color_5 = "'#FF92D0'"; - gradient_color_6 = "'#FF79C6'"; - gradient_color_7 = "'#FF6E67'"; - gradient_color_8 = "'#FF5555'"; + frame_rate = 144; }; }; }; diff --git a/modules/home/chromium.nix b/modules/home/chromium.nix deleted file mode 100644 index 4cf465c..0000000 --- a/modules/home/chromium.nix +++ /dev/null @@ -1,34 +0,0 @@ -{pkgs, ...}: { - programs.chromium = { - enable = true; - package = pkgs.ungoogled-chromium; - # commandLineArgs = [ ]; - dictionaries = with pkgs; [ - hunspellDictsChromium.en_US - # hunspellDictsChromium.pl_PL Jeśli się taka pojawi - ]; - extensions = [ - { - id = "ocaahdebbfolfmndjeplogmgcagdmblk"; # Chromium Web Store - } - { - id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; # Dark Reader - } - { - id = "fnaicdffflnofjppbagibeoednhnbjhg"; # floccus bookmarks sync - } - { - id = "amknoiejhlmhancpahfcfcfhllgkpbld"; # Hoppscotch Browser Extension - } - { - id = "nngceckbapebfimnlniiiahkandclblb"; # Menedżer haseł Bitwarden - } - { - id = "fdaphilojaklgkoocegabckfanjoacjg"; # mtab - } - { - id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; # uBlock Origin - } - ]; - }; -} diff --git a/modules/home/chromium/default.nix b/modules/home/chromium/default.nix new file mode 100644 index 0000000..8b24eec --- /dev/null +++ b/modules/home/chromium/default.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + programs.chromium = { + enable = true; + package = pkgs.ungoogled-chromium; + # commandLineArgs = [ ]; + dictionaries = with pkgs; [ + hunspellDictsChromium.en_US + # hunspellDictsChromium.pl_PL Jeśli się taka pojawi + ]; + }; + + imports = [ + ./extensions.nix + ]; +} diff --git a/modules/home/chromium/extensions.nix b/modules/home/chromium/extensions.nix new file mode 100644 index 0000000..cb9d2d8 --- /dev/null +++ b/modules/home/chromium/extensions.nix @@ -0,0 +1,25 @@ +_: { + programs.chromium.extensions = [ + { + id = "ocaahdebbfolfmndjeplogmgcagdmblk"; # Chromium Web Store + } + { + id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; # Dark Reader + } + { + id = "fnaicdffflnofjppbagibeoednhnbjhg"; # floccus bookmarks sync + } + { + id = "amknoiejhlmhancpahfcfcfhllgkpbld"; # Hoppscotch Browser Extension + } + { + id = "nngceckbapebfimnlniiiahkandclblb"; # Menedżer haseł Bitwarden + } + { + id = "fdaphilojaklgkoocegabckfanjoacjg"; # mtab + } + { + id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; # uBlock Origin + } + ]; +} diff --git a/modules/home/default.nix b/modules/home/default.nix index 6bbaa09..3d3483f 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -2,28 +2,30 @@ inherit (import ../../hosts/${host}/variables.nix) waybarChoice; in { imports = [ + ./bash + ./chromium ./fastfetch ./hyprland + ./kitty + ./librewolf ./rofi ./scripts + ./swaync + ./vscodium waybarChoice ./wlogout + ./xdg + ./zed ./anki.nix - ./bash.nix - ./bash-aliases.nix - ./bash-functions.nix ./bat.nix ./btop.nix ./cava.nix - ./chromium.nix ./emoji.nix ./eza.nix ./fzf.nix ./git.nix ./gtk.nix ./kdeConnect.nix - ./kitty.nix - ./librewolf.nix ./lutris.nix ./nextcloud.nix ./obs-studio.nix @@ -33,13 +35,9 @@ in { ./starship.nix ./stylix.nix ./swappy.nix - ./swaync.nix ./tealdeer.nix ./vesktop.nix ./virtmanager.nix - ./xdg.nix ./zoxide.nix - ./vscode.nix - ./zed.nix ]; } diff --git a/modules/home/kitty.nix b/modules/home/kitty.nix deleted file mode 100644 index e34c3a4..0000000 --- a/modules/home/kitty.nix +++ /dev/null @@ -1,75 +0,0 @@ -{pkgs, ...}: { - programs.kitty = { - enable = true; - package = pkgs.kitty; - settings = { - font_size = 12; - wheel_scroll_min_lines = 1; - window_padding_width = 4; - confirm_os_window_close = 0; - scrollback_lines = 10000; - enable_audio_bell = false; - mouse_hide_wait = 60; - cursor_trail = 1; - tab_fade = 1; - active_tab_font_style = "bold"; - inactive_tab_font_style = "bold"; - tab_bar_edge = "top"; - tab_bar_margin_width = 0; - tab_bar_style = "powerline"; - #tab_bar_style = "fade"; - enabled_layouts = "splits"; - }; - extraConfig = '' - - # Clipboard - map ctrl+shift+v paste_from_selection - map shift+insert paste_from_selection - - # Scrolling - map ctrl+shift+up scroll_line_up - map ctrl+shift+down scroll_line_down - map ctrl+shift+k scroll_line_up - map ctrl+shift+j scroll_line_down - map ctrl+shift+page_up scroll_page_up - map ctrl+shift+page_down scroll_page_down - map ctrl+shift+home scroll_home - map ctrl+shift+end scroll_end - map ctrl+shift+h show_scrollback - - # Window management - map alt+n new_window_with_cwd #open in current dir - #map alt+n new_os_window #opens term in $HOME - map alt+w close_window - map ctrl+shift+enter launch --location=hsplit - map ctrl+shift+s launch --location=vsplit - map ctrl+shift+] next_window - map ctrl+shift+[ previous_window - map ctrl+shift+f move_window_forward - map ctrl+shift+b move_window_backward - map ctrl+shift+` move_window_to_top - map ctrl+shift+1 first_window - map ctrl+shift+2 second_window - map ctrl+shift+3 third_window - map ctrl+shift+4 fourth_window - map ctrl+shift+5 fifth_window - map ctrl+shift+6 sixth_window - map ctrl+shift+7 seventh_window - map ctrl+shift+8 eighth_window - map ctrl+shift+9 ninth_window # Tab management - map ctrl+shift+0 tenth_window - map ctrl+shift+right next_tab - map ctrl+shift+left previous_tab - map ctrl+shift+t new_tab - map ctrl+shift+q close_tab - map ctrl+shift+l next_layout - map ctrl+shift+. move_tab_forward - map ctrl+shift+, move_tab_backward - - # Miscellaneous - map ctrl+shift+up increase_font_size - map ctrl+shift+down decrease_font_size - map ctrl+shift+backspace restore_font_size - ''; - }; -} diff --git a/modules/home/kitty/default.nix b/modules/home/kitty/default.nix new file mode 100644 index 0000000..7fa7cc0 --- /dev/null +++ b/modules/home/kitty/default.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + programs.kitty = { + enable = true; + package = pkgs.kitty; + }; + + imports = [ + ./extra-config.nix + ./settings.nix + ]; +} diff --git a/modules/home/kitty/extra-config.nix b/modules/home/kitty/extra-config.nix new file mode 100644 index 0000000..ffd32ba --- /dev/null +++ b/modules/home/kitty/extra-config.nix @@ -0,0 +1,52 @@ +_: { + programs.kitty.extraConfig = '' + # Clipboard + map ctrl+shift+v paste_from_selection + map shift+insert paste_from_selection + + # Scrolling + map ctrl+shift+up scroll_line_up + map ctrl+shift+down scroll_line_down + map ctrl+shift+k scroll_line_up + map ctrl+shift+j scroll_line_down + map ctrl+shift+page_up scroll_page_up + map ctrl+shift+page_down scroll_page_down + map ctrl+shift+home scroll_home + map ctrl+shift+end scroll_end + map ctrl+shift+h show_scrollback + + # Window management + map alt+n new_window_with_cwd #open in current dir + #map alt+n new_os_window #opens term in $HOME + map alt+w close_window + map ctrl+shift+enter launch --location=hsplit + map ctrl+shift+s launch --location=vsplit + map ctrl+shift+] next_window + map ctrl+shift+[ previous_window + map ctrl+shift+f move_window_forward + map ctrl+shift+b move_window_backward + map ctrl+shift+` move_window_to_top + map ctrl+shift+1 first_window + map ctrl+shift+2 second_window + map ctrl+shift+3 third_window + map ctrl+shift+4 fourth_window + map ctrl+shift+5 fifth_window + map ctrl+shift+6 sixth_window + map ctrl+shift+7 seventh_window + map ctrl+shift+8 eighth_window + map ctrl+shift+9 ninth_window # Tab management + map ctrl+shift+0 tenth_window + map ctrl+shift+right next_tab + map ctrl+shift+left previous_tab + map ctrl+shift+t new_tab + map ctrl+shift+q close_tab + map ctrl+shift+l next_layout + map ctrl+shift+. move_tab_forward + map ctrl+shift+, move_tab_backward + + # Miscellaneous + map ctrl+shift+up increase_font_size + map ctrl+shift+down decrease_font_size + map ctrl+shift+backspace restore_font_size + ''; +} diff --git a/modules/home/kitty/settings.nix b/modules/home/kitty/settings.nix new file mode 100644 index 0000000..5586d33 --- /dev/null +++ b/modules/home/kitty/settings.nix @@ -0,0 +1,20 @@ +_: { + programs.kitty.settings = { + font_size = 12; + wheel_scroll_min_lines = 1; + window_padding_width = 4; + confirm_os_window_close = 0; + scrollback_lines = 10000; + enable_audio_bell = false; + mouse_hide_wait = 60; + cursor_trail = 1; + tab_fade = 1; + active_tab_font_style = "bold"; + inactive_tab_font_style = "bold"; + tab_bar_edge = "top"; + tab_bar_margin_width = 0; + tab_bar_style = "powerline"; + #tab_bar_style = "fade"; + enabled_layouts = "splits"; + }; +} diff --git a/modules/home/librewolf.nix b/modules/home/librewolf.nix deleted file mode 100644 index 3b2ec58..0000000 --- a/modules/home/librewolf.nix +++ /dev/null @@ -1,308 +0,0 @@ -{ - pkgs, - lib, - inputs, - system, - host, - ... -}: { - programs = { - librewolf = { - enable = true; - package = pkgs.librewolf; - # nativeMessagingHosts = [pkgs.firefoxpwa]; - languagePacks = [ - "pl" - "en-US" - ]; - profiles = { - "${host}" = { - id = 0; - isDefault = true; - name = "${host}"; - settings = lib.mkDefault { - # Preferences (about:config) - "general.useragent.locale" = "pl"; - "intl.locale.requested" = "pl,en-US"; - "intl.accept_languages" = "pl,en-US"; - - "extensions.autoDisableScopes" = 0; - - "font.default.x-western" = "FiraCode Nerd Font"; - "font.name.monospace.x-western" = "FiraCode Nerd Font Mono"; - "font.name.sans-serif.x-western" = "FiraCode Nerd Font Propo"; - "font.name.serif.x-western" = "FiraCode Nerd Font"; - - "layout.css.prefers-color-scheme.content-override" = 0; - "layout.css.font-visibility" = 1; - - "browser.tabs.insertRelatedAfterCurrent" = true; - "browser.sessionstore.resume_from_crash" = true; - "browser.sessionstore.resume_session_once" = true; - "browser.toolbars.bookmarks.visibility" = "never"; - - "sidebar.main.tools" = "history,bookmarks"; - "sidebar.revamp" = true; - "sidebar.verticalTabs" = true; - - "browser.eme.ui.enabled" = true; - "media.eme.enabled" = true; - - "privacy.donottrackheader.enabled" = true; - "privacy.clearOnShutdown.history" = true; - - "network.trr.mode" = 3; - "network.trr.uri" = "https://dns.mullvad.net/dns-query"; - }; - search = { - default = "garand's-search"; - privateDefault = "garand's-search"; - force = true; - engines = { - "garand's-search" = { - definedAliases = ["@g"]; - urls = [{template = "https://search.garandplg.com/search?q={searchTerms}";}]; - suggestUrl = "https://search.garandplg.com/autocompleter?q={searchTerms}"; - }; - "youtube" = { - definedAliases = ["@yt"]; - urls = [ - { - template = "https://www.youtube.com/results"; - params = [ - { - name = "search_query"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "wikipedia-pl" = { - definedAliases = ["@w"]; - urls = [ - { - template = "https://pl.wikipedia.org/w/index.php"; - params = [ - { - name = "search"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "stackoverflow" = { - definedAliases = ["@so"]; - urls = [ - { - template = "https://stackoverflow.com/search"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "nix-packages" = { - definedAliases = ["@np"]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - urls = [ - { - template = "https://search.nixos.org/packages?channel=unstable"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "nix-options" = { - definedAliases = ["@no"]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - urls = [ - { - template = "https://search.nixos.org/options"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "nix-wiki" = { - definedAliases = ["@nw"]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - urls = [ - { - template = "https://wiki.nixos.org/w/index.php"; - params = [ - { - name = "search"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "home-manager-option" = { - definedAliases = ["@hmo"]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - urls = [ - { - template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master"; - } - ]; - }; - "eneba" = { - definedAliases = ["@en"]; - icon = "https://static.eneba.games/branding/v2/logoFull.svg"; - urls = [ - { - template = "https://www.eneba.com/pl/store/all"; - params = [ - { - name = "text"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "kinguin" = { - definedAliases = ["@ki"]; - icon = "https://static.kinguin.net/media/images/other/kinguin-mobile-logo.svg"; - urls = [ - { - template = "https://www.kinguin.net/listing?active=1&hideUnavailable=0&type=kinguin"; - params = [ - { - name = "phrase"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "instant-gaming" = { - definedAliases = ["@ig"]; - icon = "https://asset.brandfetch.io/idCbLj4uOg/idGS61T0FV.jpeg"; - urls = [ - { - template = "https://www.instant-gaming.com/pl/search/"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "morele" = { - definedAliases = ["@mo"]; - icon = "https://www.morele.net/static/img/shop/logo/image-logo-morele.svg"; - urls = [ - { - template = "https://www.morele.net/wyszukiwarka/"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "x-kom" = { - definedAliases = ["@xk"]; - icon = "https://assets.x-kom.pl/public-spa/xkom/75062cb4b48a8510.svg"; - urls = [ - { - template = "https://www.x-kom.pl/szukaj"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "komputronik" = { - definedAliases = ["@kp"]; - icon = "https://front.komputronik.pl/front-static/komputronik.Ceqagame-a.svg"; - urls = [ - { - template = "https://www.komputronik.pl/search/category/1"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "allegro" = { - definedAliases = ["@al"]; - icon = ""; - urls = [ - { - template = "https://allegro.pl/listing"; - params = [ - { - name = "string"; - value = "{searchTerms}"; - } - ]; - } - ]; - }; - "google".metaData.hidden = true; - "bing".metaData.hidden = true; - "wikipedia".metaData.hidden = true; - }; - }; - extensions = { - # about:debugging#/runtime/this-firefox Przydatne do wyszukiwania ID rozszerzenia - # force = true; - packages = with inputs.firefox-addons.packages.${system}; [ - bitwarden - floccus - ublock-origin - sponsorblock - darkreader - # flagfox - hoppscotch - return-youtube-dislikes - sponsorblock - # pwas-for-firefox - mtab - # MTAB_SAVE_FORMAT_JTIyJTdCJTVDJTIyb3B0aW9ucyU1QyUyMiUzQSU3QiU1QyUyMnNob3dPcHRpb25zQnV0dG9uJTVDJTIyJTNBdHJ1ZSU3RCUyQyU1QyUyMnVzZXIlNUMlMjIlM0ElN0IlNUMlMjJuYW1lJTVDJTIyJTNBJTVDJTIyR2FyYW5kX1BMRyU1QyUyMiU3RCUyQyU1QyUyMnRpdGxlJTVDJTIyJTNBJTdCJTVDJTIyZGVmYXVsdFRpdGxlJTVDJTIyJTNBJTVDJTIyTm93YSUyMHphayVDNSU4MmFka2ElNUMlMjIlMkMlNUMlMjJkeW5hbWljJTVDJTIyJTNBJTdCJTVDJTIyZW5hYmxlZCU1QyUyMiUzQXRydWUlN0QlMkMlNUMlMjJmYXZpY29uVHlwZSU1QyUyMiUzQSU1QyUyMmN1c3RvbSU1QyUyMiU3RCUyQyU1QyUyMm1lc3NhZ2UlNUMlMjIlM0ElN0IlNUMlMjJlbmFibGVkJTVDJTIyJTNBZmFsc2UlMkMlNUMlMjJmb250JTVDJTIyJTNBJTdCJTVDJTIydHlwZSU1QyUyMiUzQSU1QyUyMmRlZmF1bHQlNUMlMjIlMkMlNUMlMjJjdXN0b20lNUMlMjIlM0ElNUMlMjIlNUMlMjIlN0QlMkMlNUMlMjJ0ZXh0Q29sb3IlNUMlMjIlM0ElNUMlMjIlMjNmZmZmZmYlNUMlMjIlMkMlNUMlMjJ0ZXh0U2l6ZSU1QyUyMiUzQTMuNzUlMkMlNUMlMjJ0eXBlJTVDJTIyJTNBJTVDJTIydGltZS0yNCU1QyUyMiUyQyU1QyUyMmN1c3RvbVRleHQlNUMlMjIlM0ElNUMlMjJ5b3VyJTIwY3VzdG9tJTIwdGV4dCU1QyUyMiUyQyU1QyUyMndlYXRoZXIlNUMlMjIlM0ElN0IlNUMlMjJ1bml0c1R5cGUlNUMlMjIlM0ElNUMlMjJmJTVDJTIyJTdEJTdEJTJDJTVDJTIyd2FsbHBhcGVyJTVDJTIyJTNBJTdCJTVDJTIydHlwZSU1QyUyMiUzQSU1QyUyMmZpbGVVcGxvYWQlNUMlMjIlMkMlNUMlMjJlbmFibGVkJTVDJTIyJTNBdHJ1ZSUyQyU1QyUyMnVybCU1QyUyMiUzQSU1QyUyMi4lMkZ3YWxscGFwZXJzJTJGYmctMS5wbmclNUMlMjIlMkMlNUMlMjJyZXNpemUlNUMlMjIlM0ElN0IlNUMlMjJ3JTVDJTIyJTNBMTkyMCUyQyU1QyUyMmglNUMlMjIlM0ExMDgwJTdEJTdEJTJDJTVDJTIydWklNUMlMjIlM0ElN0IlNUMlMjJzdHlsZSU1QyUyMiUzQSU1QyUyMmdsYXNzJTVDJTIyJTJDJTVDJTIyZ2xhc3NDb2xvciU1QyUyMiUzQSU1QyUyMiUyM2ZmZmZmZjIwJTVDJTIyJTJDJTVDJTIyYmx1clN0cmVuZ3RoJTVDJTIyJTNBJTVDJTIyMzJweCU1QyUyMiUyQyU1QyUyMmZvcmVncm91bmRDb2xvciU1QyUyMiUzQSU1QyUyMiUyMzI2MjYyNiU1QyUyMiUyQyU1QyUyMmJhY2tncm91bmRDb2xvciU1QyUyMiUzQSU1QyUyMiUyMzE3MTcxNyU1QyUyMiUyQyU1QyUyMmhpZ2hsaWdodENvbG9yJTVDJTIyJTNBJTVDJTIyJTIzZmZmZmZmMjAlNUMlMjIlMkMlNUMlMjJjb3JuZXJTdHlsZSU1QyUyMiUzQSU1QyUyMnJvdW5kJTVDJTIyJTJDJTVDJTIyY3VzdG9tQ1NTJTVDJTIyJTNBJTVDJTIyJTJGKiUyMGlucHV0JTIwY3VzdG9tJTIwY3NzLi4uJTIwKiUyRiU1QyUyMiU3RCUyQyU1QyUyMmFuaW1hdGlvbnMlNUMlMjIlM0ElN0IlNUMlMjJlbmFibGVkJTVDJTIyJTNBdHJ1ZSUyQyU1QyUyMmJvb2ttYXJrVGltaW5nJTVDJTIyJTNBJTVDJTIybGVmdCU1QyUyMiUyQyU1QyUyMmluaXRpYWxUeXBlJTVDJTIyJTNBJTVDJTIyYW5pbWF0ZS1kb3duLWZhbGwlNUMlMjIlMkMlNUMlMjJzZWFyY2hUeXBlJTVDJTIyJTNBJTVDJTIyYW5pbWF0ZS1wYWdlLXNocmluayU1QyUyMiUyQyU1QyUyMmJvb2ttYXJrVHlwZSU1QyUyMiUzQSU1QyUyMmFuaW1hdGUtcGFnZS11cCU1QyUyMiU3RCUyQyU1QyUyMnNlYXJjaCU1QyUyMiUzQSU3QiU1QyUyMmVuYWJsZWQlNUMlMjIlM0F0cnVlJTJDJTVDJTIyZm9udCU1QyUyMiUzQSU3QiU1QyUyMnR5cGUlNUMlMjIlM0ElNUMlMjJkZWZhdWx0JTVDJTIyJTJDJTVDJTIyY3VzdG9tJTVDJTIyJTNBJTVDJTIyJTVDJTIyJTdEJTJDJTVDJTIydGV4dENvbG9yJTVDJTIyJTNBJTVDJTIyJTIzMDAwMDAwJTVDJTIyJTJDJTVDJTIycGxhY2Vob2xkZXJUZXh0JTVDJTIyJTNBJTVDJTIyU3p1a2FqLi4uJTVDJTIyJTJDJTVDJTIyYm9va21hcmtQbGFjZWhvbGRlclRleHQlNUMlMjIlM0ElNUMlMjJaYWslQzUlODIlQzQlODVka2kuLi4lNUMlMjIlMkMlNUMlMjJwbGFjZWhvbGRlclRleHRDb2xvciU1QyUyMiUzQSU1QyUyMiUyMzAxMDEwMCU1QyUyMiUyQyU1QyUyMnNlYXJjaEljb25Db2xvciU1QyUyMiUzQSU1QyUyMiUyMzE0YjhhNiU1QyUyMiUyQyU1QyUyMmJvb2ttYXJrSWNvbkNvbG9yJTVDJTIyJTNBJTVDJTIyJTIzM2I4MmY2JTVDJTIyJTJDJTVDJTIyc2VsZWN0SWNvbkNvbG9yJTVDJTIyJTNBJTVDJTIyJTIzZjU5ZTBiJTVDJTIyJTJDJTVDJTIyZW5naW5lJTVDJTIyJTNBJTVDJTIyZHVja2R1Y2tnbyU1QyUyMiUyQyU1QyUyMnVzZUN1c3RvbUVuZ2luZSU1QyUyMiUzQXRydWUlMkMlNUMlMjJjdXN0b21FbmdpbmVVUkwlNUMlMjIlM0ElNUMlMjJodHRwcyUzQSUyRiUyRnNlYXJjaC5nYXJhbmRwbGcuY29tJTJGc2VhcmNoJTNGcSUzRCU3QiU3RCU1QyUyMiUyQyU1QyUyMmZvY3VzZWRCb3JkZXJDb2xvciU1QyUyMiUzQSU1QyUyMiUyMzBlYTVlOSU1QyUyMiUyQyU1QyUyMmFzc2lzdCU1QyUyMiUzQSU3QiU1QyUyMmRhdGUlNUMlMjIlM0F0cnVlJTJDJTVDJTIybWF0aCU1QyUyMiUzQXRydWUlMkMlNUMlMjJkZWZpbml0aW9ucyU1QyUyMiUzQXRydWUlMkMlNUMlMjJjb252ZXJzaW9ucyU1QyUyMiUzQXRydWUlN0QlN0QlMkMlNUMlMjJob3RrZXlzJTVDJTIyJTNBJTdCJTVDJTIyZW5hYmxlZCU1QyUyMiUzQWZhbHNlJTJDJTVDJTIyYWN0aXZhdGlvbktleSU1QyUyMiUzQSU1QyUyMiUyMCU1QyUyMiUyQyU1QyUyMmNsb3NlUGFnZUtleSU1QyUyMiUzQSU1QyUyMnglNUMlMjIlMkMlNUMlMjJzZWFyY2hCb29rbWFya3NLZXklNUMlMjIlM0ElNUMlMjJiJTVDJTIyJTdEJTJDJTVDJTIyYm9va21hcmtzJTVDJTIyJTNBJTdCJTVDJTIydHlwZSU1QyUyMiUzQSU1QyUyMmRlZmF1bHQtYmxvY2t5JTVDJTIyJTJDJTVDJTIybnVtYmVyS2V5cyU1QyUyMiUzQWZhbHNlJTJDJTVDJTIydXNlckRlZmluZWRDb2xzJTVDJTIyJTNBbnVsbCUyQyU1QyUyMmxpbmVPcmllbnRhdGlvbiU1QyUyMiUzQSU1QyUyMnRvcCU1QyUyMiUyQyU1QyUyMnVzZXJEZWZpbmVkJTVDJTIyJTNBJTVCJTdCJTVDJTIydHlwZSU1QyUyMiUzQSU1QyUyMmJvb2ttYXJrJTVDJTIyJTJDJTVDJTIybmFtZSU1QyUyMiUzQSU1QyUyMmdpdGh1YiU1QyUyMiUyQyU1QyUyMnVybCU1QyUyMiUzQSU1QyUyMmh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSU1QyUyMiUyQyU1QyUyMmNvbG9yJTVDJTIyJTNBJTVDJTIyJTIzNjM2NmYxJTVDJTIyJTJDJTVDJTIyaWNvblR5cGUlNUMlMjIlM0ElNUMlMjJyaS1naXRodWItZmlsbCU1QyUyMiUyQyU1QyUyMmljb25Db2xvciU1QyUyMiUzQSU1QyUyMiUyM2ZmZmZmZiU1QyUyMiUyQyU1QyUyMmZpbGwlNUMlMjIlM0ElNUMlMjIlNUMlMjIlN0QlMkMlN0IlNUMlMjJ0eXBlJTVDJTIyJTNBJTVDJTIyYm9va21hcmslNUMlMjIlMkMlNUMlMjJuYW1lJTVDJTIyJTNBJTVDJTIyeW91dHViZSU1QyUyMiUyQyU1QyUyMnVybCU1QyUyMiUzQSU1QyUyMmh0dHBzJTNBJTJGJTJGeW91dHViZS5jb20lNUMlMjIlMkMlNUMlMjJjb2xvciU1QyUyMiUzQSU1QyUyMiUyM2Y0M2Y1ZSU1QyUyMiUyQyU1QyUyMmljb25UeXBlJTVDJTIyJTNBJTVDJTIycmkteW91dHViZS1maWxsJTVDJTIyJTJDJTVDJTIyaWNvbkNvbG9yJTVDJTIyJTNBJTVDJTIyJTIzZmZmZmZmJTVDJTIyJTJDJTVDJTIyZmlsbCU1QyUyMiUzQSU1QyUyMiU1QyUyMiU3RCUyQyU3QiU1QyUyMnR5cGUlNUMlMjIlM0ElNUMlMjJib29rbWFyayU1QyUyMiUyQyU1QyUyMm5hbWUlNUMlMjIlM0ElNUMlMjJyZWRkaXQlNUMlMjIlMkMlNUMlMjJ1cmwlNUMlMjIlM0ElNUMlMjJodHRwcyUzQSUyRiUyRnd3dy5yZWRkaXQuY29tJTVDJTIyJTJDJTVDJTIyY29sb3IlNUMlMjIlM0ElNUMlMjIlMjNmOTczMTYlNUMlMjIlMkMlNUMlMjJpY29uVHlwZSU1QyUyMiUzQSU1QyUyMnJpLXJlZGRpdC1maWxsJTVDJTIyJTJDJTVDJTIyaWNvbkNvbG9yJTVDJTIyJTNBJTVDJTIyJTIzZmZmZmZmJTVDJTIyJTJDJTVDJTIyZmlsbCU1QyUyMiUzQSU1QyUyMiU1QyUyMiU3RCUyQyU3QiU1QyUyMnR5cGUlNUMlMjIlM0ElNUMlMjJib29rbWFyayU1QyUyMiUyQyU1QyUyMm5hbWUlNUMlMjIlM0ElNUMlMjJsb2NhbGhvc3QlNUMlMjIlMkMlNUMlMjJ1cmwlNUMlMjIlM0ElNUMlMjJodHRwJTNBJTJGJTJGbG9jYWxob3N0JTNBMzAwMCU1QyUyMiUyQyU1QyUyMmNvbG9yJTVDJTIyJTNBJTVDJTIyJTIzMTRiOGE2JTVDJTIyJTJDJTVDJTIyaWNvblR5cGUlNUMlMjIlM0ElNUMlMjJyaS1nbG9iYWwtZmlsbCU1QyUyMiUyQyU1QyUyMmljb25Db2xvciU1QyUyMiUzQSU1QyUyMiUyM2ZmZmZmZiU1QyUyMiUyQyU1QyUyMmZpbGwlNUMlMjIlM0ElNUMlMjIlNUMlMjIlN0QlNUQlMkMlNUMlMjJkZWZhdWx0QmxvY2t5Q29scyU1QyUyMiUzQTUlMkMlNUMlMjJkZWZhdWx0QmxvY2t5Q29sb3JUeXBlJTVDJTIyJTNBJTVDJTIycmFuZG9tJTVDJTIyJTJDJTVDJTIyZGVmYXVsdEJsb2NreUNvbG9yJTVDJTIyJTNBJTVDJTIyJTIzZmZmZmZmJTVDJTIyJTJDJTVDJTIyZGVmYXVsdEZhdmljb25Tb3VyY2UlNUMlMjIlM0ElNUMlMjJkdWNrZHVja2dvJTVDJTIyJTJDJTVDJTIyc2hvd0Jvb2ttYXJrTmFtZXMlNUMlMjIlM0F0cnVlJTJDJTVDJTIyYm9va21hcmtzTG9jYXRpb25GaXJlZm94JTVDJTIyJTNBJTVDJTIydG9vbGJhciU1QyUyMiU3RCUyQyU1QyUyMmV4dHJhcyU1QyUyMiUzQSU3QiU1QyUyMnNub3clNUMlMjIlM0ElN0IlNUMlMjJlbmFibGVkJTVDJTIyJTNBJTVDJTIyb2ZmJTVDJTIyJTdEJTdEJTdEJTIy - ]; - }; - # bookmarks = { - # force = true; - # settings = []; - # }; - }; - }; - settings = { - # LibreWolf settings - "network.http.referer.XOriginPolicy" = 2; - "privacy.resistFingerprinting.letterboxing" = true; - "privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" = true; - }; - policies = { - # Policies (about:policies#documentation) - }; - }; - }; -} diff --git a/modules/home/librewolf/default.nix b/modules/home/librewolf/default.nix new file mode 100644 index 0000000..cab8177 --- /dev/null +++ b/modules/home/librewolf/default.nix @@ -0,0 +1,26 @@ +{pkgs, ...}: { + programs = { + librewolf = { + enable = true; + package = pkgs.librewolf; + # nativeMessagingHosts = [pkgs.firefoxpwa]; + languagePacks = [ + "pl" + "en-US" + ]; + settings = { + # LibreWolf settings + "network.http.referer.XOriginPolicy" = 2; + "privacy.resistFingerprinting.letterboxing" = true; + "privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" = true; + }; + policies = { + # Policies (about:policies#documentation) + }; + }; + }; + + imports = [ + ./profiles + ]; +} diff --git a/modules/home/librewolf/profiles/default.nix b/modules/home/librewolf/profiles/default.nix new file mode 100644 index 0000000..b652f20 --- /dev/null +++ b/modules/home/librewolf/profiles/default.nix @@ -0,0 +1,13 @@ +{host, ...}: { + programs.librewolf.profiles."${host}" = { + id = 0; + isDefault = true; + name = "${host}"; + }; + + imports = [ + ./extensions.nix + ./search.nix + ./settings.nix + ]; +} diff --git a/modules/home/librewolf/profiles/extensions.nix b/modules/home/librewolf/profiles/extensions.nix new file mode 100644 index 0000000..2882fdf --- /dev/null +++ b/modules/home/librewolf/profiles/extensions.nix @@ -0,0 +1,22 @@ +{ + inputs, + system, + host, + ... +}: { + # about:debugging#/runtime/this-firefox Przydatne do wyszukiwania ID rozszerzenia + # programs.librewolf.profiles."${host}".extensions.force = true; + programs.librewolf.profiles."${host}".extensions.packages = with inputs.firefox-addons.packages.${system}; [ + bitwarden + floccus + ublock-origin + sponsorblock + darkreader + # flagfox + hoppscotch + return-youtube-dislikes + sponsorblock + # pwas-for-firefox + mtab + ]; +} diff --git a/modules/home/librewolf/profiles/search.nix b/modules/home/librewolf/profiles/search.nix new file mode 100644 index 0000000..711211f --- /dev/null +++ b/modules/home/librewolf/profiles/search.nix @@ -0,0 +1,216 @@ +{ + pkgs, + host, + ... +}: { + programs.librewolf.profiles."${host}".search = { + default = "garand's-search"; + privateDefault = "garand's-search"; + force = true; + engines = { + "garand's-search" = { + definedAliases = ["@g"]; + urls = [{template = "https://search.garandplg.com/search?q={searchTerms}";}]; + # suggestUrl = "https://search.garandplg.com/autocompleter?q={searchTerms}"; Not implemented in home-manager ☹️ + }; + "youtube" = { + definedAliases = ["@yt"]; + urls = [ + { + template = "https://www.youtube.com/results"; + params = [ + { + name = "search_query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "wikipedia-pl" = { + definedAliases = ["@w"]; + urls = [ + { + template = "https://pl.wikipedia.org/w/index.php"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "stackoverflow" = { + definedAliases = ["@so"]; + urls = [ + { + template = "https://stackoverflow.com/search"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "nix-packages" = { + definedAliases = ["@np"]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + urls = [ + { + template = "https://search.nixos.org/packages?channel=unstable"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "nix-options" = { + definedAliases = ["@no"]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + urls = [ + { + template = "https://search.nixos.org/options"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "nix-wiki" = { + definedAliases = ["@nw"]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + urls = [ + { + template = "https://wiki.nixos.org/w/index.php"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "home-manager-option" = { + definedAliases = ["@hmo"]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + urls = [ + { + template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master"; + } + ]; + }; + "eneba" = { + definedAliases = ["@en"]; + icon = "https://static.eneba.games/branding/v2/logoFull.svg"; + urls = [ + { + template = "https://www.eneba.com/pl/store/all"; + params = [ + { + name = "text"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "kinguin" = { + definedAliases = ["@ki"]; + icon = "https://static.kinguin.net/media/images/other/kinguin-mobile-logo.svg"; + urls = [ + { + template = "https://www.kinguin.net/listing?active=1&hideUnavailable=0&type=kinguin"; + params = [ + { + name = "phrase"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "instant-gaming" = { + definedAliases = ["@ig"]; + icon = "https://asset.brandfetch.io/idCbLj4uOg/idGS61T0FV.jpeg"; + urls = [ + { + template = "https://www.instant-gaming.com/pl/search/"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "morele" = { + definedAliases = ["@mo"]; + icon = "https://www.morele.net/static/img/shop/logo/image-logo-morele.svg"; + urls = [ + { + template = "https://www.morele.net/wyszukiwarka/"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "x-kom" = { + definedAliases = ["@xk"]; + icon = "https://assets.x-kom.pl/public-spa/xkom/75062cb4b48a8510.svg"; + urls = [ + { + template = "https://www.x-kom.pl/szukaj"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + "komputronik" = { + definedAliases = ["@kp"]; + icon = "https://front.komputronik.pl/front-static/komputronik.Ceqagame-a.svg"; + urls = [ + { + template = "https://www.komputronik.pl/search/category/1"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + + "google".metaData.hidden = true; + "bing".metaData.hidden = true; + "perplexity".metaData.hidden = true; + "wolnelektury-pl".metaData.hidden = true; + "policy-DuckDuckGo Lite".metaData.hidden = true; + "policy-MetaGer".metaData.hidden = true; + "policy-Mojeek".metaData.hidden = true; + "policy-SearXNG - searx.be".metaData.hidden = true; + "policy-StartPage".metaData.hidden = true; + + "allegro-pl".metaData.alias = "@al"; + }; + }; +} diff --git a/modules/home/librewolf/profiles/settings.nix b/modules/home/librewolf/profiles/settings.nix new file mode 100644 index 0000000..dce5129 --- /dev/null +++ b/modules/home/librewolf/profiles/settings.nix @@ -0,0 +1,42 @@ +{ + lib, + host, + ... +}: { + programs.librewolf.profiles."${host}".settings = lib.mkForce { + # Preferences (about:config) + "general.useragent.locale" = "pl"; + "intl.locale.requested" = "pl,en-US"; + "intl.accept_languages" = "pl,en-US"; + + "extensions.autoDisableScopes" = 0; + + "font.default.x-western" = "FiraCode Nerd Font"; + "font.name.monospace.x-western" = "FiraCode Nerd Font Mono"; + "font.name.sans-serif.x-western" = "FiraCode Nerd Font Propo"; + "font.name.serif.x-western" = "FiraCode Nerd Font"; + + "layout.css.prefers-color-scheme.content-override" = 0; + "layout.css.font-visibility" = 1; + + "browser.tabs.insertRelatedAfterCurrent" = true; + "browser.sessionstore.resume_from_crash" = true; + "browser.sessionstore.resume_session_once" = true; + "browser.toolbars.bookmarks.visibility" = "never"; + + "browser.search.update" = true; + + "sidebar.main.tools" = "history,bookmarks"; + "sidebar.revamp" = true; + "sidebar.verticalTabs" = true; + + "browser.eme.ui.enabled" = true; + "media.eme.enabled" = true; + + "privacy.donottrackheader.enabled" = true; + "privacy.clearOnShutdown.history" = true; + + "network.trr.mode" = 3; + "network.trr.uri" = "https://dns.mullvad.net/dns-query"; + }; +} diff --git a/modules/home/swaync.nix b/modules/home/swaync.nix deleted file mode 100644 index 07e6261..0000000 --- a/modules/home/swaync.nix +++ /dev/null @@ -1,311 +0,0 @@ -{config, ...}: { - services.swaync = { - enable = true; - settings = { - positionX = "right"; - positionY = "top"; - layer = "overlay"; - control-center-margin-top = 10; - control-center-margin-bottom = 10; - control-center-margin-right = 10; - control-center-margin-left = 10; - notification-icon-size = 64; - notification-body-image-height = 100; - notification-body-image-width = 200; - timeout = 10; - timeout-low = 5; - timeout-critical = 0; - fit-to-screen = false; - control-center-width = 500; - control-center-height = 1025; - notification-window-width = 500; - keyboard-shortcuts = true; - image-visibility = "when-available"; - transition-time = 200; - hide-on-clear = false; - hide-on-action = true; - script-fail-notify = true; - widget-config = { - title = { - text = "Notification Center"; - clear-all-button = true; - button-text = "󰆴 Clear All"; - }; - dnd = { - text = "Do Not Disturb"; - }; - label = { - max-lines = 1; - text = "Notification Center"; - }; - mpris = { - image-size = 96; - image-radius = 7; - }; - volume = { - label = "󰕾"; - }; - backlight = { - label = "󰃟"; - }; - }; - widgets = [ - "title" - "mpris" - "volume" - "backlight" - "dnd" - "notifications" - ]; - }; - style = '' - * { - font-family: JetBrainsMono Nerd Font Mono; - font-weight: bold; - } - .control-center .notification-row:focus, - .control-center .notification-row:hover { - opacity: 0.9; - background: #${config.lib.stylix.colors.base00} - } - .notification-row { - outline: none; - margin: 10px; - padding: 0; - } - .notification { - background: transparent; - padding: 0; - margin: 0px; - } - .notification-content { - background: #${config.lib.stylix.colors.base00}; - padding: 10px; - border-radius: 5px; - border: 2px solid #${config.lib.stylix.colors.base0D}; - margin: 0; - } - .notification-default-action { - margin: 0; - padding: 0; - border-radius: 5px; - } - .close-button { - background: #${config.lib.stylix.colors.base08}; - color: #${config.lib.stylix.colors.base00}; - text-shadow: none; - padding: 0; - border-radius: 5px; - margin-top: 5px; - margin-right: 5px; - } - .close-button:hover { - box-shadow: none; - background: #${config.lib.stylix.colors.base0D}; - transition: all .15s ease-in-out; - border: none - } - .notification-action { - border: 2px solid #${config.lib.stylix.colors.base0D}; - border-top: none; - border-radius: 5px; - } - .notification-default-action:hover, - .notification-action:hover { - color: #${config.lib.stylix.colors.base0B}; - background: #${config.lib.stylix.colors.base0B} - } - .notification-default-action { - border-radius: 5px; - margin: 0px; - } - .notification-default-action:not(:only-child) { - border-bottom-left-radius: 7px; - border-bottom-right-radius: 7px - } - .notification-action:first-child { - border-bottom-left-radius: 10px; - background: #${config.lib.stylix.colors.base00} - } - .notification-action:last-child { - border-bottom-right-radius: 10px; - background: #${config.lib.stylix.colors.base00} - } - .inline-reply { - margin-top: 8px - } - .inline-reply-entry { - background: #${config.lib.stylix.colors.base00}; - color: #${config.lib.stylix.colors.base05}; - caret-color: #${config.lib.stylix.colors.base05}; - border: 1px solid #${config.lib.stylix.colors.base09}; - border-radius: 5px - } - .inline-reply-button { - margin-left: 4px; - background: #${config.lib.stylix.colors.base00}; - border: 1px solid #${config.lib.stylix.colors.base09}; - border-radius: 5px; - color: #${config.lib.stylix.colors.base05} - } - .inline-reply-button:disabled { - background: initial; - color: #${config.lib.stylix.colors.base03}; - border: 1px solid transparent - } - .inline-reply-button:hover { - background: #${config.lib.stylix.colors.base00} - } - .body-image { - margin-top: 6px; - background-color: #${config.lib.stylix.colors.base05}; - border-radius: 5px - } - .summary { - font-size: 16px; - font-weight: 700; - background: transparent; - color: rgba(158, 206, 106, 1); - text-shadow: none - } - .time { - font-size: 16px; - font-weight: 700; - background: transparent; - color: #${config.lib.stylix.colors.base05}; - text-shadow: none; - margin-right: 18px - } - .body { - font-size: 15px; - font-weight: 400; - background: transparent; - color: #${config.lib.stylix.colors.base05}; - text-shadow: none - } - .control-center { - background: #${config.lib.stylix.colors.base00}; - border: 2px solid #${config.lib.stylix.colors.base0C}; - border-radius: 5px; - } - .control-center-list { - background: transparent - } - .control-center-list-placeholder { - opacity: .5 - } - .floating-notifications { - background: transparent - } - .blank-window { - background: alpha(black, 0) - } - .widget-title { - color: #${config.lib.stylix.colors.base0B}; - background: #${config.lib.stylix.colors.base00}; - padding: 5px 10px; - margin: 10px 10px 5px 10px; - font-size: 1.5rem; - border-radius: 5px; - } - .widget-title>button { - font-size: 1rem; - color: #${config.lib.stylix.colors.base05}; - text-shadow: none; - background: #${config.lib.stylix.colors.base00}; - box-shadow: none; - border-radius: 5px; - } - .widget-title>button:hover { - background: #${config.lib.stylix.colors.base08}; - color: #${config.lib.stylix.colors.base00}; - } - .widget-dnd { - background: #${config.lib.stylix.colors.base00}; - padding: 5px 10px; - margin: 10px 10px 5px 10px; - border-radius: 5px; - font-size: large; - color: #${config.lib.stylix.colors.base0B}; - } - .widget-dnd>switch { - border-radius: 5px; - /* border: 1px solid #${config.lib.stylix.colors.base0B}; */ - background: #${config.lib.stylix.colors.base0B}; - } - .widget-dnd>switch:checked { - background: #${config.lib.stylix.colors.base08}; - border: 1px solid #${config.lib.stylix.colors.base08}; - } - .widget-dnd>switch slider { - background: #${config.lib.stylix.colors.base00}; - border-radius: 5px - } - .widget-dnd>switch:checked slider { - background: #${config.lib.stylix.colors.base00}; - border-radius: 5px - } - .widget-label { - margin: 10px 10px 5px 10px; - } - .widget-label>label { - font-size: 1rem; - color: #${config.lib.stylix.colors.base05}; - } - .widget-mpris { - color: #${config.lib.stylix.colors.base05}; - padding: 5px 10px; - margin: 10px 10px 5px 10px; - border-radius: 5px; - } - .widget-mpris > box > button { - border-radius: 5px; - } - .widget-mpris-player { - padding: 5px 10px; - margin: 10px - } - .widget-mpris-title { - font-weight: 700; - font-size: 1.25rem - } - .widget-mpris-subtitle { - font-size: 1.1rem - } - .widget-menubar>box>.menu-button-bar>button { - border: none; - background: transparent - } - .topbar-buttons>button { - border: none; - background: transparent - } - .widget-volume { - background: #${config.lib.stylix.colors.base01}; - padding: 5px; - margin: 10px 10px 5px 10px; - border-radius: 5px; - font-size: x-large; - color: #${config.lib.stylix.colors.base05}; - } - .widget-volume>box>button { - background: #${config.lib.stylix.colors.base0B}; - border: none - } - .per-app-volume { - background-color: #${config.lib.stylix.colors.base00}; - padding: 4px 8px 8px; - margin: 0 8px 8px; - border-radius: 5px; - } - .widget-backlight { - background: #${config.lib.stylix.colors.base01}; - padding: 5px; - margin: 10px 10px 5px 10px; - border-radius: 5px; - font-size: x-large; - color: #${config.lib.stylix.colors.base05} - } - ''; - }; -} diff --git a/modules/home/swaync/default.nix b/modules/home/swaync/default.nix new file mode 100644 index 0000000..2abdb15 --- /dev/null +++ b/modules/home/swaync/default.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + services.swaync = { + enable = true; + package = pkgs.swaynotificationcenter; + }; + + imports = [ + ./settings.nix + ./style.nix + ]; +} diff --git a/modules/home/swaync/settings.nix b/modules/home/swaync/settings.nix new file mode 100644 index 0000000..f279fb4 --- /dev/null +++ b/modules/home/swaync/settings.nix @@ -0,0 +1,59 @@ +_: { + services.swaync.settings = { + positionX = "right"; + positionY = "top"; + layer = "overlay"; + control-center-margin-top = 10; + control-center-margin-bottom = 10; + control-center-margin-right = 10; + control-center-margin-left = 10; + notification-icon-size = 64; + notification-body-image-height = 100; + notification-body-image-width = 200; + timeout = 10; + timeout-low = 5; + timeout-critical = 0; + fit-to-screen = false; + control-center-width = 500; + control-center-height = 1025; + notification-window-width = 500; + keyboard-shortcuts = true; + image-visibility = "when-available"; + transition-time = 200; + hide-on-clear = false; + hide-on-action = true; + script-fail-notify = true; + widget-config = { + title = { + text = "Notification Center"; + clear-all-button = true; + button-text = "󰆴 Clear All"; + }; + dnd = { + text = "Do Not Disturb"; + }; + label = { + max-lines = 1; + text = "Notification Center"; + }; + mpris = { + image-size = 96; + image-radius = 7; + }; + volume = { + label = "󰕾"; + }; + backlight = { + label = "󰃟"; + }; + }; + widgets = [ + "title" + "mpris" + "volume" + "backlight" + "dnd" + "notifications" + ]; + }; +} diff --git a/modules/home/swaync/style.nix b/modules/home/swaync/style.nix new file mode 100644 index 0000000..893b8e6 --- /dev/null +++ b/modules/home/swaync/style.nix @@ -0,0 +1,251 @@ +{config, ...}: { + services.swaync.style = '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-weight: bold; + } + .control-center .notification-row:focus, + .control-center .notification-row:hover { + opacity: 0.9; + background: #${config.lib.stylix.colors.base00} + } + .notification-row { + outline: none; + margin: 10px; + padding: 0; + } + .notification { + background: transparent; + padding: 0; + margin: 0px; + } + .notification-content { + background: #${config.lib.stylix.colors.base00}; + padding: 10px; + border-radius: 5px; + border: 2px solid #${config.lib.stylix.colors.base0D}; + margin: 0; + } + .notification-default-action { + margin: 0; + padding: 0; + border-radius: 5px; + } + .close-button { + background: #${config.lib.stylix.colors.base08}; + color: #${config.lib.stylix.colors.base00}; + text-shadow: none; + padding: 0; + border-radius: 5px; + margin-top: 5px; + margin-right: 5px; + } + .close-button:hover { + box-shadow: none; + background: #${config.lib.stylix.colors.base0D}; + transition: all .15s ease-in-out; + border: none + } + .notification-action { + border: 2px solid #${config.lib.stylix.colors.base0D}; + border-top: none; + border-radius: 5px; + } + .notification-default-action:hover, + .notification-action:hover { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base0B} + } + .notification-default-action { + border-radius: 5px; + margin: 0px; + } + .notification-default-action:not(:only-child) { + border-bottom-left-radius: 7px; + border-bottom-right-radius: 7px + } + .notification-action:first-child { + border-bottom-left-radius: 10px; + background: #${config.lib.stylix.colors.base00} + } + .notification-action:last-child { + border-bottom-right-radius: 10px; + background: #${config.lib.stylix.colors.base00} + } + .inline-reply { + margin-top: 8px + } + .inline-reply-entry { + background: #${config.lib.stylix.colors.base00}; + color: #${config.lib.stylix.colors.base05}; + caret-color: #${config.lib.stylix.colors.base05}; + border: 1px solid #${config.lib.stylix.colors.base09}; + border-radius: 5px + } + .inline-reply-button { + margin-left: 4px; + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base09}; + border-radius: 5px; + color: #${config.lib.stylix.colors.base05} + } + .inline-reply-button:disabled { + background: initial; + color: #${config.lib.stylix.colors.base03}; + border: 1px solid transparent + } + .inline-reply-button:hover { + background: #${config.lib.stylix.colors.base00} + } + .body-image { + margin-top: 6px; + background-color: #${config.lib.stylix.colors.base05}; + border-radius: 5px + } + .summary { + font-size: 16px; + font-weight: 700; + background: transparent; + color: rgba(158, 206, 106, 1); + text-shadow: none + } + .time { + font-size: 16px; + font-weight: 700; + background: transparent; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none; + margin-right: 18px + } + .body { + font-size: 15px; + font-weight: 400; + background: transparent; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none + } + .control-center { + background: #${config.lib.stylix.colors.base00}; + border: 2px solid #${config.lib.stylix.colors.base0C}; + border-radius: 5px; + } + .control-center-list { + background: transparent + } + .control-center-list-placeholder { + opacity: .5 + } + .floating-notifications { + background: transparent + } + .blank-window { + background: alpha(black, 0) + } + .widget-title { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base00}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + font-size: 1.5rem; + border-radius: 5px; + } + .widget-title>button { + font-size: 1rem; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none; + background: #${config.lib.stylix.colors.base00}; + box-shadow: none; + border-radius: 5px; + } + .widget-title>button:hover { + background: #${config.lib.stylix.colors.base08}; + color: #${config.lib.stylix.colors.base00}; + } + .widget-dnd { + background: #${config.lib.stylix.colors.base00}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: large; + color: #${config.lib.stylix.colors.base0B}; + } + .widget-dnd>switch { + border-radius: 5px; + /* border: 1px solid #${config.lib.stylix.colors.base0B}; */ + background: #${config.lib.stylix.colors.base0B}; + } + .widget-dnd>switch:checked { + background: #${config.lib.stylix.colors.base08}; + border: 1px solid #${config.lib.stylix.colors.base08}; + } + .widget-dnd>switch slider { + background: #${config.lib.stylix.colors.base00}; + border-radius: 5px + } + .widget-dnd>switch:checked slider { + background: #${config.lib.stylix.colors.base00}; + border-radius: 5px + } + .widget-label { + margin: 10px 10px 5px 10px; + } + .widget-label>label { + font-size: 1rem; + color: #${config.lib.stylix.colors.base05}; + } + .widget-mpris { + color: #${config.lib.stylix.colors.base05}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + } + .widget-mpris > box > button { + border-radius: 5px; + } + .widget-mpris-player { + padding: 5px 10px; + margin: 10px + } + .widget-mpris-title { + font-weight: 700; + font-size: 1.25rem + } + .widget-mpris-subtitle { + font-size: 1.1rem + } + .widget-menubar>box>.menu-button-bar>button { + border: none; + background: transparent + } + .topbar-buttons>button { + border: none; + background: transparent + } + .widget-volume { + background: #${config.lib.stylix.colors.base01}; + padding: 5px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: x-large; + color: #${config.lib.stylix.colors.base05}; + } + .widget-volume>box>button { + background: #${config.lib.stylix.colors.base0B}; + border: none + } + .per-app-volume { + background-color: #${config.lib.stylix.colors.base00}; + padding: 4px 8px 8px; + margin: 0 8px 8px; + border-radius: 5px; + } + .widget-backlight { + background: #${config.lib.stylix.colors.base01}; + padding: 5px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: x-large; + color: #${config.lib.stylix.colors.base05} + } + ''; +} diff --git a/modules/home/vesktop.nix b/modules/home/vesktop.nix index 93f5322..9e6b2cb 100644 --- a/modules/home/vesktop.nix +++ b/modules/home/vesktop.nix @@ -1,3 +1,6 @@ -_: { - programs.vesktop.enable = true; +{pkgs, ...}: { + programs.vesktop = { + enable = true; + package = pkgs.vesktop; + }; } diff --git a/modules/home/vscode.nix b/modules/home/vscode.nix deleted file mode 100644 index 43e4d62..0000000 --- a/modules/home/vscode.nix +++ /dev/null @@ -1,431 +0,0 @@ -{pkgs, ...}: { - nixpkgs.config.allowUnfree = true; - - programs.vscode = { - enable = false; - package = pkgs.vscodium; - profiles = { - default = { - extensions = with pkgs.vscode-extensions; - [ - batisteo.vscode-django - bradlc.vscode-tailwindcss - christian-kohler.npm-intellisense - christian-kohler.path-intellisense - continue.continue - davidanson.vscode-markdownlint - dbaeumer.vscode-eslint - donjayamanne.githistory - esbenp.prettier-vscode - ethansk.restore-terminals - formulahendry.auto-close-tag - formulahendry.auto-rename-tag - gruntfuggly.todo-tree - jnoortheen.nix-ide - mechatroner.rainbow-csv - ms-azuretools.vscode-docker - njpwerner.autodocstring - octref.vetur - oderwat.indent-rainbow - shd101wyy.markdown-preview-enhanced - streetsidesoftware.code-spell-checker - supermaven.supermaven - tomoki1207.pdf - visualstudioexptteam.intellicode-api-usage-examples - visualstudioexptteam.vscodeintellicode - vscode-icons-team.vscode-icons - vue.volar - wholroyd.jinja - yoavbls.pretty-ts-errors - tamasfe.even-better-toml - ms-ceintl.vscode-language-pack-pl - rust-lang.rust-analyzer - fill-labs.dependi - usernamehw.errorlens - bierner.docs-view - stkb.rewrap - ms-vscode.live-server - vadimcn.vscode-lldb - batisteo.vscode-django - vitaliymaz.vscode-svg-previewer - ] - ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "goto-alias"; - publisher = "antfu"; - version = "0.2.1"; - hash = "sha256-BJBJVG/zW2BW6K0UqQ4EE12VVIxW3g+z5CecZXRPIrM="; - } - { - name = "vite"; - publisher = "antfu"; - version = "0.2.5"; - hash = "sha256-F3uaqoaLXLE7M8OPzNIIUSraTBeRMwtjxrbgQyMIyZE="; - } - { - name = "django-html"; - publisher = "bibhasdn"; - version = "1.3.0"; - hash = "sha256-7xVJVcjmwl6917lqkTa0KFwMLkAvHkNT2wVML14gVCk="; - } - { - name = "one-dark-pro-monokai-darker"; - publisher = "eserozvataf"; - version = "1.1.0"; - hash = "sha256-jUjBiy0CD7jw2WBMvM3h8bEC2ySEuj7532dC3v9lpyI="; - } - { - name = "bootstrap-intellisense"; - publisher = "hossaini"; - version = "3.0.2"; - hash = "sha256-stZfbh42HncdRzFZ9ShumZ9Tuery9RF9c8rk3TD3P2g="; - } - { - name = "tab-indent-space-align"; - publisher = "j-zeppenfeld"; - version = "0.0.3"; - hash = "sha256-+WEdYJOVWW7YumfzLkvZmrnpUiC85oLsG1BKMwL1NHc="; - } - { - name = "bun-lockb"; - publisher = "jaaxxx"; - version = "0.0.7"; - hash = "sha256-CkdH/luVTFycRn4Td6ovFnEQep+tVEIXsyUjhfJwfN4="; - } - { - name = "search-node-modules"; - publisher = "jasonnutter"; - version = "1.3.0"; - hash = "sha256-X2CkCVF46McnXDlASlRHKixlAzR+hU4ys8A8JsbpfYI="; - } - { - name = "polacode-2019"; - publisher = "jeff-hykin"; - version = "0.6.1"; - hash = "sha256-SbfsD28gaVHAmJskUuc1Q8kA47jrVa3OO5Ur7ULk3jI="; - } - { - name = "vsc-python-indent"; - publisher = "kevinrose"; - version = "1.21.0"; - hash = "sha256-SvJhVG8sofzV0PebZG4IIORX3AcfmErDQ00tRF9fk/4="; - } - { - name = "json-to-ts"; - publisher = "mariusalchimavicius"; - version = "1.8.0"; - hash = "sha256-WoSycVtUAkVXv7BDuh+jFbnaU1IdVLvVjOYuIuUp79M="; - } - { - name = "inline-fold-new"; - publisher = "ctf0"; - version = "0.0.2"; - hash = "sha256-DpXTBYN1Ohh3ZvvpUtas0G99fZcimsp1NL7mpIC07yk="; - } - { - name = "mdc"; - publisher = "nuxt"; - version = "0.3.1"; - hash = "sha256-YJ+7gzDjA8kzxBwGLpEmfx0erJdgAntWc2OrK2zp9DM="; - } - { - name = "nuxtr-vscode"; - publisher = "nuxtr"; - version = "0.2.16"; - hash = "sha256-DVoq8zdlJ2ch8PCG34f1PRkILym9XdclUHQ9s2B5OME="; - } - { - name = "bun-vscode"; - publisher = "oven"; - version = "0.0.28"; - hash = "sha256-WlGqqKbfrV0gqCCdVo/UFF+Gnxhq0TNJ4LuHwFaFYXA="; - } - { - name = "csv-to-table"; - publisher = "phplasma"; - version = "1.4.1"; - hash = "sha256-npe7cQ4lAZr8HCyQSJmVsCDUJcOhGhL6y1QtUtqUY50="; - } - { - name = "nuxt-snippets"; - publisher = "praburangki"; - version = "1.8.0"; - hash = "sha256-qrWrrDO/Ie/mdygw18C0mrPzNQzZLsd+fapUyTVhc14="; - } - { - name = "bash-debug"; - publisher = "rogalmic"; - version = "0.3.9"; - hash = "sha256-f8FUZCvz/PonqQP9RCNbyQLZPnN5Oce0Eezm/hD19Fg="; - } - { - name = "vs-code-prettier-eslint"; - publisher = "rvest"; - version = "6.0.0"; - hash = "sha256-PogNeKhIlcGxUKrW5gHvFhNluUelWDGHCdg5K+xGXJY="; - } - { - name = "vscode-preview-docs"; - publisher = "selemondev"; - version = "0.1.7"; - hash = "sha256-Q9bEIb2m6cqHtdVjOaNivfYvbc5/VVdabM2NVTwBOFA="; - } - { - name = "autoimport"; - publisher = "steoates"; - version = "1.5.4"; - hash = "sha256-7iIwJJsoNbtTopc+BQ+195aSCLqdNAaGtMoxShyhBWY="; - } - { - name = "code-spell-checker-polish"; - publisher = "streetsidesoftware"; - version = "2.1.3"; - hash = "sha256-MZeTvK9dO4Kj6hK+afJPWGmnKBtlLrrnoqtUd5s2te0="; - } - { - name = "vscode-pets"; - publisher = "tonybaloney"; - version = "1.30.0"; - hash = "sha256-RxOA6xQ29JuB0NzEqMDkF9W1U+AsvgAOzGbtIUw0WyM="; - } - { - name = "explorer"; - publisher = "vitest"; - version = "1.17.0"; - hash = "sha256-7OePMFsWIyrPkAW/+SRiOoowluLMEszEjWmBsW0LPpc="; - } - { - name = "prettify-json"; - publisher = "mohsen1"; - version = "0.0.3"; - hash = "sha256-lvds+lFDzt1s6RikhrnAKJipRHU+Dk85ZO49d1sA8uo="; - } - { - name = "uv-toolkit"; - publisher = "the0807"; - version = "0.0.2"; - hash = "sha256-OXHUwynWm4RqJYjcv5qXt5DyjFDxtNjZFNpnd22gUgg="; - } - { - name = "kylin-python"; - publisher = "kylinideteam"; - version = "0.4.2"; - hash = "sha256-LhOsIvECrxLCnRjUVffS4G4fFsdP70iP/twoNoto354="; - } - { - name = "rust-flash-snippets"; - publisher = "lorenzopirro"; - version = "3.1.1"; - hash = "sha256-L8x/OqbrsKDmyphzV3CDpoZ27rTnPS0U1YGv9KakW+U="; - } - { - name = "rustowl-vscode"; - publisher = "cordx56"; - version = "0.3.4"; - hash = "sha256-sM4CxQfdtDkZg5B7gxw66k7ZpIfHQFORIukHRpg0+S8="; - } - { - name = "vscode-coverage-gutters"; - publisher = "ryanluker"; - version = "2.13.0"; - hash = "sha256-qgPKGikqNIeZkKfd0P0keAdxRl9XNzvEJKQy58eaUZk="; - } - { - name = "vscode-change-case"; - publisher = "hjdarnel"; - version = "1.4.0"; - hash = "sha256-6LS4MrG16054DQkPmr7BQJeekpEtcL2NtRe0Ckfq2w4="; - } - { - name = "vscode-bevy-inspector"; - publisher = "splo"; - version = "0.3.0"; - hash = "sha256-f0FAgQ0wm3FYPz5qpMHWHnTf3un0xw+5gcyBG7PYM2E="; - } - ]; - userSettings = { - "editor.foldingImportsByDefault" = true; - "editor.fontFamily" = "FiraCode Nerd Font"; - "editor.formatOnPaste" = true; - "editor.formatOnSave" = true; - "editor.guides.bracketPairs" = false; - "editor.guides.indentation" = false; - "editor.inlayHints.enabled" = "off"; - "editor.inlineSuggest.showToolbar" = "always"; - "editor.largeFileOptimizations" = false; - "editor.minimap.enabled" = false; - "editor.quickSuggestions" = { - "strings" = "on"; - }; - "editor.suggestFontSize" = 16; - "editor.suggestLineHeight" = 30; - "editor.tabSize" = 2; - "editor.unicodeHighlight.ambiguousCharacters" = false; - "editor.unicodeHighlight.invisibleCharacters" = false; - "editor.wordWrap" = "off"; - # Workbench settings - "workbench.colorCustomizations" = { - "editor.lineHighlightBackground" = "#1073cf2d"; - "editor.lineHighlightBorder" = "#9fced11f"; - }; - "workbench.colorTheme" = "One Dark Pro Monokai Darker"; - "workbench.iconTheme" = "vscode-icons"; - "workbench.startupEditor" = "none"; - # Terminal settings - "terminal.integrated.fontFamily" = "FiraCode Nerd Fonts Mono"; - # Git settings - "git.confirmSync" = false; - "git.enableSmartCommit" = true; - # Explorer settings - "explorer.confirmDelete" = false; - "explorer.confirmDragAndDrop" = false; - # Diff editor settings - "diffEditor.ignoreTrimWhitespace" = false; - "diffEditor.wordWrap" = "off"; - # Zen mode settings - "zenMode.centerLayout" = false; - "zenMode.hideActivityBar" = false; - "zenMode.hideLineNumbers" = false; - # Language specific settings - "[typescript]" = { - "editor.defaultFormatter" = "esbenp.prettier-vscode"; - }; - "[vue]" = { - "editor.defaultFormatter" = "esbenp.prettier-vscode"; - }; - "[jsonc]" = { - "editor.defaultFormatter" = "vscode.json-language-features"; - }; - "[json]" = { - "editor.defaultFormatter" = "vscode.json-language-features"; - }; - "[python]" = { - "editor.tabSize" = 4; - }; - # File associations - "files.associations" = { - "*.html" = "html"; - "*.txt" = "plaintext"; - }; - # JavaScript/TypeScript settings - "javascript.updateImportsOnFileMove.enabled" = "always"; - "typescript.updateImportsOnFileMove.enabled" = "always"; - # Python settings - "python.linting.pylintEnabled" = false; - "python.linting.flake8Enabled" = true; - "python.linting.flake8Args" = [ - "--line-width=119" - "--ignore=T000;E501;E265;E266;N802;D;Q;W504" - "--exclude=migrations;mocks" - ]; - "python.linting.enabled" = true; - "python.formatting.provider" = "yapf"; - "python.formatting.yapfArgs" = [ - "--style={based_on_style = pep8; column_limit = 119; dedent_closing_brackets = true; split_before_first_argument = true; coalesce_brackets = false; split_before_dict_set_generator = false; allow_split_before_dict_value = false; split_all_comma_separated_values = false; split_before_arithmetic_operator = false; split_before_logical_operator = false; split_before_named_assigns = false}" - ]; - "python.languageServer" = "Jedi"; - "python.jediMemoryLimit" = 1024; - "python.jedi.hover.enable" = true; - "python.jedi.hover.detailed" = false; - "python.jedi.hover.signature" = true; - "python.analysis.completeFunctionParens" = true; - "editor.hover.enabled" = true; - # Vue settings - "vue.codeActions.enabled" = false; - "vue.format.script.initialIndent" = true; - "vue.format.style.initialIndent" = true; - "vue.splitEditors.icon" = true; - "vue.splitEditors.layout.left" = [ - "script" - "scriptSetup" - ]; - "vue.splitEditors.layout.right" = [ - "template" - "customBlocks" - "style" - ]; - "vetur.ignoreProjectWarning" = true; - "vetur.languageFeatures.codeActions" = false; - "vetur.useWorkspaceDependencies" = true; - "prettier.vueIndentScriptAndStyle" = true; - # // Nuxt settings - "nuxtr.defaultPackageManager" = "Bun"; - "nuxtr.monorepoMode.DirectoryName" = ""; - "nuxtr.openItemsAfterCreation" = true; - "nuxtr.piniaFiles.defaultTemplate" = "setup"; - "nuxtr.vueFiles.firstTag" = "script"; - "nuxtr.vueFiles.style.defaultLanguage" = "postcss"; - # CSS/Tailwind settings - "tailwindCSS.emmetCompletions" = true; - # Syntax highlighting and appearance - "indentRainbow.colorOnWhiteSpaceOnly" = true; - "indentRainbow.indicatorStyle" = "light"; - "indentRainbow.lightIndicatorStyleLineWidth" = 4; - # Spelling and language - "cSpell.language" = "en;pl"; - "cSpell.userWords" = [ - "garand" - "Garand's" - "garandplg" - "garands" - "lockb" - "Shadcn" - "Vite" - ]; - # Navigation and intellisense - "editor.gotoLocation.multipleDefinitions" = "goto"; - "path-intellisense.extensionOnImport" = true; - # Markdown settings - "markdown-preview-enhanced.previewTheme" = "one-dark.css"; - # Extension specific settings - "supermaven.allowGitignore" = true; - "supermaven.enable" = { - "*" = true; - }; - "continue.enableTabAutocomplete" = false; - "continue.showInlineTip" = false; - "continue.telemetryEnabled" = false; - "hediet.vscode-drawio.resizeImages" = null; - "todo-tree.highlights.useColourScheme" = true; - "vite.autoStart" = false; - # Security and trust - "security.workspace.trust.untrustedFiles" = "open"; - # Remote development - "remote.autoForwardPortsSource" = "hybrid"; - "[plaintext]" = { - "editor.unicodeHighlight.ambiguousCharacters" = false; - "editor.unicodeHighlight.invisibleCharacters" = false; - }; - "python.diagnostics.sourceMapsEnabled" = true; - "vsintellicode.modify.editor.suggestSelection" = "automaticallyOverrodeDefaultValue"; - "githubLocalActions.workflowsDirectory" = ".gitea/workflows"; - "errorLens.excludeBySource" = [ - "cSpell" - ]; - }; - keybindings = [ - { - "key" = "tab"; - "command" = "-editor.emmet.action.expandAbbreviation"; - "when" = "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorReadonly && !editorTabMovesFocus"; - } - { - "key" = "tab"; - "command" = "-editor.action.inlineSuggest.jump"; - "when" = "inlineEditIsVisible && tabShouldJumpToInlineEdit && !editorHoverFocused && !editorTabMovesFocus && !suggestWidgetVisible"; - } - { - "key" = "tab"; - "command" = "-Alignment Preserving Indent"; - "when" = "editorTextFocus && !editorReadOnly && !editorTabMovesFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion != 'on'"; - } - { - "key" = "tab"; - "command" = "-Alignment Preserving Indent"; - "when" = "editorTextFocus && !editorReadOnly && !editorTabMovesFocus && !hasOtherSuggestions && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'"; - } - ]; - }; - }; - }; -} diff --git a/modules/home/vscodium/default.nix b/modules/home/vscodium/default.nix new file mode 100644 index 0000000..4c0c97e --- /dev/null +++ b/modules/home/vscodium/default.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: { + programs.vscode = { + enable = false; + package = pkgs.vscodium; + }; + + imports = [ + ./profiles + ]; +} diff --git a/modules/home/vscodium/profiles/default.nix b/modules/home/vscodium/profiles/default.nix new file mode 100644 index 0000000..0b3d1b4 --- /dev/null +++ b/modules/home/vscodium/profiles/default.nix @@ -0,0 +1,6 @@ +_: { + imports = [ + ./default + # add more profiles here + ]; +} diff --git a/modules/home/vscodium/profiles/default/default.nix b/modules/home/vscodium/profiles/default/default.nix new file mode 100644 index 0000000..dd8a9f5 --- /dev/null +++ b/modules/home/vscodium/profiles/default/default.nix @@ -0,0 +1,7 @@ +_: { + imports = [ + ./extensions.nix + ./keybindings.nix + ./user-settings.nix + ]; +} diff --git a/modules/home/vscodium/profiles/default/extensions.nix b/modules/home/vscodium/profiles/default/extensions.nix new file mode 100644 index 0000000..e52320d --- /dev/null +++ b/modules/home/vscodium/profiles/default/extensions.nix @@ -0,0 +1,239 @@ +{pkgs, ...}: { + programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; + [ + batisteo.vscode-django + bradlc.vscode-tailwindcss + christian-kohler.npm-intellisense + christian-kohler.path-intellisense + continue.continue + davidanson.vscode-markdownlint + dbaeumer.vscode-eslint + donjayamanne.githistory + esbenp.prettier-vscode + ethansk.restore-terminals + formulahendry.auto-close-tag + formulahendry.auto-rename-tag + gruntfuggly.todo-tree + jnoortheen.nix-ide + mechatroner.rainbow-csv + ms-azuretools.vscode-docker + njpwerner.autodocstring + octref.vetur + oderwat.indent-rainbow + shd101wyy.markdown-preview-enhanced + streetsidesoftware.code-spell-checker + supermaven.supermaven + tomoki1207.pdf + visualstudioexptteam.intellicode-api-usage-examples + visualstudioexptteam.vscodeintellicode + vscode-icons-team.vscode-icons + vue.volar + wholroyd.jinja + yoavbls.pretty-ts-errors + tamasfe.even-better-toml + ms-ceintl.vscode-language-pack-pl + rust-lang.rust-analyzer + fill-labs.dependi + usernamehw.errorlens + bierner.docs-view + stkb.rewrap + ms-vscode.live-server + vadimcn.vscode-lldb + batisteo.vscode-django + vitaliymaz.vscode-svg-previewer + ] + ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + { + name = "goto-alias"; + publisher = "antfu"; + version = "0.2.1"; + hash = "sha256-BJBJVG/zW2BW6K0UqQ4EE12VVIxW3g+z5CecZXRPIrM="; + } + { + name = "vite"; + publisher = "antfu"; + version = "0.2.5"; + hash = "sha256-F3uaqoaLXLE7M8OPzNIIUSraTBeRMwtjxrbgQyMIyZE="; + } + { + name = "django-html"; + publisher = "bibhasdn"; + version = "1.3.0"; + hash = "sha256-7xVJVcjmwl6917lqkTa0KFwMLkAvHkNT2wVML14gVCk="; + } + { + name = "one-dark-pro-monokai-darker"; + publisher = "eserozvataf"; + version = "1.1.0"; + hash = "sha256-jUjBiy0CD7jw2WBMvM3h8bEC2ySEuj7532dC3v9lpyI="; + } + { + name = "bootstrap-intellisense"; + publisher = "hossaini"; + version = "3.0.2"; + hash = "sha256-stZfbh42HncdRzFZ9ShumZ9Tuery9RF9c8rk3TD3P2g="; + } + { + name = "tab-indent-space-align"; + publisher = "j-zeppenfeld"; + version = "0.0.3"; + hash = "sha256-+WEdYJOVWW7YumfzLkvZmrnpUiC85oLsG1BKMwL1NHc="; + } + { + name = "bun-lockb"; + publisher = "jaaxxx"; + version = "0.0.7"; + hash = "sha256-CkdH/luVTFycRn4Td6ovFnEQep+tVEIXsyUjhfJwfN4="; + } + { + name = "search-node-modules"; + publisher = "jasonnutter"; + version = "1.3.0"; + hash = "sha256-X2CkCVF46McnXDlASlRHKixlAzR+hU4ys8A8JsbpfYI="; + } + { + name = "polacode-2019"; + publisher = "jeff-hykin"; + version = "0.6.1"; + hash = "sha256-SbfsD28gaVHAmJskUuc1Q8kA47jrVa3OO5Ur7ULk3jI="; + } + { + name = "vsc-python-indent"; + publisher = "kevinrose"; + version = "1.21.0"; + hash = "sha256-SvJhVG8sofzV0PebZG4IIORX3AcfmErDQ00tRF9fk/4="; + } + { + name = "json-to-ts"; + publisher = "mariusalchimavicius"; + version = "1.8.0"; + hash = "sha256-WoSycVtUAkVXv7BDuh+jFbnaU1IdVLvVjOYuIuUp79M="; + } + { + name = "inline-fold-new"; + publisher = "ctf0"; + version = "0.0.2"; + hash = "sha256-DpXTBYN1Ohh3ZvvpUtas0G99fZcimsp1NL7mpIC07yk="; + } + { + name = "mdc"; + publisher = "nuxt"; + version = "0.3.1"; + hash = "sha256-YJ+7gzDjA8kzxBwGLpEmfx0erJdgAntWc2OrK2zp9DM="; + } + { + name = "nuxtr-vscode"; + publisher = "nuxtr"; + version = "0.2.16"; + hash = "sha256-DVoq8zdlJ2ch8PCG34f1PRkILym9XdclUHQ9s2B5OME="; + } + { + name = "bun-vscode"; + publisher = "oven"; + version = "0.0.28"; + hash = "sha256-WlGqqKbfrV0gqCCdVo/UFF+Gnxhq0TNJ4LuHwFaFYXA="; + } + { + name = "csv-to-table"; + publisher = "phplasma"; + version = "1.4.1"; + hash = "sha256-npe7cQ4lAZr8HCyQSJmVsCDUJcOhGhL6y1QtUtqUY50="; + } + { + name = "nuxt-snippets"; + publisher = "praburangki"; + version = "1.8.0"; + hash = "sha256-qrWrrDO/Ie/mdygw18C0mrPzNQzZLsd+fapUyTVhc14="; + } + { + name = "bash-debug"; + publisher = "rogalmic"; + version = "0.3.9"; + hash = "sha256-f8FUZCvz/PonqQP9RCNbyQLZPnN5Oce0Eezm/hD19Fg="; + } + { + name = "vs-code-prettier-eslint"; + publisher = "rvest"; + version = "6.0.0"; + hash = "sha256-PogNeKhIlcGxUKrW5gHvFhNluUelWDGHCdg5K+xGXJY="; + } + { + name = "vscode-preview-docs"; + publisher = "selemondev"; + version = "0.1.7"; + hash = "sha256-Q9bEIb2m6cqHtdVjOaNivfYvbc5/VVdabM2NVTwBOFA="; + } + { + name = "autoimport"; + publisher = "steoates"; + version = "1.5.4"; + hash = "sha256-7iIwJJsoNbtTopc+BQ+195aSCLqdNAaGtMoxShyhBWY="; + } + { + name = "code-spell-checker-polish"; + publisher = "streetsidesoftware"; + version = "2.1.3"; + hash = "sha256-MZeTvK9dO4Kj6hK+afJPWGmnKBtlLrrnoqtUd5s2te0="; + } + { + name = "vscode-pets"; + publisher = "tonybaloney"; + version = "1.30.0"; + hash = "sha256-RxOA6xQ29JuB0NzEqMDkF9W1U+AsvgAOzGbtIUw0WyM="; + } + { + name = "explorer"; + publisher = "vitest"; + version = "1.17.0"; + hash = "sha256-7OePMFsWIyrPkAW/+SRiOoowluLMEszEjWmBsW0LPpc="; + } + { + name = "prettify-json"; + publisher = "mohsen1"; + version = "0.0.3"; + hash = "sha256-lvds+lFDzt1s6RikhrnAKJipRHU+Dk85ZO49d1sA8uo="; + } + { + name = "uv-toolkit"; + publisher = "the0807"; + version = "0.0.2"; + hash = "sha256-OXHUwynWm4RqJYjcv5qXt5DyjFDxtNjZFNpnd22gUgg="; + } + { + name = "kylin-python"; + publisher = "kylinideteam"; + version = "0.4.2"; + hash = "sha256-LhOsIvECrxLCnRjUVffS4G4fFsdP70iP/twoNoto354="; + } + { + name = "rust-flash-snippets"; + publisher = "lorenzopirro"; + version = "3.1.1"; + hash = "sha256-L8x/OqbrsKDmyphzV3CDpoZ27rTnPS0U1YGv9KakW+U="; + } + { + name = "rustowl-vscode"; + publisher = "cordx56"; + version = "0.3.4"; + hash = "sha256-sM4CxQfdtDkZg5B7gxw66k7ZpIfHQFORIukHRpg0+S8="; + } + { + name = "vscode-coverage-gutters"; + publisher = "ryanluker"; + version = "2.13.0"; + hash = "sha256-qgPKGikqNIeZkKfd0P0keAdxRl9XNzvEJKQy58eaUZk="; + } + { + name = "vscode-change-case"; + publisher = "hjdarnel"; + version = "1.4.0"; + hash = "sha256-6LS4MrG16054DQkPmr7BQJeekpEtcL2NtRe0Ckfq2w4="; + } + { + name = "vscode-bevy-inspector"; + publisher = "splo"; + version = "0.3.0"; + hash = "sha256-f0FAgQ0wm3FYPz5qpMHWHnTf3un0xw+5gcyBG7PYM2E="; + } + ]; +} diff --git a/modules/home/vscodium/profiles/default/keybindings.nix b/modules/home/vscodium/profiles/default/keybindings.nix new file mode 100644 index 0000000..e2a7210 --- /dev/null +++ b/modules/home/vscodium/profiles/default/keybindings.nix @@ -0,0 +1,24 @@ +_: { + programs.vscode.profiles.default.keybindings = [ + { + "key" = "tab"; + "command" = "-editor.emmet.action.expandAbbreviation"; + "when" = "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorReadonly && !editorTabMovesFocus"; + } + { + "key" = "tab"; + "command" = "-editor.action.inlineSuggest.jump"; + "when" = "inlineEditIsVisible && tabShouldJumpToInlineEdit && !editorHoverFocused && !editorTabMovesFocus && !suggestWidgetVisible"; + } + { + "key" = "tab"; + "command" = "-Alignment Preserving Indent"; + "when" = "editorTextFocus && !editorReadOnly && !editorTabMovesFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion != 'on'"; + } + { + "key" = "tab"; + "command" = "-Alignment Preserving Indent"; + "when" = "editorTextFocus && !editorReadOnly && !editorTabMovesFocus && !hasOtherSuggestions && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'"; + } + ]; +} diff --git a/modules/home/vscodium/profiles/default/user-settings.nix b/modules/home/vscodium/profiles/default/user-settings.nix new file mode 100644 index 0000000..449e0ab --- /dev/null +++ b/modules/home/vscodium/profiles/default/user-settings.nix @@ -0,0 +1,162 @@ +_: { + programs.vscode.profiles.default.userSettings = { + "editor.foldingImportsByDefault" = true; + "editor.fontFamily" = "FiraCode Nerd Font"; + "editor.formatOnPaste" = true; + "editor.formatOnSave" = true; + "editor.guides.bracketPairs" = false; + "editor.guides.indentation" = false; + "editor.inlayHints.enabled" = "off"; + "editor.inlineSuggest.showToolbar" = "always"; + "editor.largeFileOptimizations" = false; + "editor.minimap.enabled" = false; + "editor.quickSuggestions" = { + "strings" = "on"; + }; + "editor.suggestFontSize" = 16; + "editor.suggestLineHeight" = 30; + "editor.tabSize" = 2; + "editor.unicodeHighlight.ambiguousCharacters" = false; + "editor.unicodeHighlight.invisibleCharacters" = false; + "editor.wordWrap" = "off"; + # Workbench settings + "workbench.colorCustomizations" = { + "editor.lineHighlightBackground" = "#1073cf2d"; + "editor.lineHighlightBorder" = "#9fced11f"; + }; + "workbench.colorTheme" = "One Dark Pro Monokai Darker"; + "workbench.iconTheme" = "vscode-icons"; + "workbench.startupEditor" = "none"; + # Terminal settings + "terminal.integrated.fontFamily" = "FiraCode Nerd Fonts Mono"; + # Git settings + "git.confirmSync" = false; + "git.enableSmartCommit" = true; + # Explorer settings + "explorer.confirmDelete" = false; + "explorer.confirmDragAndDrop" = false; + # Diff editor settings + "diffEditor.ignoreTrimWhitespace" = false; + "diffEditor.wordWrap" = "off"; + # Zen mode settings + "zenMode.centerLayout" = false; + "zenMode.hideActivityBar" = false; + "zenMode.hideLineNumbers" = false; + # Language specific settings + "[typescript]" = { + "editor.defaultFormatter" = "esbenp.prettier-vscode"; + }; + "[vue]" = { + "editor.defaultFormatter" = "esbenp.prettier-vscode"; + }; + "[jsonc]" = { + "editor.defaultFormatter" = "vscode.json-language-features"; + }; + "[json]" = { + "editor.defaultFormatter" = "vscode.json-language-features"; + }; + "[python]" = { + "editor.tabSize" = 4; + }; + # File associations + "files.associations" = { + "*.html" = "html"; + "*.txt" = "plaintext"; + }; + # JavaScript/TypeScript settings + "javascript.updateImportsOnFileMove.enabled" = "always"; + "typescript.updateImportsOnFileMove.enabled" = "always"; + # Python settings + "python.linting.pylintEnabled" = false; + "python.linting.flake8Enabled" = true; + "python.linting.flake8Args" = [ + "--line-width=119" + "--ignore=T000;E501;E265;E266;N802;D;Q;W504" + "--exclude=migrations;mocks" + ]; + "python.linting.enabled" = true; + "python.formatting.provider" = "yapf"; + "python.formatting.yapfArgs" = [ + "--style={based_on_style = pep8; column_limit = 119; dedent_closing_brackets = true; split_before_first_argument = true; coalesce_brackets = false; split_before_dict_set_generator = false; allow_split_before_dict_value = false; split_all_comma_separated_values = false; split_before_arithmetic_operator = false; split_before_logical_operator = false; split_before_named_assigns = false}" + ]; + "python.languageServer" = "Jedi"; + "python.jediMemoryLimit" = 1024; + "python.jedi.hover.enable" = true; + "python.jedi.hover.detailed" = false; + "python.jedi.hover.signature" = true; + "python.analysis.completeFunctionParens" = true; + "editor.hover.enabled" = true; + # Vue settings + "vue.codeActions.enabled" = false; + "vue.format.script.initialIndent" = true; + "vue.format.style.initialIndent" = true; + "vue.splitEditors.icon" = true; + "vue.splitEditors.layout.left" = [ + "script" + "scriptSetup" + ]; + "vue.splitEditors.layout.right" = [ + "template" + "customBlocks" + "style" + ]; + "vetur.ignoreProjectWarning" = true; + "vetur.languageFeatures.codeActions" = false; + "vetur.useWorkspaceDependencies" = true; + "prettier.vueIndentScriptAndStyle" = true; + # // Nuxt settings + "nuxtr.defaultPackageManager" = "Bun"; + "nuxtr.monorepoMode.DirectoryName" = ""; + "nuxtr.openItemsAfterCreation" = true; + "nuxtr.piniaFiles.defaultTemplate" = "setup"; + "nuxtr.vueFiles.firstTag" = "script"; + "nuxtr.vueFiles.style.defaultLanguage" = "postcss"; + # CSS/Tailwind settings + "tailwindCSS.emmetCompletions" = true; + # Syntax highlighting and appearance + "indentRainbow.colorOnWhiteSpaceOnly" = true; + "indentRainbow.indicatorStyle" = "light"; + "indentRainbow.lightIndicatorStyleLineWidth" = 4; + # Spelling and language + "cSpell.language" = "en;pl"; + "cSpell.userWords" = [ + "garand" + "Garand's" + "garandplg" + "garands" + "lockb" + "Shadcn" + "Vite" + ]; + # Navigation and intellisense + "editor.gotoLocation.multipleDefinitions" = "goto"; + "path-intellisense.extensionOnImport" = true; + # Markdown settings + "markdown-preview-enhanced.previewTheme" = "one-dark.css"; + # Extension specific settings + "supermaven.allowGitignore" = true; + "supermaven.enable" = { + "*" = true; + }; + "continue.enableTabAutocomplete" = false; + "continue.showInlineTip" = false; + "continue.telemetryEnabled" = false; + "hediet.vscode-drawio.resizeImages" = null; + "todo-tree.highlights.useColourScheme" = true; + "vite.autoStart" = false; + # Security and trust + "security.workspace.trust.untrustedFiles" = "open"; + # Remote development + "remote.autoForwardPortsSource" = "hybrid"; + "[plaintext]" = { + "editor.unicodeHighlight.ambiguousCharacters" = false; + "editor.unicodeHighlight.invisibleCharacters" = false; + }; + "python.diagnostics.sourceMapsEnabled" = true; + "vsintellicode.modify.editor.suggestSelection" = "automaticallyOverrodeDefaultValue"; + "githubLocalActions.workflowsDirectory" = ".gitea/workflows"; + "errorLens.excludeBySource" = [ + "cSpell" + ]; + }; +} diff --git a/modules/home/xdg.nix b/modules/home/xdg.nix deleted file mode 100644 index fe94050..0000000 --- a/modules/home/xdg.nix +++ /dev/null @@ -1,118 +0,0 @@ -{ - pkgs, - config, - ... -}: let - messengerIcon = pkgs.fetchurl { - url = "https://assets.stickpng.com/images/580b57fcd9996e24bc43c526.png"; - sha256 = "sha256-mQ7TAsLIWLZhun1DrJFgLkkwpqvWujhGT6Ig8Rf6vbc="; - }; - mastodonIcon = pkgs.fetchurl { - url = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Mastodon_logotype_%28simple%29_new_hue.svg/1200px-Mastodon_logotype_%28simple%29_new_hue.svg.png"; - sha256 = "sha256-y31Pkl4iExgiM4yZ64t/elA7FYZM1daGQIvYzJdmWhw="; - }; - nextcloudIcon = pkgs.fetchurl { - url = "https://cdn.freelogovectors.net/wp-content/uploads/2020/02/nextcloud-logo.png"; - sha256 = "sha256-vbe3Jz6oNCUlhK81LGlDDFbo6xpUXiDio40bYqJ4lf4="; - }; - chatgptIcon = pkgs.fetchurl { - url = "https://static.vecteezy.com/system/resources/previews/031/110/149/large_2x/chatgpt-logo-transparent-free-png.png"; - sha256 = "sha256-ZWmhchblQkksW02eduVrkUSPAlWPGC2fjqxrAGAF5jw="; - }; - claudeIcon = pkgs.fetchurl { - url = "https://registry.npmmirror.com/@lobehub/icons-static-png/1.65.0/files/dark/claude-color.png"; - sha256 = "sha256-wmYmbmT2/bR4JrnZJu2stjRZm//O5TB9EPE2NQWdGkQ="; - }; - glanceIcon = pkgs.fetchurl { - url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/glance.png"; - sha256 = "sha256-xyFlmPpt+DABoGX5oBqj/aQVdxtmNflat9Jb2BE7SOY="; - }; - microsoftTeamsIcon = pkgs.fetchurl { - url = "https://i.pinimg.com/236x/e6/b6/28/e6b628706696320cd0ede93f7053abd8.jpg"; - sha256 = "sha256-bZVmoWHeG8rycS8lj7LQaxFggXINjUx/7NWKPVhPTFw="; - }; -in { - xdg = { - enable = true; - mime.enable = true; - mimeApps.enable = true; - portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-hyprland - xdg-desktop-portal-gtk - kdePackages.xdg-desktop-portal-kde - ]; - configPackages = [config.wayland.windowManager.hyprland.package]; - config = { - common.default = "*"; - hyprland = { - default = [ - "hyprland" - "gtk" - ]; - "org.freedesktop.impl.portal.FileChooser" = "kde"; - "org.freedesktop.impl.portal.Print" = "kde"; - }; - }; - }; - desktopEntries = { - "messenger" = { - name = "Messenger"; - genericName = "Messenger"; - exec = "chromium --profile-directory=Default --app=https://www.messenger.com/"; - icon = "${messengerIcon}"; - terminal = false; - type = "Application"; - }; - "mastodon" = { - name = "Mastodon"; - genericName = "Mastodon"; - exec = "chromium --profile-directory=Default --app=https://metalhead.club/"; - icon = "${mastodonIcon}"; - terminal = false; - type = "Application"; - }; - "garandcloud" = { - name = "GarandCloud"; - genericName = "Nextcloud"; - exec = "chromium --profile-directory=Default --app=https://nextcloud.garandplg.com/"; - icon = "${nextcloudIcon}"; - terminal = false; - type = "Application"; - }; - "chatgpt" = { - name = "ChatGPT"; - genericName = "ChatGPT"; - exec = "chromium --profile-directory=Default --app=https://chatgpt.com/"; - icon = "${chatgptIcon}"; - terminal = false; - type = "Application"; - }; - "claude" = { - name = "Claude"; - genericName = "Claude"; - exec = "chromium --profile-directory=Default --app=https://claude.ai/"; - icon = "${claudeIcon}"; - terminal = false; - type = "Application"; - }; - "glance" = { - name = "Glance"; - genericName = "Glance"; - exec = "chromium --profile-directory=Default --app=https://glance.garandplg.com/"; - icon = "${glanceIcon}"; - terminal = false; - type = "Application"; - }; - "microsoftTeams" = { - name = "Microsoft Teams"; - genericName = "Microsoft Teams"; - exec = "chromium --profile-directory=Default --app=https://teams.microsoft.com/v2/"; - icon = "${microsoftTeamsIcon}"; - terminal = false; - type = "Application"; - }; - }; - }; -} diff --git a/modules/home/xdg/default.nix b/modules/home/xdg/default.nix new file mode 100644 index 0000000..900a78e --- /dev/null +++ b/modules/home/xdg/default.nix @@ -0,0 +1,12 @@ +_: { + xdg = { + enable = true; + mime.enable = true; + mimeApps.enable = true; + }; + + imports = [ + ./desktop-entries.nix + ./portal.nix + ]; +} diff --git a/modules/home/xdg/desktop-entries.nix b/modules/home/xdg/desktop-entries.nix new file mode 100644 index 0000000..2b6be0b --- /dev/null +++ b/modules/home/xdg/desktop-entries.nix @@ -0,0 +1,74 @@ +{pkgs, ...}: let + fetchIcon = url: sha256: + pkgs.fetchurl { + inherit url sha256; + }; + + makeEntry = app: { + name = app.displayName; + genericName = app.genericName or app.displayName; + exec = "chromium --profile-directory=Default --app=${app.url}"; + icon = "${fetchIcon app.iconUrl app.iconSha}"; + terminal = false; + type = "Application"; + }; + + apps = [ + { + name = "messenger"; + displayName = "Messenger"; + url = "https://www.messenger.com/"; + iconUrl = "https://assets.stickpng.com/images/580b57fcd9996e24bc43c526.png"; + iconSha = "sha256-mQ7TAsLIWLZhun1DrJFgLkkwpqvWujhGT6Ig8Rf6vbc="; + } + { + name = "mastodon"; + displayName = "Mastodon"; + url = "https://metalhead.club/"; + iconUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Mastodon_logotype_%28simple%29_new_hue.svg/1200px-Mastodon_logotype_%28simple%29_new_hue.svg.png"; + iconSha = "sha256-y31Pkl4iExgiM4yZ64t/elA7FYZM1daGQIvYzJdmWhw="; + } + { + name = "garandcloud"; + displayName = "GarandCloud"; + genericName = "Nextcloud"; + url = "https://nextcloud.garandplg.com/"; + iconUrl = "https://cdn.freelogovectors.net/wp-content/uploads/2020/02/nextcloud-logo.png"; + iconSha = "sha256-vbe3Jz6oNCUlhK81LGlDDFbo6xpUXiDio40bYqJ4lf4="; + } + { + name = "chatgpt"; + displayName = "ChatGPT"; + url = "https://chatgpt.com/"; + iconUrl = "https://static.vecteezy.com/system/resources/previews/031/110/149/large_2x/chatgpt-logo-transparent-free-png.png"; + iconSha = "sha256-ZWmhchblQkksW02eduVrkUSPAlWPGC2fjqxrAGAF5jw="; + } + { + name = "claude"; + displayName = "Claude"; + url = "https://claude.ai/"; + iconUrl = "https://registry.npmmirror.com/@lobehub/icons-static-png/1.65.0/files/dark/claude-color.png"; + iconSha = "sha256-wmYmbmT2/bR4JrnZJu2stjRZm//O5TB9EPE2NQWdGkQ="; + } + { + name = "glance"; + displayName = "Glance"; + url = "https://glance.garandplg.com/"; + iconUrl = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/glance.png"; + iconSha = "sha256-xyFlmPpt+DABoGX5oBqj/aQVdxtmNflat9Jb2BE7SOY="; + } + { + name = "microsoftTeams"; + displayName = "Microsoft Teams"; + url = "https://teams.microsoft.com/v2/"; + iconUrl = "https://i.pinimg.com/236x/e6/b6/28/e6b628706696320cd0ede93f7053abd8.jpg"; + iconSha = "sha256-bZVmoWHeG8rycS8lj7LQaxFggXINjUx/7NWKPVhPTFw="; + } + ]; +in { + xdg.desktopEntries = builtins.listToAttrs (builtins.map (app: { + name = app.name; + value = makeEntry app; + }) + apps); +} diff --git a/modules/home/xdg/portal.nix b/modules/home/xdg/portal.nix new file mode 100644 index 0000000..39e348c --- /dev/null +++ b/modules/home/xdg/portal.nix @@ -0,0 +1,26 @@ +{ + pkgs, + config, + ... +}: { + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-hyprland + xdg-desktop-portal-gtk + kdePackages.xdg-desktop-portal-kde + ]; + configPackages = [config.wayland.windowManager.hyprland.package]; + config = { + common.default = "*"; + hyprland = { + default = [ + "hyprland" + "gtk" + ]; + "org.freedesktop.impl.portal.FileChooser" = "kde"; + "org.freedesktop.impl.portal.Print" = "kde"; + }; + }; + }; +} diff --git a/modules/home/zed.nix b/modules/home/zed.nix deleted file mode 100644 index b7024dc..0000000 --- a/modules/home/zed.nix +++ /dev/null @@ -1,205 +0,0 @@ -{ - pkgs, - lib, - username, - host, - ... -}: { - programs.zed-editor = { - enable = true; - package = pkgs.zed-editor; - installRemoteServer = true; - - extensions = [ - "toml" - "dockerfile" - "git-firefly" - "vue" - "astro" - "docker-compose" - "nix" - "csv" - "rainbow-csv" - "vscode-icons" - "codebook" - "python-requirements" - "one-dark-pro-monokai-darker" - "hyprlang" - "json5" - "html-jinja" - "deputy" - "biome" - "opencode" - ]; - - extraPackages = with pkgs; [ - biome - rust-analyzer - nixd - alejandra - opencode - ]; - - userSettings = { - agent = { - always_allow_tool_actions = true; - default_profile = "ask"; - default_model = { - provider = "Cerebras"; - model = "gpt-oss-120b"; - }; - }; - language_models = { - openai_compatible = { - Cerebras = { - api_url = "https://api.cerebras.ai/v1"; - available_models = [ - { - name = "qwen-3-235b-a22b-instruct-2507"; - display_name = "Qwen 3 235B Instruct"; - max_tokens = 65000; - max_output_tokens = 32000; - capabilities = { - tools = true; - images = true; - parallel_tool_calls = true; - prompt_cache_key = false; - }; - } - { - name = "llama-3.3-70b"; - display_name = "Llama 3.3 70B"; - max_tokens = 65000; - max_output_tokens = 8000; - capabilities = { - tools = true; - images = true; - parallel_tool_calls = true; - prompt_cache_key = true; - }; - } - { - name = "gpt-oss-120b"; - display_name = "OpenAI GPT OSS"; - max_tokens = 65000; - max_output_tokens = 32000; - capabilities = { - tools = true; - images = true; - parallel_tool_calls = true; - prompt_cache_key = false; - }; - } - ]; - }; - }; - }; - telemetry = { - diagnostics = false; - metrics = false; - }; - icon_theme = "VSCode Icons for Zed (Dark)"; - ui_font_size = 16; - buffer_font_size = 15; - theme = { - mode = "dark"; - light = "One Light"; - dark = "One Dark Pro Monokai Darker"; - }; - diagnostics.inline = { - enabled = true; - max_severity = "error"; - }; - lsp = { - rust-analyzer = { - binary = { - path = lib.getExe pkgs.bash; - arguments = [ - "-c" - "if [ -e flake.nix ]; then nix develop --command rust-analyzer; else rust-analyzer; fi" - ]; - }; - }; - nixd = { - initialization_options.formatting.command = [ - "alejandra" - "--quiet" - "--" - ]; - settings = { - nixpkgs.expr = "import { }"; - formatting.command = ["alejandra"]; - options = { - nixos.expr = "(builtins.getFlake (builtins.toString \"/home/${username}/garandos\")).nixosConfigurations.\"${host}\".options"; - home-manager.expr = "(builtins.getFlake (builtins.toString \"/home/${username}/garandos\")).nixosConfigurations.\"${host}\".options.home-manager.users.type.getSubOptions []"; - }; - }; - }; - }; - languages = { - Nix.language_servers = [ - "nixd" - "!nil" - ]; - Python.language_servers = ["!basedpyright"]; - YAML.tab_size = 2; - JavaScript = { - formatter.language_server.name = "biome"; - code_actions_on_format = { - "source.fixAll.biome" = true; - "source.organizeImports.biome" = true; - }; - tab_size = 2; - }; - TypeScript = { - formatter.language_server.name = "biome"; - code_actions_on_format = { - "source.fixAll.biome" = true; - "source.organizeImports.biome" = true; - }; - tab_size = 2; - }; - Astro = { - formatter.language_server.name = "biome"; - code_actions_on_format = { - "source.fixAll.biome" = true; - "source.organizeImports.biome" = true; - }; - tab_size = 2; - }; - "Vue.js" = { - formatter.language_server.name = "biome"; - code_actions_on_format = { - "source.fixAll.biome" = true; - "source.organizeImports.biome" = true; - }; - tab_size = 2; - }; - JSON = { - formatter.language_server.name = "biome"; - code_actions_on_format = { - "source.fixAll.biome" = true; - "source.organizeImports.biome" = true; - }; - tab_size = 2; - }; - JSONC = { - formatter.language_server.name = "biome"; - code_actions_on_format = { - "source.fixAll.biome" = true; - "source.organizeImports.biome" = true; - }; - tab_size = 2; - }; - CSS = { - formatter.language_server.name = "biome"; - code_actions_on_format = { - "source.fixAll.biome" = true; - "source.organizeImports.biome" = true; - }; - tab_size = 2; - }; - }; - }; - }; -} diff --git a/modules/home/zed/default.nix b/modules/home/zed/default.nix new file mode 100644 index 0000000..0853e68 --- /dev/null +++ b/modules/home/zed/default.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + programs.zed-editor = { + enable = true; + package = pkgs.zed-editor; + installRemoteServer = true; + }; + imports = [ + ./user-settings + ./extensions.nix + ./extra-packages.nix + ]; +} diff --git a/modules/home/zed/extensions.nix b/modules/home/zed/extensions.nix new file mode 100644 index 0000000..b94c956 --- /dev/null +++ b/modules/home/zed/extensions.nix @@ -0,0 +1,23 @@ +_: { + programs.zed-editor.extensions = [ + "toml" + "dockerfile" + "git-firefly" + "vue" + "astro" + "docker-compose" + "nix" + "csv" + "rainbow-csv" + "vscode-icons" + "codebook" + "python-requirements" + "one-dark-pro-monokai-darker" + "hyprlang" + "json5" + "html-jinja" + "deputy" + "biome" + "opencode" + ]; +} diff --git a/modules/home/zed/extra-packages.nix b/modules/home/zed/extra-packages.nix new file mode 100644 index 0000000..6268a1a --- /dev/null +++ b/modules/home/zed/extra-packages.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + programs.zed-editor.extraPackages = with pkgs; [ + biome + rust-analyzer + nixd + alejandra + opencode + ]; +} diff --git a/modules/home/zed/user-settings/agent.nix b/modules/home/zed/user-settings/agent.nix new file mode 100644 index 0000000..0e8c1a9 --- /dev/null +++ b/modules/home/zed/user-settings/agent.nix @@ -0,0 +1,10 @@ +_: { + programs.zed-editor.userSettings.agent = { + always_allow_tool_actions = true; + default_profile = "ask"; + default_model = { + provider = "Cerebras"; + model = "gpt-oss-120b"; + }; + }; +} diff --git a/modules/home/zed/user-settings/default.nix b/modules/home/zed/user-settings/default.nix new file mode 100644 index 0000000..19a822f --- /dev/null +++ b/modules/home/zed/user-settings/default.nix @@ -0,0 +1,27 @@ +_: { + programs.zed-editor.userSettings = { + telemetry = { + diagnostics = false; + metrics = false; + }; + icon_theme = "VSCode Icons for Zed (Dark)"; + ui_font_size = 16; + buffer_font_size = 15; + theme = { + mode = "dark"; + light = "One Light"; + dark = "One Dark Pro Monokai Darker"; + }; + diagnostics.inline = { + enabled = true; + max_severity = "error"; + }; + }; + + imports = [ + ./agent.nix + ./language-models.nix + ./languages.nix + ./lsp.nix + ]; +} diff --git a/modules/home/zed/user-settings/language-models.nix b/modules/home/zed/user-settings/language-models.nix new file mode 100644 index 0000000..666a11a --- /dev/null +++ b/modules/home/zed/user-settings/language-models.nix @@ -0,0 +1,43 @@ +_: { + programs.zed-editor.userSettings.language_models.openai_compatible."Cerebras" = { + api_url = "https://api.cerebras.ai/v1"; + available_models = [ + { + name = "qwen-3-235b-a22b-instruct-2507"; + display_name = "Qwen 3 235B Instruct"; + max_tokens = 65000; + max_output_tokens = 32000; + capabilities = { + tools = true; + images = true; + parallel_tool_calls = true; + prompt_cache_key = false; + }; + } + { + name = "llama-3.3-70b"; + display_name = "Llama 3.3 70B"; + max_tokens = 65000; + max_output_tokens = 8000; + capabilities = { + tools = true; + images = true; + parallel_tool_calls = true; + prompt_cache_key = true; + }; + } + { + name = "gpt-oss-120b"; + display_name = "OpenAI GPT OSS"; + max_tokens = 65000; + max_output_tokens = 32000; + capabilities = { + tools = true; + images = true; + parallel_tool_calls = true; + prompt_cache_key = false; + }; + } + ]; + }; +} diff --git a/modules/home/zed/user-settings/languages.nix b/modules/home/zed/user-settings/languages.nix new file mode 100644 index 0000000..a9a2e78 --- /dev/null +++ b/modules/home/zed/user-settings/languages.nix @@ -0,0 +1,66 @@ +_: { + programs.zed-editor.userSettings.languages = { + Nix.language_servers = [ + "nixd" + "!nil" + ]; + Python.language_servers = ["!basedpyright"]; + YAML.tab_size = 2; + JavaScript = { + formatter.language_server.name = "biome"; + code_actions_on_format = { + "source.fixAll.biome" = true; + "source.organizeImports.biome" = true; + }; + tab_size = 2; + }; + TypeScript = { + formatter.language_server.name = "biome"; + code_actions_on_format = { + "source.fixAll.biome" = true; + "source.organizeImports.biome" = true; + }; + tab_size = 2; + }; + Astro = { + formatter.language_server.name = "biome"; + code_actions_on_format = { + "source.fixAll.biome" = true; + "source.organizeImports.biome" = true; + }; + tab_size = 2; + }; + "Vue.js" = { + formatter.language_server.name = "biome"; + code_actions_on_format = { + "source.fixAll.biome" = true; + "source.organizeImports.biome" = true; + }; + tab_size = 2; + }; + JSON = { + formatter.language_server.name = "biome"; + code_actions_on_format = { + "source.fixAll.biome" = true; + "source.organizeImports.biome" = true; + }; + tab_size = 2; + }; + JSONC = { + formatter.language_server.name = "biome"; + code_actions_on_format = { + "source.fixAll.biome" = true; + "source.organizeImports.biome" = true; + }; + tab_size = 2; + }; + CSS = { + formatter.language_server.name = "biome"; + code_actions_on_format = { + "source.fixAll.biome" = true; + "source.organizeImports.biome" = true; + }; + tab_size = 2; + }; + }; +} diff --git a/modules/home/zed/user-settings/lsp.nix b/modules/home/zed/user-settings/lsp.nix new file mode 100644 index 0000000..78e49f7 --- /dev/null +++ b/modules/home/zed/user-settings/lsp.nix @@ -0,0 +1,34 @@ +{ + pkgs, + lib, + username, + host, + ... +}: { + programs.zed-editor.userSettings.lsp = { + rust-analyzer = { + binary = { + path = lib.getExe pkgs.bash; + arguments = [ + "-c" + "if [ -e flake.nix ]; then nix develop --command rust-analyzer; else rust-analyzer; fi" + ]; + }; + }; + nixd = { + initialization_options.formatting.command = [ + "alejandra" + "--quiet" + "--" + ]; + settings = { + nixpkgs.expr = "import { }"; + formatting.command = ["alejandra"]; + options = { + nixos.expr = "(builtins.getFlake (builtins.toString \"/home/${username}/garandos\")).nixosConfigurations.\"${host}\".options"; + home-manager.expr = "(builtins.getFlake (builtins.toString \"/home/${username}/garandos\")).nixosConfigurations.\"${host}\".options.home-manager.users.type.getSubOptions []"; + }; + }; + }; + }; +}