From b3c38546287256b3d4928632ea7af96d5a5f7c27 Mon Sep 17 00:00:00 2001 From: itamar Date: Thu, 16 Apr 2026 19:11:20 +0300 Subject: [PATCH] move to mullvad browser, font changes etc etc --- navi/configuration.nix | 91 +++++--- navi/flake.lock | 71 ------ navi/flake.nix | 23 -- navi/hardware-configuration.nix | 8 +- navi/navi/audio.nix | 2 + navi/navi/bash.nix | 274 ---------------------- navi/navi/browser.nix | 403 -------------------------------- navi/navi/default.nix | 9 - navi/navi/editors.nix | 33 +-- navi/navi/emacs.d/init.el | 342 +++++++++++++++++++++++++++ navi/navi/emacs.nix | 46 ---- navi/navi/fonts.nix | 2 +- navi/navi/git.nix | 4 +- navi/navi/i3.nix | 287 ++--------------------- navi/navi/keyboard.nix | 60 ----- navi/navi/messaging.nix | 3 +- navi/navi/multimedia.nix | 4 +- navi/navi/packages.nix | 11 +- navi/navi/polybar.nix | 180 -------------- navi/navi/terminal.nix | 51 +--- 20 files changed, 455 insertions(+), 1449 deletions(-) delete mode 100644 navi/flake.lock delete mode 100644 navi/flake.nix delete mode 100644 navi/navi/bash.nix delete mode 100644 navi/navi/browser.nix delete mode 100644 navi/navi/emacs.nix delete mode 100644 navi/navi/keyboard.nix delete mode 100644 navi/navi/polybar.nix diff --git a/navi/configuration.nix b/navi/configuration.nix index 3cd66ae..0799862 100644 --- a/navi/configuration.nix +++ b/navi/configuration.nix @@ -1,56 +1,81 @@ -{ config, pkgs, firefox-addons, ... }: +{ config, pkgs, ... }: { - imports = [ - ./hardware-configuration.nix - ]; + imports = + [ + ./hardware-configuration.nix + + ]; + + nixpkgs.config = { + allowUnfree = true; + permittedInsecurePackages = [ + "olm-3.2.16" + ]; + }; + + # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - programs.dconf.enable = true; + networking.hostName = "navi"; networking.networkmanager.enable = true; + time.timeZone = "Asia/Jerusalem"; + i18n.defaultLocale = "en_IL"; i18n.extraLocaleSettings = { - LC_ADDRESS = "he_IL.UTF-8"; + LC_ADDRESS = "he_IL.UTF-8"; LC_IDENTIFICATION = "he_IL.UTF-8"; - LC_MEASUREMENT = "he_IL.UTF-8"; - LC_MONETARY = "he_IL.UTF-8"; - LC_NAME = "he_IL.UTF-8"; - LC_NUMERIC = "he_IL.UTF-8"; - LC_PAPER = "he_IL.UTF-8"; - LC_TELEPHONE = "he_IL.UTF-8"; - LC_TIME = "he_IL.UTF-8"; + LC_MEASUREMENT = "he_IL.UTF-8"; + LC_MONETARY = "he_IL.UTF-8"; + LC_NAME = "he_IL.UTF-8"; + LC_NUMERIC = "he_IL.UTF-8"; + LC_PAPER = "he_IL.UTF-8"; + LC_TELEPHONE = "he_IL.UTF-8"; + LC_TIME = "he_IL.UTF-8"; }; - services.xserver = { - enable = true; - windowManager.i3.enable = true; - displayManager.lightdm.enable = true; - xkb = { - layout = "us"; - variant = ""; - }; + + services.xserver.enable = true; + services.xserver.displayManager.lightdm.enable = true; + services.xserver.desktopManager.xfce.enable = false; + services.xserver.windowManager.i3.enable = true; + services.xserver.xkb = { + layout = "us,il"; + options = "grp:alt_shift_toggle"; + variant = ""; }; - security.rtkit.enable = true; + + services.printing.enable = true; + services.pulseaudio.enable = false; + security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; }; - services.printing.enable = true; - users.users.laniakea = { + + users.users.star = { isNormalUser = true; - description = "laniakea"; + description = "star"; extraGroups = [ "networkmanager" "wheel" ]; }; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = { inherit firefox-addons; }; - users.laniakea = import ./navi/default.nix; + + environment.systemPackages = with pkgs; [ + wget vim git + ]; + services.mullvad-vpn = { + enable = true; + package = pkgs.mullvad-vpn; }; - - nixpkgs.config.allowUnfree = true; - environment.systemPackages = with pkgs; [ git ]; + virtualisation.vmware.host.enable = true; + programs.firefox.enable = true; + + # Home Manager + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.star = import ./navi; + + system.stateVersion = "25.11"; } diff --git a/navi/flake.lock b/navi/flake.lock deleted file mode 100644 index e0f1ea5..0000000 --- a/navi/flake.lock +++ /dev/null @@ -1,71 +0,0 @@ -{ - "nodes": { - "firefox-addons": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "dir": "pkgs/firefox-addons", - "lastModified": 1775793785, - "narHash": "sha256-lLJpttuuF9sbmwM7GuNJ2/mKVqbim4Wla3rl/eMjAZo=", - "owner": "rycee", - "repo": "nur-expressions", - "rev": "65415051e904355712fc63e7a0bd14f20eddbe28", - "type": "gitlab" - }, - "original": { - "dir": "pkgs/firefox-addons", - "owner": "rycee", - "repo": "nur-expressions", - "type": "gitlab" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1775781825, - "narHash": "sha256-L5yKTpR+alrZU2XYYvIxCeCP4LBHU5jhwSj7H1VAavg=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "e35c39fca04fee829cecdf839a50eb9b54d8a701", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1775710090, - "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4c1018dae018162ec878d42fec712642d214fdfa", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "firefox-addons": "firefox-addons", - "home-manager": "home-manager", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/navi/flake.nix b/navi/flake.nix deleted file mode 100644 index ee08e55..0000000 --- a/navi/flake.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - firefox-addons = { - url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - outputs = { self, nixpkgs, home-manager, firefox-addons, ... }: { - nixosConfigurations.navi = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit firefox-addons; }; - modules = [ - home-manager.nixosModules.home-manager - ./configuration.nix - ]; - }; - }; -} diff --git a/navi/hardware-configuration.nix b/navi/hardware-configuration.nix index 4e0cd19..e455636 100644 --- a/navi/hardware-configuration.nix +++ b/navi/hardware-configuration.nix @@ -8,18 +8,20 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/3fd6b3e1-e237-4c9f-9f9a-37ee711114fe"; + { device = "/dev/mapper/luks-08fc7af7-3621-4c2d-b1ad-ad598e59d8c2"; fsType = "ext4"; }; + boot.initrd.luks.devices."luks-08fc7af7-3621-4c2d-b1ad-ad598e59d8c2".device = "/dev/disk/by-uuid/08fc7af7-3621-4c2d-b1ad-ad598e59d8c2"; + fileSystems."/boot" = - { device = "/dev/disk/by-uuid/AE26-3C10"; + { device = "/dev/disk/by-uuid/002B-2CB0"; fsType = "vfat"; options = [ "fmask=0077" "dmask=0077" ]; }; diff --git a/navi/navi/audio.nix b/navi/navi/audio.nix index d7c1839..a01cf4b 100644 --- a/navi/navi/audio.nix +++ b/navi/navi/audio.nix @@ -5,5 +5,7 @@ pavucontrol milkytracker rtmidi + vcv-rack + mixxx ]; } diff --git a/navi/navi/bash.nix b/navi/navi/bash.nix deleted file mode 100644 index 638876d..0000000 --- a/navi/navi/bash.nix +++ /dev/null @@ -1,274 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - home.packages = with pkgs; [ - eza - bat - fd - ripgrep - fzf - zoxide - delta - grc - ]; - - programs.bash = { - enable = true; - - historyControl = [ "ignoredups" "erasedups" ]; - historySize = 100000; - historyFileSize = 100000; - - shellOptions = [ - "autocd" - "cdspell" - "checkwinsize" - "globstar" - "histappend" - ]; - - sessionVariables = { - BAT_THEME = "Nord"; - FZF_DEFAULT_OPTS = lib.concatStringsSep " " [ - "--color=bg+:#3B4252,bg:#2E3440,spinner:#81A1C1,hl:#616E88" - "--color=fg:#D8DEE9,header:#616E88,info:#81A1C1,pointer:#81A1C1" - "--color=marker:#81A1C1,fg+:#D8DEE9,prompt:#81A1C1,hl+:#81A1C1" - "--layout=reverse --border=rounded --prompt='❄ '" - ]; - - FZF_DEFAULT_COMMAND = "fd --type f --hidden --follow --exclude .git"; - - EDITOR = "nvim"; - VISUAL = "nvim"; - PAGER = "bat --style=plain"; - }; - - shellAliases = { - ".." = "cd .."; - "..." = "cd ../.."; - "...." = "cd ../../.."; - - ls = "eza --icons --group-directories-first"; - ll = "eza --icons --group-directories-first -l --git"; - la = "eza --icons --group-directories-first -la --git"; - lt = "eza --icons --tree --level=2"; - lta = "eza --icons --tree --level=2 -a"; - - cat = "bat --style=plain"; - catn = "bat"; - grep = "rg --color=auto"; - find = "fd"; - g = "git"; - gs = "git status -sb"; - gl = "git log --oneline --graph --decorate"; - gd = "git diff"; - gds = "git diff --staged"; - gco = "git checkout"; - gb = "git branch"; - gp = "git push"; - gpl = "git pull"; - v = "nvim"; - vi = "nvim"; - vim = "nvim"; - clr = "clear"; - path = ''echo "$PATH" | tr ':' '\n' | bat --language=sh --style=plain''; - reload = "source ~/.bashrc"; - }; - - initExtra = '' - eval "$(zoxide init bash)" - alias cd='z' - - eval "$(fzf --bash)" - export MANPAGER="sh -c 'col -bx | bat -l man -p'" - export MANROFFOPT="-c" - - export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - mkcd() { mkdir -p "$1" && cd "$1"; } - - fcd() { - local dir - dir=$(fd --type d --hidden --follow --exclude .git | \ - fzf --preview 'eza --icons --tree --level=1 {}') && cd "$dir" - } - - fv() { - local file - file=$(fzf --preview 'bat --color=always --style=numbers {}') && nvim "$file" - } - - # extract — universal archive extractor - extract() { - case "$1" in - *.tar.bz2) tar xjf "$1" ;; - *.tar.gz) tar xzf "$1" ;; - *.tar.xz) tar xJf "$1" ;; - *.tar.zst) tar --zstd -xf "$1" ;; - *.bz2) bunzip2 "$1" ;; - *.gz) gunzip "$1" ;; - *.zip) unzip "$1" ;; - *.7z) 7z x "$1" ;; - *.rar) unrar x "$1" ;; - *) echo "extract: '$1' — unknown archive format" ;; - esac - } - ''; - }; - - programs.starship = { - enable = true; - enableBashIntegration = true; - - settings = { - format = lib.concatStrings [ - "[╭─](fg:#4C566A)" - "$os" - "$username" - "$hostname" - "$directory" - "$git_branch" - "$git_state" - "$git_status" - "$nix_shell" - "$python" - "$nodejs" - "$rust" - "$golang" - "$cmd_duration" - "\n" - "[╰─](fg:#4C566A)" - "$character" - ]; - - character = { - success_symbol = "[❄](bold fg:#88C0D0)"; - error_symbol = "[✗](bold fg:#BF616A)"; - vicmd_symbol = "[](bold fg:#A3BE8C)"; - }; - - os = { - disabled = false; - style = "fg:#81A1C1"; - symbols = { - NixOS = " "; - Linux = " "; - Macos = " "; - Windows = " "; - }; - }; - - username = { - show_always = false; - style_user = "bold fg:#D8DEE9"; - style_root = "bold fg:#BF616A"; - format = "[$user]($style) "; - }; - hostname = { - ssh_only = true; - style = "bold fg:#81A1C1"; - format = "[@$hostname]($style) "; - }; - - directory = { - style = "bold fg:#88C0D0"; - read_only = " 󰌾"; - read_only_style = "fg:#BF616A"; - truncation_length = 4; - truncate_to_repo = true; - format = "[ 󰉋 $path]($style)[$read_only]($read_only_style) "; - substitutions = { - "~" = "󰋜 "; - }; - }; - - git_branch = { - symbol = " "; - style = "fg:#A3BE8C"; - format = "[on $symbol$branch]($style) "; - }; - - git_status = { - style = "fg:#EBCB8B"; - format = "([$all_status$ahead_behind]($style) )"; - ahead = "⇡\${count}"; - behind = "⇣\${count}"; - diverged = "⇕⇡\${ahead_count}⇣\${behind_count}"; - modified = "!"; - staged = "+"; - untracked = "?"; - deleted = "✘"; - }; - - git_state = { - style = "fg:#D08770"; - format = "[$state( $progress_current/$progress_total)]($style) "; - }; - - nix_shell = { - disabled = false; - style = "fg:#81A1C1"; - symbol = " "; - format = "[$symbol$state( \\($name\\))]($style) "; - impure_msg = "impure"; - pure_msg = "pure"; - }; - - cmd_duration = { - min_time = 2000; - style = "fg:#EBCB8B"; - format = "[⏱ $duration]($style) "; - show_notifications = false; - }; - - python = { - symbol = " "; - style = "fg:#EBCB8B"; - format = "[$symbol$pyenv_prefix($version)(\\($virtualenv\\))]($style) "; - }; - - nodejs = { - symbol = " "; - style = "fg:#A3BE8C"; - format = "[$symbol$version]($style) "; - }; - - rust = { - symbol = " "; - style = "fg:#D08770"; - format = "[$symbol$version]($style) "; - }; - - golang = { - symbol = " "; - style = "fg:#88C0D0"; - format = "[$symbol$version]($style) "; - }; - }; - }; - - programs.git = { - enable = true; - extraConfig = { - core.pager = "delta"; - interactive.diffFilter = "delta --color-only"; - delta = { - navigate = true; - light = false; - line-numbers = true; - syntax-theme = "Nord"; - plus-style = "syntax #2d3f2d"; - plus-emph-style = "syntax #3c5c3c"; - minus-style = "syntax #3f2d2d"; - minus-emph-style = "syntax #5c3c3c"; - line-numbers-left-style = "#4C566A"; - line-numbers-right-style = "#4C566A"; - line-numbers-minus-style = "#BF616A"; - line-numbers-plus-style = "#A3BE8C"; - file-style = "bold #88C0D0"; - hunk-header-style = "file line-number syntax"; - }; - merge.conflictstyle = "diff3"; - diff.colorMoved = "default"; - }; - }; -} diff --git a/navi/navi/browser.nix b/navi/navi/browser.nix deleted file mode 100644 index 7e92940..0000000 --- a/navi/navi/browser.nix +++ /dev/null @@ -1,403 +0,0 @@ -let - profile = "default"; - prf = ".mozilla/firefox/${profile}"; - extstorage = "${prf}/browser-extension-data"; -in -{ config, pkgs, lib, firefox-addons, ... }: -let - fa = firefox-addons.packages.${pkgs.system}; - buildFirefoxXpiAddon = firefox-addons.lib.${pkgs.system}.buildFirefoxXpiAddon; - mozlz4 = n: x: - pkgs.runCommand "${n}.mozlz4" { buildInputs = [ pkgs.mozlz4a ]; } '' - mozlz4a ${builtins.toFile "${n}" (builtins.toJSON x)} $out - ''; -in -{ - home.file."${prf}/extension-preferences.json.tmp".source = pkgs.emptyFile; - home.file."${prf}/extension-settings.json.tmp".source = pkgs.emptyFile; - home.file."${prf}/search.json.mozlz4.tmp".source = pkgs.emptyFile; - home.file."${prf}/storage/default".source = pkgs.emptyDirectory; - home.file."${prf}/addonStartup.json.lz4".source = mozlz4 "addonStartup.json" {}; - home.file."${prf}/addonStartup.json.lz4.tmp".source = pkgs.emptyFile; - - home.file."${prf}/extension-preferences.json".text = builtins.toJSON { - "{3c078156-979c-498b-8990-85f7987dd929}" = { - origins = [""]; - permissions = ["proxy" "bookmarks" "tabHide" "clipboardWrite" "history" "downloads" ""]; - }; - "newtaboverride@agenedia.com" = { - origins = ["https://www.soeren-hentzschel.at/*"]; - permissions = []; - }; - }; - - home.file."${prf}/extension-settings.json".text = builtins.toJSON { - commands = {}; - default_search = {}; - homepageNotification = {}; - newTabNotification = { - "newtaboverride@agenedia.com" = { - initialValue = false; - precedenceList = [ - { - enabled = true; - id = "newtaboverride@agenedia.com"; - installDate = 1000; - value = true; - } - ]; - }; - }; - prefs = { - "network.networkPredictionEnabled" = { - initialValue = {}; - precedenceList = [ - { - enabled = true; - id = "uBlock0@raymondhill.net"; - installDate = 1000; - value = false; - } - ]; - }; - "privacy.containers" = { - initialValue = {}; - precedenceList = [ - { - enabled = true; - id = "CanvasBlocker@kkapsner.de"; - installDate = 1000; - value = "CanvasBlocker@kkapsner.de"; - } - ]; - }; - "websites.hyperlinkAuditingEnabled" = { - initialValue = {}; - precedenceList = [ - { - enabled = true; - id = "uBlock0@raymondhill.net"; - installDate = 1000; - value = false; - } - ]; - }; - }; - tabHideNotification = {}; - url_overrides = { - newTabURL = { - initialValue = "about:newtab"; - precedenceList = [ - { - enabled = true; - id = "newtaboverride@agenedia.com"; - installDate = 1000; - value = "moz-extension://5ba70e66-a52e-41b3-9364-b4f0a14f3854/html/newtab.html"; - } - ]; - }; - }; - version = 3; - }; - - home.file."${extstorage}/redirector@einaregilsson.com/storage.js".text = builtins.toJSON { - redirects = map ({ includePattern, redirectUrl, description }: { - appliesTo = ["main_frame"]; - inherit description; - disabled = false; - error = null; - exampleResult = ""; - exampleUrl = ""; - excludePattern = ""; - grouped = false; - inherit includePattern; - patternDesc = ""; - patternType = "W"; - processMatches = "noProcessing"; - inherit redirectUrl; - }) [ - { - includePattern = "https://*youtube.com/watch?*v=*"; - redirectUrl = "https://yewtu.be/watch?$2v=$3}"; - description = "invidious"; - } - { - includePattern = "https://*youtube.com/results?*search_query=*"; - redirectUrl = "https://yewtu.be/search?$2q=$3"; - description = "invidious search"; - } - ]; - enableNotifications = false; - }; - - home.file."${extstorage}/newtaboverride@agenedia.com/storage.js".text = builtins.toJSON { - url = "https://lobste.rs"; - }; - - programs.firefox = { - enable = true; - package = pkgs.firefox.override { - extraPolicies = { - CaptivePortal = false; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - DisableFirefoxAccounts = true; - FirefoxHome = { - Pocket = false; - Snippets = false; - }; - UserMessaging = { - ExtensionRecommendations = false; - SkipOnboarding = true; - }; - OverrideFirstRunPage = ""; - Extensions.Install = map (x: x.src.outPath) config.programs.firefox.profiles."default".extensions.packages; - SearchEngines.Default = "DuckDuckGo"; - ExtensionSettings = { - "google@search.mozilla.org" = { installation_mode = "blocked"; }; - "amazondotcom@search.mozilla.org" = { installation_mode = "blocked"; }; - "wikipedia@search.mozilla.org" = { installation_mode = "blocked"; }; - "bing@search.mozilla.org" = { installation_mode = "blocked"; }; - }; - }; - }; - profiles.default = { - userChrome = '' - /* Nord Theme */ - :root { - /* Polar Night - Dark backgrounds */ - --nord0: #2e3440; - --nord1: #3b4252; - --nord2: #434c5e; - --nord3: #4c566a; - - /* Snow Storm - Light text */ - --nord4: #d8dee9; - --nord5: #e5e9f0; - --nord6: #eceff4; - - /* Frost - Accents */ - --nord7: #8fbcbb; - --nord8: #88c0d0; - --nord9: #81a1c1; - --nord10: #5e81ac; - - /* Aurora - Colors */ - --nord11: #bf616a; - --nord12: #d08770; - --nord13: #ebcb8b; - --nord14: #a3be8c; - --nord15: #b48ead; - } - - #main-window, - #navigator-toolbox, - #TabsToolbar, - #nav-bar, - #PersonalToolbar { - background-color: var(--nord0) !important; - color: var(--nord6) !important; - border-color: var(--nord1) !important; - } - - .tabbrowser-tab .tab-background { - background-color: var(--nord1) !important; - border-radius: 6px !important; - } - - .tabbrowser-tab[selected] .tab-background { - background-color: var(--nord2) !important; - } - - .tabbrowser-tab .tab-label { - color: var(--nord4) !important; - } - - .tabbrowser-tab[selected] .tab-label { - color: var(--nord6) !important; - } - - .tabbrowser-tab[selected] .tab-background::before { - content: ""; - display: block; - height: 2px; - background: var(--nord8) !important; - border-radius: 2px 2px 0 0; - position: absolute; - top: 0; - left: 0; - right: 0; - } - - #urlbar-background { - background-color: var(--nord1) !important; - border-color: var(--nord2) !important; - border-radius: 8px !important; - } - - #urlbar[focused] #urlbar-background { - border-color: var(--nord8) !important; - box-shadow: 0 0 0 1px var(--nord8) !important; - } - - #urlbar-input { - color: var(--nord6) !important; - } - - toolbar button, - toolbarbutton { - color: var(--nord6) !important; - } - - toolbar button:hover, - toolbarbutton:hover { - background-color: var(--nord2) !important; - border-radius: 4px !important; - } - - #sidebar-box { - background-color: var(--nord0) !important; - color: var(--nord6) !important; - } - - menupopup, - panel { - background-color: var(--nord1) !important; - color: var(--nord6) !important; - border-color: var(--nord2) !important; - border-radius: 8px !important; - } - - menuitem:hover { - background-color: var(--nord2) !important; - color: var(--nord6) !important; - border-radius: 4px !important; - } - - #PersonalToolbar toolbarbutton { - color: var(--nord4) !important; - } - - #PersonalToolbar toolbarbutton:hover { - color: var(--nord6) !important; - background-color: var(--nord1) !important; - border-radius: 4px !important; - } - - scrollbar { - background-color: var(--nord0) !important; - } - - scrollbar thumb { - background-color: var(--nord3) !important; - border-radius: 4px !important; - } - ''; - search = { - default = "DuckDuckGo"; - force = true; - engines = { - "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { name = "type"; value = "packages"; } - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["!np"]; - }; - "Home Manager" = { - urls = [{ - template = "https://mipmip.github.io/home-manager-option-search/"; - params = [ - { name = "query"; value = "{searchTerms}"; } - ]; - }]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["!hm"]; - }; - "Invidious" = { - urls = [{ - template = "https://yewtu.be/search"; - params = [ - { name = "q"; value = "{searchTerms}"; } - ]; - }]; - iconUpdateURL = "https://invidious.io/favicon.ico"; - definedAliases = ["!yt"]; - }; - "Cyberchef" = { - urls = [{ - template = ''javascript:q="%s";location.href="https://cyberchef.org/#recipe=Magic(3,false,false,\'\')&input="+btoa(q)''; - params = [ - { name = "q"; value = "{searchTerms}"; } - ]; - }]; - iconUpdateURL = "https://cyberchef.org/favicon.ico"; - definedAliases = ["!cc"]; - }; - }; - }; - - extraConfig = - builtins.readFile ( - builtins.fetchurl { - url = "https://raw.githubusercontent.com/arkenfox/user.js/master/user.js"; - sha256 = "sha256:067bfw8zm6gi82a79cfb3y6hgqf5bsykx1k4z31nby320j4ch74g"; - } - ) - + '' - user_pref('keyword.enabled', true); - user_pref("browser.startup.homepage", "https://lobste.rs"); - user_pref("browser.startup.page", 1); - user_pref("privacy.resistFingerprinting", false); - user_pref("privacy.resistFingerprinting.letterboxing", false); - user_pref("browser.search.hiddenOneOffs","Google,Bing,Amazon.com,eBay,Twitter,Wikipedia (en)"); - ''; - - settings = { - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - "browser.newtabpage.pinned" = [{ url = "https://lobste.rs"; }]; - "extensions.activeThemeID" = "{e410fec2-1cbd-4098-9944-e21e708418af}"; - "svg.context-properties.content.enabled" = true; - "browser.toolbars.bookmarks.visibility" = "always"; - "browser.uidensity" = 1; - "browser.aboutConfig.showWarning" = false; - "browser.shell.checkDefaultBrowser" = false; - "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false; - "browser.search.hiddenOneOffs" = "Google,Bing,Amazon.com,eBay,Twitter,Wikipedia (en)"; - "browser.download.dir" = config.xdg.userDirs.download; - }; - - extensions.packages = [ - fa.ublock-origin - fa.clearurls - fa.privacy-possum - fa.skip-redirect - fa.canvasblocker - fa.darkreader - fa.vimium - (buildFirefoxXpiAddon { - pname = "sidebery"; - version = "v5.0.0rc4"; - addonId = "{3c078156-979c-498b-8990-85f7987dd929}"; - url = "https://github.com/mbnuqw/sidebery/releases/download/v5.0.0rc4/sidebery-5.0.0rc4.xpi"; - sha256 = "sha256-YsH9yYfGefClRS93dMV/eLMFuoPFKPrx0NL2hIv4dEk="; - meta = with lib; { - homepage = "https://github.com/mbnuqw/sidebery"; - description = "Tabs tree and bookmarks in sidebar with advanced containers configuration."; - license = licenses.mit; - platforms = platforms.all; - }; - }) - fa.redirector - fa.kristofferhagen-nord-theme - fa.new-tab-override - fa.snowflake - ]; - }; - }; -} \ No newline at end of file diff --git a/navi/navi/default.nix b/navi/navi/default.nix index 06384b2..12bbb10 100644 --- a/navi/navi/default.nix +++ b/navi/navi/default.nix @@ -1,4 +1,3 @@ -{ config, pkgs, ... }: { home.stateVersion = "22.05"; imports = [ @@ -11,22 +10,14 @@ ./ssh.nix ./git.nix ./launcher.nix - ./keyboard.nix - ./bash.nix - ./emacs.nix ./i3.nix ./notifications.nix ./screen-lock.nix ./shell.nix ./gtk-qt.nix ./devel.nix - ./browser.nix ./messaging.nix ./multimedia.nix ./audio.nix ]; - services.gpg-agent = { - enable = true; - pinentryPackage = pkgs.pinentry-curses; - }; } diff --git a/navi/navi/editors.nix b/navi/navi/editors.nix index b4b278a..403efa9 100644 --- a/navi/navi/editors.nix +++ b/navi/navi/editors.nix @@ -4,38 +4,19 @@ programs.neovim = { enable = true; }; - home.sessionVariables.EDITOR = "nvim"; - home.file = { ".emacs.d" = { - text = "hii"; + source = ./emacs.d; recursive = true; }; }; programs.emacs.enable = true; - programs.emacs.extraPackages = ( - epkgs: (with epkgs; [ - better-defaults - material-theme - org - org-bullets - org-journal - org-roam - org-super-agenda - helm-org-rifle - afternoon-theme - workgroups2 - treemacs - projectile - slime - yaml - yaml-mode - markdown-mode - ox-pandoc - use-package - notmuch - ]) - ); + services.emacs = { + enable = true; + defaultEditor = true; + startWithUserSession = true; + client.enable = true; + }; } diff --git a/navi/navi/emacs.d/init.el b/navi/navi/emacs.d/init.el index e69de29..1217fc1 100644 --- a/navi/navi/emacs.d/init.el +++ b/navi/navi/emacs.d/init.el @@ -0,0 +1,342 @@ +;; [Initialization] + + +;; Garbage collection setting +(setq gc-cons-percentage 0.6) + +;; Compiler warning +(setq native-comp-async-report-warnings-errors 'silent) ;; native-comp warning +(setq byte-compile-warnings '(not free-vars unresolved noruntime lexical make-local)) + +;; Disable lock files +(setq create-lockfiles nil) + +;; Save backup files in one place, under the emacs directory +(make-directory (expand-file-name "tmp/backups/" user-emacs-directory) t) +(make-directory (expand-file-name "tmp/autosave/" user-emacs-directory) t) +(setq backup-directory-alist `(("." . ,(expand-file-name "tmp/backups/" user-emacs-directory)))) +(setq auto-save-file-name-transforms `((".*" ,(expand-file-name "tmp/autosave/" user-emacs-directory)))) +(setq backup-by-copying t) + +;; Keep custom variables in a separate file +(setq custom-file (locate-user-emacs-file "custom-vars.el")) +(load custom-file 'noerror 'nomessage) + + + + +;; [Emacs Package Management] + + +;; Set up "package" and add package archives +(require 'package) +(setq package-user-dir (expand-file-name "elpa" user-emacs-directory)) +(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) +(add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/")) +(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) +(package-initialize) + +;; Bootstrap "use-package" package +(eval-after-load 'gnutls + '(add-to-list 'gnutls-trustfiles "/etc/ssl/cert.pem")) +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) +(eval-when-compile + (require 'use-package)) +(setq package-enable-at-startup nil) +(setq use-package-always-ensure t) +(setq use-package-verbose nil) + +;; Keep package files in a separate directory +(use-package no-littering + :ensure t) + +;; Quelpa +(use-package quelpa) +(quelpa + '(quelpa-use-package + :fetcher git + :url "https://github.com/quelpa/quelpa-use-package.git")) +(require 'quelpa-use-package) + +;; Straight package manager +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 5)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + +;; Auto update packages +(use-package auto-package-update + :ensure t + :custom + (auto-package-update-interval 7) + (auto-package-update-prompt-before-update nil) + (auto-package-update-hide-results t) + :config + (auto-package-update-maybe)) + + + + +;; [Emacs Garbage Collection] + + +(use-package gcmh + :ensure t + :diminish gcmh-mode + :config + (setq gcmh-idle-delay 5 + gcmh-high-cons-threshold (* 64 1024 1024)) ; 64 mb + (gcmh-mode 1) + (add-hook 'emacs-startup-hook + (lambda () + (setq gc-cons-percentage 0.1))) ;;; Default value for 'gc-cons-percentage + (add-hook 'emacs-startup-hook + (lambda () + (message "Emacs ready in %s with %d garbade collections." + (format "%.2f seconds" + (float-time + (time-subtract after-init-time before-init-time))) + gcs-done)))) + + + + +;; [Encoding & Input] + + +;; Encoding +(use-package emacs + :init + (set-charset-priority 'unicode) + (setq locale-coding-system 'utf-8 + coding-system-for-read 'utf-8 + coding-system-for-write 'utf-8) + (set-terminal-coding-system 'utf-8) + (set-keyboard-coding-system 'utf-8) + (set-selection-coding-system 'utf-8) + (prefer-coding-system 'utf-8) + (setq default-process-coding-system '(utf-8-unix . utf-8-unix)) + (setq-default indent-tabs-mode nil) + (setq-default tab-width 2)) + +;; [Emacs Appearance] + + +;; Frame inhibit implied resize +(setq frame-inhibit-implied-resize t) + +;; Don't show splash screen +(setq inhibit-startup-message t) + +;; Prevent using UI dialogs for prompts +(setq use-dialog-box nil) + +;; Minimal UI +(tool-bar-mode -1) +;(scroll-bar-mode -1) +(menu-bar-mode -1) +(setq visible-bell 0) +(setq make-pointer-invisible t) + +;; Show matching parenthesis +(show-paren-mode 1) +(setq show-paren-delay 0) + +;; Show selected region +(transient-mark-mode t) + +;; Better scrolling +(setq scroll-step 1) +(setq scroll-margin 1) +(setq scroll-conservatively 101) +(setq scroll-up-aggressively 0.01) +(setq scroll-down-aggressively 0.01) +(setq auto-window-vscroll nil) +(setq fast-but-imprecise-scrolling nil) +(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) +(setq mouse-wheel-progressive-speed nil) +(setq pixel-scroll-precision-mode t) + +;; Horizontal Scroll +(setq hscroll-step 1) +(setq hscroll-margin 1) + +;; Follow focus +(setq focus-follows-mouse t) +(setq mouse-autoselect-window-window t) + +;; Show line number in source code +(add-hook 'prog-mode-hook 'display-line-numbers-mode) +(setq linum-format "%4d ") + +;; Highlight cursor line +(add-hook 'prog-mode-hook 'hl-line-mode) +(add-hook 'org-mode-hook 'hl-line-mode) +;; Disable cursor line in vterm(terminal) mode, because it's weird +(add-hook 'vterm-mode-hook (lambda () (hl-line-mode -1))) + +;; Match and highlight parenthesis, +(electric-pair-mode 1) +(setq electric-pair-pairs + '((?\" . ?\") + (?\{ . ?\}))) + +;; but don't pair ' (quote in lisp) or < (could be a plain comparison) +(setq electric-pair-inhibit-predicate + (lambda (c) + (or (char-equal c ?\') + (char-equal c ?\<)))) + + + + +;; [Emacs Theme] + +;; Font +(add-to-list 'default-frame-alist '(font . "JetBrains Mono 13")) +(set-face-attribute 'default t :font "JetBrains Mono 13" :height 160 :weight 'regular) + +;; Nano Theme +(use-package nano-theme + :ensure t + :quelpa (nano-theme + :fetcher github + :repo "rougier/nano-theme") + :config + (setq nano-fonts-use nil) + (load-theme 'nano-dark t) + (add-hook 'after-make-frame-functions + (lambda (frame) + (select-frame frame) + (when (display-graphic-p frame) + (setq nano-fonts-use nil) + (load-theme 'nano-dark t) + (nano-mode) + (set-face-attribute 'default nil :font "JetBrains Mono 13") + (set-frame-font "JetBrains Mono 13" nil t)))) + (nano-mode)) + +;; Nano Modeline +(use-package nano-modeline + :ensure t + :after nano-theme + :init + ;; Only show the major mode + (setq-default mode-line-format + `((:propertize " %@%Z [%b] L%l (%p) ") + (:propertize (vc-mode vc-mode) face (:weight normal)) + (:propertize (" %M " mode-name) + help-echo "Major mode\n\ + mouse-1: Display major mode menu\n\ + mouse-2: Show help for major mode\n\ + mouse-3: Toggle minor modes" + mouse-face mode-line-highlight + local-map ,mode-line-major-mode-keymap))) + :config + (add-hook 'prog-mode-hook #'nano-modeline-prog-mode) + (add-hook 'text-mode-hook #'nano-modeline-text-mode) + (add-hook 'org-mode-hook #'nano-modeline-org-mode) + (add-hook 'pdf-view-mode-hook #'nano-modeline-pdf-mode) + (add-hook 'mu4e-headers-mode-hook #'nano-modeline-mu4e-headers-mode) + (add-hook 'mu4e-view-mode-hook #'nano-modeline-mu4e-message-mode) + (add-hook 'elfeed-show-mode-hook #'nano-modeline-elfeed-entry-mode) + (add-hook 'elfeed-search-mode-hook #'nano-modeline-elfeed-search-mode) + (add-hook 'term-mode-hook #'nano-modeline-term-mode) + (add-hook 'xwidget-webkit-mode-hook #'nano-modeline-xwidget-mode) + (add-hook 'messages-buffer-mode-hook #'nano-modeline-message-mode) + (add-hook 'org-capture-mode-hook #'nano-modeline-org-capture-mode) + (add-hook 'org-agenda-mode-hook #'nano-modeline-org-agenda-mode)) + +;; Icon pack +(use-package all-the-icons + :if (display-graphic-p) + :ensure t) + + + + +;; [File Management] + + +;; Automatically revert buffers for changed files +(global-auto-revert-mode 1) + +;; Automatically update file list in Dired(Emacs file explorer) +(setq global-auto-revert-non-file-buffers t) + +;; recentf keeps history of recently accessed files +(use-package recentf + :ensure nil + :config + (setq recentf-max-saved-items 128) + (setq recentf-filename-handlers + (append '(abbreviate-file-name) recentf-filename-handlers)) + (recentf-mode)) + +;; Remember recently edited file +(recentf-mode 1) +(save-place-mode 1) + +;; Remember minibuffer command history +(setq history-length 16) +(savehist-mode 1) + +;; Magit: use git in emacs +(use-package magit) + +;; Undo tree +(use-package undo-tree + :ensure t + :config + (global-undo-tree-mode) + (setq undo-tree-visualizer-diff t) + (setq undo-tree-visualizer-timestamps t) + (setq undo-tree-auto-save-history nil)) + + + + +;; [Emacs Key Binding] + + +;; Shows key binding suggestions when you type keys +(use-package which-key + :ensure t + :config + (setq which-key-idle-delay 0.3) + (setq which-key-popup-type 'frame) + (which-key-mode) + (which-key-setup-side-window-bottom) + (set-face-attribute 'which-key-local-map-description-face nil :weight 'bold)) + + + + +;; [Completion] + + +;; helm provides incremental completion through minibuffer +(use-package helm + :ensure t + :init + (helm-mode 1) + :bind + ("C-x C-f" . 'helm-find-files) + ("C-x C-b" . 'helm-buffers-list) + ("M-x" . 'helm-M-x) + :config + (helm-autoresize-mode 1) + (setq helm-ff-skip-boring-files t) + (customize-set-variable 'helm-boring-file-regexp-list (cons "^\\..+" helm-boring-file-regexp-list))) + diff --git a/navi/navi/emacs.nix b/navi/navi/emacs.nix deleted file mode 100644 index d429149..0000000 --- a/navi/navi/emacs.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ pkgs, ... }: -{ - programs.emacs = { - enable = true; - extraPackages = epkgs: [ - epkgs.nord-theme - epkgs.nerd-icons - epkgs.nerd-icons-dired - epkgs.nerd-icons-ibuffer - epkgs.nerd-icons-completion - ]; - extraConfig = '' - (load-theme 'nord t) - - (set-face-attribute 'default nil - :family "Iosevka Nerd Font" - :height 140) - - (menu-bar-mode -1) - (tool-bar-mode -1) - (scroll-bar-mode -1) - (fringe-mode 8) - (setq inhibit-startup-screen t) - - (setq-default - indent-tabs-mode nil - tab-width 2 - fill-column 80) - - (global-display-line-numbers-mode 1) - (column-number-mode 1) - (show-paren-mode 1) - (electric-pair-mode 1) - (delete-selection-mode 1) - (global-hl-line-mode 1) - - (require 'nerd-icons) - - (add-hook 'dired-mode-hook #'nerd-icons-dired-mode) - (add-hook 'ibuffer-mode-hook #'nerd-icons-ibuffer-mode) - - (with-eval-after-load 'marginalia - (nerd-icons-completion-mode 1)) - ''; - }; -} diff --git a/navi/navi/fonts.nix b/navi/navi/fonts.nix index 4c00ef7..685b7a3 100644 --- a/navi/navi/fonts.nix +++ b/navi/navi/fonts.nix @@ -8,8 +8,8 @@ roboto font-awesome corefonts + _3270font vista-fonts culmus - iosevka ]; } diff --git a/navi/navi/git.nix b/navi/navi/git.nix index cac3241..dacbcd0 100644 --- a/navi/navi/git.nix +++ b/navi/navi/git.nix @@ -3,11 +3,11 @@ { programs.git = { enable = true; - userName = "laniakea"; + userName = "itamar"; userEmail = "itamar@itamar.site"; ignores = [ "*.swp" "result" ]; signing = { - key = "72F74E167C220C451CF29C09D8277CDCD4F544E9"; + key = "06D397B84C798A948E9174D34C315A8D67ADC36C"; signByDefault = true; }; extraConfig = { diff --git a/navi/navi/i3.nix b/navi/navi/i3.nix index 58da163..7dc1032 100644 --- a/navi/navi/i3.nix +++ b/navi/navi/i3.nix @@ -1,279 +1,42 @@ { pkgs, lib, ... }: -let - mod = "Mod4"; # Super/Windows key - alt = "Mod1"; # Alt key (for convenience) +let + mod = "Mod4"; in { - home.pointerCursor = { - package = pkgs.adwaita-icon-theme; - name = "Adwaita"; - size = 24; - x11.enable = true; - gtk.enable = true; - }; - - home.file.".fehbg".text = '' - #!/bin/sh - feh --no-fehbg --bg-scale ~/Pictures/wp.png - ''; - home.file.".fehbg".executable = true; + # home.pointerCursor = { + # package = pkgs.gnome.adwaita-icon-theme; + # name = "Adwaita"; + # size = 24; + # x11.enable = true; + # gtk.enable = true; + # }; xsession = { enable = true; - - initExtra = '' - # Set wallpaper - ${pkgs.feh}/bin/feh --no-fehbg --bg-scale ~/Pictures/wp.png & - - # Start compositor for transparency and smooth rendering - ${pkgs.picom}/bin/picom -b & - - # Start notification daemon - ${pkgs.dunst}/bin/dunst & - - # Start network manager applet - ${pkgs.networkmanagerapplet}/bin/nm-applet & - - # Set keyboard repeat rate - xset r rate 250 40 - ''; - windowManager.i3 = { enable = true; - package = pkgs.i3; # Use i3-gaps for window gaps - config = { modifier = mod; - terminal = "${pkgs.alacritty}/bin/alacritty"; + fonts = ["ibm3270"]; + keybindings = lib.mkOptionDefault { + "Mod1+1" = "exec mullvad-browser"; + "Mod1+2" = "exec discord"; + "${mod}+Shift+s" = "exec ${pkgs.maim}/bin/maim -s | xclip -selection clipboard -t image/png"; - fonts = { - names = [ "Iosevka Nerd Font" ]; - size = 11.0; + # Focus + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; + + # Move + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+j" = "move down"; + "${mod}+Shift+k" = "move up"; + "${mod}+Shift+l" = "move right"; }; - - gaps = { - inner = 8; - outer = 4; - smartGaps = true; - }; - - window = { - border = 2; - titlebar = false; - }; - - focus = { - followMouse = true; - mouseWarping = true; - }; - - # Default workspace layout - workspaceLayout = "default"; - - keybindings = lib.mkForce { - # --- Applications --- - "${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; - "${alt}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; - "${mod}+Shift+Return" = "exec ${pkgs.alacritty}/bin/alacritty --class floating"; - - "${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun -show-icons"; - "${mod}+Shift+d" = "exec ${pkgs.rofi}/bin/rofi -show run"; - - "${alt}+1" = "exec firefox"; - "${alt}+2" = "exec discord"; - - "${mod}+Shift+s" = "exec ${pkgs.maim}/bin/maim -s | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png"; - "${mod}+Shift+Print" = "exec ${pkgs.maim}/bin/maim | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png"; - - "${mod}+Shift+x" = "exec ${pkgs.i3lock}/bin/i3lock -c 000000"; - - "${mod}+q" = "kill"; - "${mod}+f" = "fullscreen toggle"; - "${mod}+Shift+f" = "floating toggle"; - "${mod}+space" = "focus mode_toggle"; - "${mod}+Shift+space" = "move container to workspace current, floating toggle"; - - "${mod}+h" = "focus left"; - "${mod}+j" = "focus down"; - "${mod}+k" = "focus up"; - "${mod}+l" = "focus right"; - "${mod}+Left" = "focus left"; - "${mod}+Down" = "focus down"; - "${mod}+Up" = "focus up"; - "${mod}+Right" = "focus right"; - - # Move windows - "${mod}+Shift+h" = "move left"; - "${mod}+Shift+j" = "move down"; - "${mod}+Shift+k" = "move up"; - "${mod}+Shift+l" = "move right"; - "${mod}+Shift+Left" = "move left"; - "${mod}+Shift+Down" = "move down"; - "${mod}+Shift+Up" = "move up"; - "${mod}+Shift+Right" = "move right"; - - # --- Workspaces --- - "${mod}+1" = "workspace number 1"; - "${mod}+2" = "workspace number 2"; - "${mod}+3" = "workspace number 3"; - "${mod}+4" = "workspace number 4"; - "${mod}+5" = "workspace number 5"; - "${mod}+6" = "workspace number 6"; - "${mod}+7" = "workspace number 7"; - "${mod}+8" = "workspace number 8"; - "${mod}+9" = "workspace number 9"; - "${mod}+0" = "workspace number 10"; - - "${mod}+Shift+1" = "move container to workspace number 1"; - "${mod}+Shift+2" = "move container to workspace number 2"; - "${mod}+Shift+3" = "move container to workspace number 3"; - "${mod}+Shift+4" = "move container to workspace number 4"; - "${mod}+Shift+5" = "move container to workspace number 5"; - "${mod}+Shift+6" = "move container to workspace number 6"; - "${mod}+Shift+7" = "move container to workspace number 7"; - "${mod}+Shift+8" = "move container to workspace number 8"; - "${mod}+Shift+9" = "move container to workspace number 9"; - "${mod}+Shift+0" = "move container to workspace number 10"; - - # --- Layout --- - "${mod}+b" = "split h"; - "${mod}+v" = "split v"; - "${mod}+e" = "layout toggle split"; - "${mod}+w" = "layout tabbed"; - "${mod}+s" = "layout stacking"; - "${mod}+a" = "focus parent"; - - "${mod}+r" = "mode resize"; - - # --- System --- - "${mod}+Shift+e" = "exec i3-nagbar -t warning -m 'Exit i3?' -b 'Yes' 'i3-msg exit'"; - "${mod}+Shift+r" = "restart"; - "${mod}+Shift+c" = "reload"; - }; - - modes = { - resize = { - "h" = "resize shrink width 10 px or 10 ppt"; - "j" = "resize grow height 10 px or 10 ppt"; - "k" = "resize shrink height 10 px or 10 ppt"; - "l" = "resize grow width 10 px or 10 ppt"; - "Left" = "resize shrink width 10 px or 10 ppt"; - "Down" = "resize grow height 10 px or 10 ppt"; - "Up" = "resize shrink height 10 px or 10 ppt"; - "Right" = "resize grow width 10 px or 10 ppt"; - "Escape" = "mode default"; - "Return" = "mode default"; - }; - }; - - floating = { - modifier = mod; - criteria = [ - { title = "Picture-in-Picture"; } - { class = "floating"; } - { class = "Pavucontrol"; } - { class = "Nm-connection-editor"; } - ]; - }; - - # Assign apps to workspaces (optional) - assigns = { - "1" = [{ class = "^Firefox$"; }]; - "2" = [{ class = "^discord$"; }]; - "10" = [{ class = "^Spotify$"; }]; - }; - - startup = [ - { - command = "systemctl --user import-environment DISPLAY XAUTHORITY"; - notification = false; - } - { - command = "dbus-update-activation-environment --all"; - notification = false; - } - ]; - - colors = { - focused = { - border = "#81a1c1"; - background = "#81a1c1"; - text = "#2e3440"; - indicator = "#81a1c1"; - childBorder = "#81a1c1"; - }; - focusedInactive = { - border = "#4c566a"; - background = "#4c566a"; - text = "#d8dee9"; - indicator = "#4c566a"; - childBorder = "#4c566a"; - }; - unfocused = { - border = "#3b4252"; - background = "#3b4252"; - text = "#d8dee9"; - indicator = "#3b4252"; - childBorder = "#3b4252"; - }; - urgent = { - border = "#bf616a"; - background = "#bf616a"; - text = "#2e3440"; - indicator = "#bf616a"; - childBorder = "#bf616a"; - }; - }; - - bars = [ - { - position = "bottom"; - statusCommand = "${pkgs.i3status}/bin/i3status"; - fonts = { - names = [ "Iosevka Nerd Font" ]; - size = 11.0; - }; - colors = { - background = "#2e3440"; - statusline = "#d8dee9"; - separator = "#4c566a"; - focusedWorkspace = { - border = "#81a1c1"; - background = "#81a1c1"; - text = "#2e3440"; - }; - activeWorkspace = { - border = "#4c566a"; - background = "#4c566a"; - text = "#d8dee9"; - }; - inactiveWorkspace = { - border = "#3b4252"; - background = "#3b4252"; - text = "#d8dee9"; - }; - urgentWorkspace = { - border = "#bf616a"; - background = "#bf616a"; - text = "#2e3440"; - }; - }; - } - ]; }; }; }; - - home.packages = with pkgs; [ - feh - picom - dunst - rofi - i3lock - i3status - networkmanagerapplet - maim - xclip - ]; } diff --git a/navi/navi/keyboard.nix b/navi/navi/keyboard.nix deleted file mode 100644 index 1d4a693..0000000 --- a/navi/navi/keyboard.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - home.keyboard = { - layout = "us,il"; - options = [ "grp:lalt_lshift_toggle" ]; - }; - - - services.sxhkd = { - enable = true; - keybindings = { - "super + Return" = "alacritty"; - "super + @space" = "rofi -show drun"; - "super + alt + {q,r}" = "bspc {quit,wm -r}"; - "super + {_,shift + }w" = "bspc node -{c,k}"; - "super + m" = "bspc desktop -l next"; - "super + y" = "bspc node newest.marked.local -n newest.!automatic.local"; - "super + g" = "bspc node -s biggest"; - "super + {t,shift + t,s,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; - "super + ctrl + {m,x,y,z}" = "bspc node -g {marked,locked,sticky,private}"; - "super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}"; - "super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}"; - "super + {_,shift + }c" = "bspc node -f {next,prev}.local.!hidden.window"; - "super + bracket{left,right}" = "bspc desktop -f {prev,next}.local.!hidden.window"; - "super + {grave,Tab}" = "bspc {node,desktop} -f last"; - "super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} '{1-9,10}'"; - "super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}"; - "super + ctrl + {1-9}" = "bspc node -o 0.{1-9}"; - "super + ctrl + space" = "bspc node -p cancel"; - "super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel"; - "super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}"; - "super + shift + {d,a}" = "bspc node @/ -C {forward,backward}"; - - "XF86Audio{Prev,Next,Play}" = "mpc -q {prev,next,toggle}"; - - "XF86Audio{Raise,Lower}Volume" = "pulsemixer --change-volume {+,-}5"; - - "XF86AudioMute" = "pulsemixer --toggle-mute"; - - "XF86AudioMicMute" = "pulsemixer --id source-42 --toggle-mute"; - "alt + 1" = "firefox"; - - "alt + 2" = "Discord"; - - "alt + 3" = "nemo"; - "XF86MonBrightness{Up,Down}" = "light -{A,U} 10"; - "super + shift + s" = "maim -s | xclip -selection clipboard -t image/png"; - - "Print" = "maim | xclip -selection clipboard -t image/png && notify-send 'maim' 'Screenshot captured'"; - - }; - extraConfig = '' - # Expand/contract a window by moving one of its side outward/inward - super + alt + {h,j,k,l} - STEP=20; SELECTION={1,2,3,4}; \ - bspc node -z $(echo "left -$STEP 0,bottom 0 $STEP,top 0 -$STEP,right $STEP 0" | cut -d',' -f$SELECTION) || \ - bspc node -z $(echo "right -$STEP 0,top 0 $STEP,bottom 0 -$STEP,left $STEP 0" | cut -d',' -f$SELECTION) - ''; - }; -} - diff --git a/navi/navi/messaging.nix b/navi/navi/messaging.nix index a173449..72b8149 100644 --- a/navi/navi/messaging.nix +++ b/navi/navi/messaging.nix @@ -5,7 +5,8 @@ home.packages = with pkgs; [ #discord - element-desktop + nheko + element-desktop signal-desktop (pkgs.discord.override { # remove any overrides that you don't want diff --git a/navi/navi/multimedia.nix b/navi/navi/multimedia.nix index b761f22..eb54bc0 100644 --- a/navi/navi/multimedia.nix +++ b/navi/navi/multimedia.nix @@ -9,7 +9,7 @@ transmission_4 xdg-utils xdg-user-dirs + steam + libreoffice-qt ]; - - } diff --git a/navi/navi/packages.nix b/navi/navi/packages.nix index 84f802c..42c65e1 100644 --- a/navi/navi/packages.nix +++ b/navi/navi/packages.nix @@ -7,14 +7,15 @@ keepassxc # yt-dlp p7zip + pinentry-curses mullvad-browser + gnupg # tdesktop # killall xclip maim - calc sage nim zig gcc gnumake gnupg ghc idris2 python3 vim unzip wget nerd-fonts.iosevka - htop fastfetch pfetch chromium - ranger elan cava vscode - + calc + # htop + ranger # pulsemixer tree # fzf @@ -35,7 +36,5 @@ # sd # discord ]; - - } diff --git a/navi/navi/polybar.nix b/navi/navi/polybar.nix deleted file mode 100644 index fa58e1d..0000000 --- a/navi/navi/polybar.nix +++ /dev/null @@ -1,180 +0,0 @@ -{ pkgs, ... }: -{ - services.polybar = { - enable = true; - package = pkgs.polybarFull; - script = '' - polybar top & - polybar bottom & - ''; - config = { - "colors" = { - bg = "#050a05"; - fg = "#00ff41"; - dim = "#007a1f"; - ghost = "#1a3a1a"; - cyan = "#00ffcc"; - yellow = "#aaff00"; - red = "#ff3030"; - bright = "#39ff14"; - }; - - "section/base" = { - width = "100%"; - height = 22; - background = "\${colors.bg}"; - foreground = "\${colors.fg}"; - border-color = "\${colors.ghost}"; - border-bottom-size = 1; - font-0 = "Iosevka:size=10;2"; - padding-left = 1; - padding-right = 1; - module-margin-left = 1; - module-margin-right = 1; - wm-restack = "bspwm"; - cursor-click = "pointer"; - }; - - "bar/top" = { - "inherit" = "section/base"; - modules-left = "pulseaudio memory cpu"; - modules-center = "date"; - modules-right = "filesystem"; - }; - - "bar/bottom" = { - "inherit" = "section/base"; - bottom = true; - modules-left = "mpd"; - modules-center = "bspwm"; - modules-right = "powermenu"; - }; - - # ── Workspaces ──────────────────────────────────────────────── - "module/bspwm" = { - type = "internal/bspwm"; - pin-workspaces = true; - enable-click = true; - enable-scroll = false; - label-active = "%index%"; - label-active-underline = "\${colors.bright}"; - label-active-padding = 2; - label-occupied = "%index%"; - label-occupied-underline = "\${colors.dim}"; - label-occupied-padding = 2; - label-empty = "%index%"; - label-empty-foreground = "\${colors.ghost}"; - label-empty-padding = 2; - label-urgent = "%index%"; - label-urgent-foreground = "\${colors.red}"; - label-urgent-padding = 2; - }; - - # ── MPD ─────────────────────────────────────────────────────── - "module/mpd" = { - type = "internal/mpd"; - host = "127.0.0.1"; - port = 6600; - interval = 2; - format-online = " "; - label-song = "%artist% - %title%"; - label-song-foreground = "\${colors.cyan}"; - label-song-maxlen = 50; - label-song-ellipsis = true; - icon-play = ">"; - icon-pause = "||"; - icon-stop = "[]"; - format-online-foreground = "\${colors.cyan}"; - format-offline = "mpd: offline"; - format-offline-foreground = "\${colors.ghost}"; - }; - - # ── CPU ─────────────────────────────────────────────────────── - "module/cpu" = { - type = "internal/cpu"; - interval = 2; - format-prefix = "cpu: "; - format-prefix-foreground = "\${colors.dim}"; - label = "%percentage%%"; - }; - - # ── Memory ──────────────────────────────────────────────────── - "module/memory" = { - type = "internal/memory"; - interval = 3; - format-prefix = "mem: "; - format-prefix-foreground = "\${colors.dim}"; - label = "%percentage_used%%"; - }; - - # ── Filesystem ──────────────────────────────────────────────── - "module/filesystem" = { - type = "internal/fs"; - interval = 25; - mount-0 = "/"; - format-mounted = ""; - label-mounted = "disk: %percentage_used%%"; - format-unmounted = "disk: N/A"; - }; - - # ── Volume ──────────────────────────────────────────────────── - "module/pulseaudio" = { - type = "internal/pulseaudio"; - use-ui-max = false; - format-volume = ""; - format-volume-prefix = "audio: "; - format-volume-prefix-foreground = "\${colors.dim}"; - label-volume = "%percentage%%"; - label-muted = "muted"; - label-muted-foreground = "\${colors.ghost}"; - format-muted-prefix = "audio: "; - format-muted-prefix-foreground = "\${colors.dim}"; - }; - - # ── Clock ───────────────────────────────────────────────────── - "module/date" = { - type = "internal/date"; - interval = 1; - date = "%d.%m.%Y"; - time = "%H:%M:%S"; - label = "%time% - %date%"; - format-foreground = "\${colors.yellow}"; - }; - - # ── Power menu ──────────────────────────────────────────────── - "module/powermenu" = { - type = "custom/menu"; - expand-right = true; - format-spacing = 1; - label-open = "power"; - label-open-foreground = "\${colors.dim}"; - label-close = "cancel"; - label-close-foreground = "\${colors.dim}"; - label-separator = " | "; - label-separator-foreground = "\${colors.ghost}"; - menu-0-0 = "reboot"; - menu-0-0-exec = "menu-open-1"; - menu-0-1 = "poweroff"; - menu-0-1-exec = "menu-open-2"; - menu-0-2 = "sleep"; - menu-0-2-exec = "menu-open-3"; - menu-1-0 = "reboot"; - menu-1-0-exec = "reboot"; - menu-1-1 = "cancel"; - menu-1-1-exec = "menu-open-0"; - menu-2-0 = "poweroff"; - menu-2-0-exec = "poweroff"; - menu-2-1 = "cancel"; - menu-2-1-exec = "menu-open-0"; - menu-3-0 = "sleep"; - menu-3-0-exec = "systemctl suspend"; - menu-3-1 = "cancel"; - menu-3-1-exec = "menu-open-0"; - }; - - "settings" = { - screenchange-reload = true; - }; - }; - }; -} diff --git a/navi/navi/terminal.nix b/navi/navi/terminal.nix index 951e8da..fb7c4e7 100644 --- a/navi/navi/terminal.nix +++ b/navi/navi/terminal.nix @@ -1,57 +1,14 @@ { pkgs, ... }: + { + home.sessionVariables.TERMINAL = "alacritty"; programs.alacritty = { enable = true; settings = { env.WINIT_X11_SCALE_FACTOR = "1"; font = { - normal.family = "Iosevka Nerd Font"; - size = 14; - }; - colors = { - primary = { - background = "#2E3440"; - foreground = "#D8DEE9"; - dim_foreground = "#A5AFBA"; - }; - cursor = { - text = "#2E3440"; - cursor = "#D8DEE9"; - }; - vi_mode_cursor = { - text = "#2E3440"; - cursor = "#D8DEE9"; - }; - normal = { - black = "#3B4252"; - red = "#BF616A"; - green = "#A3BE8C"; - yellow = "#EBCB8B"; - blue = "#81A1C1"; - magenta = "#B48EAD"; - cyan = "#88C0D0"; - white = "#E5E9F0"; - }; - bright = { - black = "#4C566A"; - red = "#BF616A"; - green = "#A3BE8C"; - yellow = "#EBCB8B"; - blue = "#81A1C1"; - magenta = "#B48EAD"; - cyan = "#8FBCBB"; - white = "#ECEFF4"; - }; - dim = { - black = "#373E4D"; - red = "#94545D"; - green = "#809575"; - yellow = "#B29E75"; - blue = "#68809A"; - magenta = "#8C738A"; - cyan = "#6D96A5"; - white = "#ADB3BB"; - }; + normal.family = "ibm3270"; + size = 12; }; }; };