{ config, nixvim, lib, pkgs, ... }: let black = "#000000"; white = "#FFFFFF"; red = "#880000"; cyan = "#AAFFEE"; magenta = "#CC44CC"; green = "#00CC55"; blue = "#0088FF"; yellow = "#EEEE77"; grey = "#333333"; font = "Hermit"; primary = green; in { home = { username = "tom"; homeDirectory = "/home/${config.home.username}"; stateVersion = "23.11"; packages = [ nixvim.packages.x86_64-linux.default (pkgs.writeShellScriptBin "passfi" (builtins.readFile ./passfi)) pkgs.acpi pkgs.binutils pkgs.brave pkgs.feh pkgs.file pkgs.firefox pkgs.gimp pkgs.htop pkgs.jq pkgs.ncdu pkgs.ncmpcpp pkgs.nmap pkgs.pavucontrol pkgs.python3Packages.ipython pkgs.tmux pkgs.tree pkgs.unzip pkgs.vim pkgs.wl-clipboard ]; sessionVariables = { LESS = "-R -F"; EDITOR = "vim"; }; }; programs = { home-manager.enable = true; alacritty = { enable = true; settings = { env.TERM = "xterm-256color"; font = { bold.family = font; bold_italic.family = font; italic.family = font; normal.family = font; size = 12; }; keyboard.bindings = [ { key = "="; mods = "ALT"; action = "IncreaseFontSize"; } { key = "-"; mods = "ALT"; action = "DecreaseFontSize"; } ]; colors = { primary = { background = "#222222"; foreground = "${white}"; }; normal = { black = "${black}"; red = "${red}"; green = "${green}"; yellow = "${yellow}"; blue = "${blue}"; magenta = "${magenta}"; cyan = "${cyan}"; white = "${white}"; }; }; }; }; git = { enable = true; userName = "tom barrett"; userEmail = "tom@tombarrett.xyz"; extraConfig = { init.defaultBranch = "master"; pull.rebase = true; push.autoSetupRemote = true; }; }; gpg.enable = true; password-store = { enable = true; package = pkgs.pass.withExtensions (exts: [exts.pass-otp]); }; waybar = { enable = true; settings = { main = { layer = "top"; position = "top"; height = 25; modules-left = ["hyprland/workspaces"]; modules-right = ["battery" "clock"]; "hyprland/workspaces" = { persistent-workspaces = { "*" = 9; }; }; }; }; style = '' * { font-family: ${font}; font-size: 16px; border-radius: 0; } window#waybar { background-color: ${primary}; } .modules-right { background-color: ${grey}; color: ${white}; } .modules-left { background-color: ${grey}; } #workspaces button { padding: 0px 5px 0px 5px; color: ${primary}; } #workspaces button.empty { background-color: ${grey}; color: ${white}; } #workspaces button.active { background-color: ${primary}; color: ${white}; } ''; }; wofi = { enable = true; settings = { hide_scroll = true; insensitive = true; }; style = '' * { font-family: ${font}; padding: 0px 0px 0px 0px; border-radius: 0; color: ${white}; } window { background-color: ${grey}; } #input { background-color: ${grey}; border: 0px; } #entry:selected { background-color: ${primary}; } ''; }; zsh = { enable = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; autocd = true; }; }; wayland.windowManager.hyprland = { enable = true; /* package = pkgs.hyprland.override { legacyRenderer = true; }; */ xwayland.enable = true; settings = { general = { layout = "master"; gaps_in = 3; gaps_out = 6; border_size = 2; "col.active_border" = "rgb(" + lib.strings.removePrefix "#" primary + ")"; "col.inactive_border" = "rgb(" + lib.strings.removePrefix "#" grey + ")"; }; cursor.no_warps = true; bind = [ "ALT, Return, exec, alacritty" "ALT, Q, killactive" "ALT, D, exec, wofi --show run" "ALT, C, exec, passfi" "ALT, X, exec, passfi otp" "ALT_SHIFT, E, exit" "ALT, J, cyclenext" "ALT, K, cyclenext, prev" "ALT, H, layoutmsg, mfact -0.05" "ALT, L, layoutmsg, mfact +0.05" "ALT, U, layoutmsg, removemaster" "ALT, I, layoutmsg, addmaster" "ALT_SHIFT, Return, layoutmsg, swapwithmaster" "ALT_SHIFT, SPACE, togglefloating" "ALT, F, fullscreen" "ALT, T, fullscreen" "ALT, M, fullscreen" "ALT, TAB, workspace, previous" "ALT, 1, workspace, 1" "ALT, 2, workspace, 2" "ALT, 3, workspace, 3" "ALT, 4, workspace, 4" "ALT, 5, workspace, 5" "ALT, 6, workspace, 6" "ALT, 7, workspace, 7" "ALT, 8, workspace, 8" "ALT, 9, workspace, 9" "ALT_SHIFT, 1, movetoworkspacesilent, 1" "ALT_SHIFT, 2, movetoworkspacesilent, 2" "ALT_SHIFT, 3, movetoworkspacesilent, 3" "ALT_SHIFT, 4, movetoworkspacesilent, 4" "ALT_SHIFT, 5, movetoworkspacesilent, 5" "ALT_SHIFT, 6, movetoworkspacesilent, 6" "ALT_SHIFT, 7, movetoworkspacesilent, 7" "ALT_SHIFT, 8, movetoworkspacesilent, 8" "ALT_SHIFT, 9, movetoworkspacesilent, 9" ]; bindm = [ "ALT, mouse:272, movewindow" "ALT, mouse:273, resizewindow" ]; decoration = { blur.enabled = false; drop_shadow = false; }; animations.enabled = false; exec-once = "waybar"; misc = { disable_hyprland_logo = true; background_color = "rgb(" + lib.strings.removePrefix "#" black + ")"; }; }; }; services = { gpg-agent = { enable = true; enableSshSupport = true; pinentryPackage = pkgs.pinentry-curses; # from gpg --list-secret-keys --with-keygrip ([A] keygrip) sshKeys = [""]; }; }; xdg.userDirs = { enable = true; extraConfig = let downloads = "${config.home.homeDirectory}/downloads"; in { XDG_DESKTOP_DIR = downloads; XDG_DOCUMENTS_DIR = downloads; XDG_DOWNLOAD_DIR = downloads; XDG_MISC_DIR = downloads; XDG_MUSIC_DIR = downloads; XDG_PICTURES_DIR = downloads; XDG_PUBLICSHARE_DIR = downloads; XDG_TEMPLATES_DIR = downloads; XDG_VIDEOS_DIR = downloads; }; }; }