diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3edefbc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result/* diff --git a/configuration.nix b/configuration.nix index bb36b1e..55f2706 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,15 +1,16 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { nix.settings.experimental-features = ["nix-command" "flakes"]; - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; # Bootloader. boot.loader.systemd-boot.enable = true; @@ -41,8 +42,8 @@ users.users.fabric = { isNormalUser = true; description = "fabric"; - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; []; + extraGroups = ["networkmanager" "wheel" "docker"]; + shell = pkgs.zsh; }; # Allow unfree packages @@ -52,15 +53,16 @@ # $ nix search wget environment.systemPackages = with pkgs; [ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget + # wget greetd.greetd greetd.tuigreet - xorg.xinit libinput libnotify + kitty + zsh ]; - fonts.packages = with pkgs; [ nerdfonts ]; + fonts.packages = with pkgs; [nerdfonts]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. @@ -75,39 +77,39 @@ # Enable the OpenSSH daemon. services.openssh.enable = true; services.greetd = { - enable = true; - settings = { - default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time "; - user = "fabric"; - }; - }; - }; - services.xserver = { - enable = true; - windowManager.i3.enable = true; - displayManager.startx.enable = true; - libinput.enable = true; - videoDrivers = ["nvidia"]; + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time "; + user = "fabric"; + }; + }; }; services.displayManager = { - defaultSession = "none+i3"; + defaultSession = "hyprland"; }; + services.xserver.videoDrivers = ["nvidia"]; hardware = { - graphics = { - enable = true; - }; - nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; - open = false; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; + graphics = { + enable = true; }; - programs.steam.enable = true; + nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + }; + programs = { + steam.enable = true; + hyprland.enable = true; + zsh.enable = true; + }; + + virtualisation.docker.enable = true; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; @@ -117,9 +119,8 @@ # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. + #this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "24.11"; # Did you read the comment? - } diff --git a/flake.lock b/flake.lock index 4db5986..0fdf79f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,190 @@ { "nodes": { + "ags": { + "inputs": { + "astal": "astal", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1734091628, + "narHash": "sha256-8O3i8zESjHVsGzyXb8gEpLztvANq3Ot5bwo60YKJc7k=", + "owner": "aylur", + "repo": "ags", + "rev": "27cd93147aba09142fa585fd16f13c56268b696c", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "ags", + "type": "github" + } + }, + "astal": { + "inputs": { + "nixpkgs": [ + "hyprpanel", + "ags", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733520119, + "narHash": "sha256-6K07ZJTnFu1xASBCMtVc9cFTbBEauwSc7gGBmjLkLSk=", + "owner": "aylur", + "repo": "astal", + "rev": "4c19d8d06fa25cc6389f37abe8839b4d8be5c0d6", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, + "astal_2": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1734814417, + "narHash": "sha256-R+tLGIxlaqsOmV52TdXHP0u33q5PdJ77gtiUPK5BbMg=", + "owner": "aylur", + "repo": "astal", + "rev": "3468763d51d389c67ec7b1a390ffa8a5328bddb6", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", + "owner": "numtide", + "repo": "devshell", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1734425854, + "narHash": "sha256-nzE5UbJ41aPEKf8R2ZFYtLkqPmF7EIUbNEdHMBLg0Ig=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "0ddd26d0925f618c3a5d85a4fa5eb1e23a09491d", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -21,7 +206,148 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1734366194, + "narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, + "hyprpanel": { + "inputs": { + "ags": "ags", + "astal": "astal_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735049846, + "narHash": "sha256-pjfcgsYsRmTI1B+mFVz/Rgc+SppWDBjORxRXKrDXc5E=", + "owner": "jas-singhfsu", + "repo": "hyprpanel", + "rev": "1b31f04ba957f8e5bd745167b102f2b529f668d6", + "type": "github" + }, + "original": { + "owner": "jas-singhfsu", + "repo": "hyprpanel", + "type": "github" + } + }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729958008, + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.6", + "repo": "ixx", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1733581040, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1735268880, + "narHash": "sha256-7QEFnKkzD13SPxs+UFR5bUFN2fRw+GlL0am72ZjNre4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7cc0bff31a3a705d3ac4fdceb030a17239412210", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1734424634, + "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1734323986, "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", @@ -37,10 +363,101 @@ "type": "github" } }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1734784342, + "narHash": "sha256-uap4LcvjpTz5WTgDfQYtL3QCpGmtee7DuD5mB8AIiLw=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "334947672f1eb05488e69657b9c412230bd658b4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "nixos-24.11", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733773348, + "narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=", + "owner": "NuschtOS", + "repo": "search", + "rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "hyprpanel": "hyprpanel", + "nixpkgs": "nixpkgs_3", + "nixpkgs-unstable": "nixpkgs-unstable", + "nixvim": "nixvim" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1734704479, + "narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index f4791be..91db75e 100644 --- a/flake.nix +++ b/flake.nix @@ -3,27 +3,51 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11"; - home-manager.url = "github:nix-community/home-manager/release-24.11"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + home-manager = { + url = "github:nix-community/home-manager/release-24.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + hyprpanel = { + url = "github:jas-singhfsu/hyprpanel"; + inputs.nixpkgs.follows = "nixpkgs"; + # inputs.home-manager.follows = "home-manager"; # Add this line + }; + + nixvim = { + url = "github:nix-community/nixvim/nixos-24.11"; + # If using a stable channel you can use `url = "github:nix-community/nixvim/nixos-"` + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, home-manager, ...}: + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, nixvim, hyprpanel,...}: let lib = nixpkgs.lib; pkgs = nixpkgs.legacyPackages."x86_64-linux"; + pkgsUnstable = nixpkgs-unstable.legacyPackages."x86_64-linux"; in { nixosConfigurations = { Tatara = lib.nixosSystem { system = "x86_64-linux"; - modules = [ ./configuration.nix ]; + modules = [ + ./configuration.nix + ]; }; }; - homeConfigurations = { - fabric = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ ./home.nix ]; + homeConfigurations.fabric = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { + inherit nixvim hyprpanel; }; - }; - }; -} + modules = [ + ./home.nix + nixvim.homeManagerModules.nixvim + hyprpanel.homeManagerModules.hyprpanel + ]; + }; + }; +} diff --git a/home.nix b/home.nix index ccfdbd3..a7becac 100644 --- a/home.nix +++ b/home.nix @@ -1,6 +1,11 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + hyprpanel, + pkgsUnstable, + nixvim, + ... +}: { nixpkgs.config = { allowUnfree = true; }; @@ -8,56 +13,662 @@ # manage. home.username = "fabric"; home.homeDirectory = "/home/fabric"; - - home.stateVersion = "24.11"; + home.stateVersion = "24.11"; home.packages = with pkgs; [ - neovim git kitty firefox mpv - i3blocks - feh - maim - scrot - rofi - picom nerdfonts tmux discord fzf yazi zsh - flameshot - dunst pavucontrol + wofi + deno + hyprpanel + alejandra + rustup + tmuxPlugins.sensible + tmuxPlugins.vim-tmux-navigator + tmuxPlugins.onedark-theme + nodePackages.prettier + nodePackages.tailwindcss + prettierd + nodejs_23 ]; - services = { - dunst = { - enable = true; - configFile = /home/fabric/.config/dunst/customDunstrc; - }; - }; - home.sessionVariables = { EDITOR = "nvim"; - }; - - xsession.windowManager.i3 = { - enable = true; - extraConfig = builtins.readFile ./dotfiles/i3/.config/i3/config; + SHELL = "zsh"; }; # Let Home Manager install and manage itself. programs = { home-manager.enable = true; + zsh = { + enable = true; + autosuggestion = { + enable = true; + }; + oh-my-zsh = { + enable = true; + }; + initExtra = '' + export PATH="/home/fabric/.deno/bin:$PATH" + ''; + }; + oh-my-posh = { + enable = true; + enableZshIntegration = true; + useTheme = "easy-term"; + }; + + nixvim = { + enable = true; + plugins = { + web-devicons.enable = true; + nix.enable = true; + bufferline.enable = true; + lualine.enable = true; + luasnip.enable = true; + yanky = { + enable = true; + settings = { + highlight.timer = 150; + }; + }; + telescope = { + enable = true; + keymaps = { + " " = { + action = "git_files"; + }; + }; + settings = { + defaults = { + file_ignore_patterns = [ + "^.git/" + "^.mypy_cache/" + "^__pycache__/" + "^output/" + "^data/" + "%.ipynb" + "^node_modules/" + "^.next/" + "%.env" + "%.env.local" + "%.env.development.local" + "%.env.test.local" + "%.env.production.local" + "^npm-debug.log" + "^yarn-debug.log" + "^yarn-error.log" + "^.vercel/" + "^.turbo/" + "^build/" + "^.DS_Store" + "^.tailwindcss/" + "^tailwind.config.js.backup" + "%.css.map" + "^styles/dist/" + ]; + }; + }; + }; + treesitter = { + enable = true; + settings = { + highlight.enable = true; + indent.enable = true; + auto_install = true; + ensure_installed = [ + "bash" + "c" + "diff" + "html" + "javascript" + "jsdoc" + "json" + "jsonc" + "lua" + "luadoc" + "luap" + "markdown" + "markdown_inline" + "printf" + "python" + "query" + "regex" + "toml" + "tsx" + "typescript" + "vim" + "vimdoc" + "xml" + "yaml" + ]; + }; + }; + snacks = { + enable = true; + }; + indent-blankline.enable = true; + harpoon = { + enable = true; + keymaps = { + addFile = "a"; + toggleQuickMenu = ""; + navFile = { + "1" = "6"; + "2" = "7"; + "3" = "8"; + "4" = "9"; + }; + }; + }; + yazi.enable = true; + gitsigns = { + enable = true; + settings = { + current_line_blame = true; + current_line_blame_opts = { + virt_text = true; + virt_text_pos = "eol"; + }; + signcolumn = true; + signs = { + add = { + text = "▎"; + }; + change = { + text = "▎"; + }; + changedelete = { + text = "▎"; + }; + delete = { + text = ""; + }; + topdelete = { + text = ""; + }; + untracked = { + text = "▎"; + }; + }; + watch_gitdir = { + follow_files = true; + }; + }; + }; + conform-nvim = { + enable = true; + settings = { + formatters_by_ft = { + nix = ["alejandra"]; + # Use prettierd first, fallback to prettier + javascript = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + stop_after_first = true; + }; + typescript = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + stop_after_first = true; + }; + javascriptreact = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + stop_after_first = true; + }; + typescriptreact = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + stop_after_first = true; + }; + css = ["prettier"]; + scss = ["prettier"]; + html = ["prettier"]; + json = ["prettier"]; + markdown = ["prettier"]; + # Run on all files + "_" = ["trim_whitespace" "trim_newlines"]; + }; + format_on_save = { + timeout_ms = 500; + lsp_fallback = true; + }; + formatters = { + prettier = { + command = "prettier"; + args = [ + "--plugin=prettier-plugin-tailwindcss" + "--print-width=80" + "--tab-width=2" + "--use-tabs=false" + "--semi=true" + "--single-quote=false" + "--trailing-comma=es5" + "--bracket-spacing=true" + ]; + }; + # Optional: Add prettierd for faster formatting + prettierd = { + command = "prettierd"; + args = ["$FILENAME"]; + }; + }; + # Additional useful settings from the docs + log_level = "warn"; + notify_on_error = true; + notify_no_formatters = false; + }; + }; + which-key.enable = true; + undotree = { + enable = true; + }; + mini = { + enable = true; + modules = { + pairs.enable = true; + surround.enable = true; + }; + }; + lsp = { + enable = true; + servers = { + ts_ls.enable = true; + eslint.enable = true; + nil_ls.enable = true; + tailwindcss.enable = true; + }; + }; + cmp = { + enable = true; + autoEnableSources = true; + settings = { + sources = [ + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} + ]; + mapping = { + __raw = '' + cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.confirm(), + }) + ''; + }; + }; + }; + tmux-navigator.enable = true; + vim-suda.enable = true; + }; + globals.mapleader = " "; + opts = { + relativenumber = true; + number = true; + tabstop = 2; + shiftwidth = 2; + expandtab = true; + autoindent = true; + wrap = false; + cursorline = true; + mouse = "a"; + clipboard = "unnamedplus"; + splitright = true; + splitbelow = true; + ignorecase = true; + smartcase = true; + termguicolors = true; + signcolumn = "yes"; + scrolloff = 12; + }; + keymaps = [ + { + mode = "n"; + key = ""; + action = "h"; + options = { + desc = "Go to Left Window"; + remap = true; + }; + } + { + mode = "n"; + key = ""; + action = "j"; + options = { + desc = "Go to Lower Window"; + remap = true; + }; + } + { + mode = "n"; + key = ""; + action = "k"; + options = { + desc = "Go to Upper Window"; + remap = true; + }; + } + { + mode = "n"; + key = ""; + action = "l"; + options = { + desc = "Go to Right Window"; + remap = true; + }; + } + + # Window resizing + { + mode = "n"; + key = ""; + action = "resize +2"; + options.desc = "Increase Window Height"; + } + { + mode = "n"; + key = ""; + action = "resize -2"; + options.desc = "Decrease Window Height"; + } + { + mode = "n"; + key = ""; + action = "vertical resize -2"; + options.desc = "Decrease Window Width"; + } + { + mode = "n"; + key = ""; + action = "vertical resize +2"; + options.desc = "Increase Window Width"; + } + { + action = ":UndotreeToggle"; + key = "u"; + mode = ["n"]; + } + { + action = ":m '>+1gv=gv"; + key = "J"; + mode = ["v"]; + } + { + action = ":m '<-2gv=gv"; + key = "K"; + mode = ["v"]; + } + { + mode = "n"; + key = "sv"; + action = "v"; + } + { + mode = "n"; + key = "sh"; + action = "s"; + } + { + mode = "n"; + key = "e"; + action = ":Yazi"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "n"; + key = ""; + action = "zz"; + } + { + mode = "x"; + key = "p"; + action = "\"_dP"; + } + ]; + colorschemes.rose-pine.enable = true; + }; + git = { + enable = true; userName = "FabricSoul"; userEmail = "fabric.soul7@gmail.com"; }; + tmux = { + enable = true; + plugins = with pkgs.tmuxPlugins; [ + sensible + onedark-theme + vim-tmux-navigator + ]; + + # General settings + baseIndex = 1; + mouse = true; + keyMode = "vi"; + + # Custom key bindings + extraConfig = '' + # Set pane base index + setw -g pane-base-index 1 + + # Vi copy mode bindings + bind-key -T copy-mode-vi v send-keys -X begin-selection + bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" + bind-key P paste-buffer + bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy" + ''; + }; + hyprpanel = { + # Enable the module. + # Default: false + enable = true; + + # Automatically restart HyprPanel with systemd. + # Useful when updating your config so that you + # don't need to manually restart it. + # Default: false + systemd.enable = true; + + # Add '/nix/store/.../hyprpanel' to the + # 'exec-once' in your Hyprland config. + # Default: false + hyprland.enable = true; + + # Fix the overwrite issue with HyprPanel. + # See below for more information. + # Default: false + overwrite.enable = false; + + # Import a specific theme from './themes/*.json'. + # Default: "" + theme = "rose_pine_moon_split"; + + # Configure bar layouts for monitors. + # See 'https://hyprpanel.com/configuration/panel.html'. + # Default: null + layout = { + "bar.layouts" = { + "0" = { + left = ["dashboard" "workspaces" "windowtitle"]; + middle = ["clock"]; + right = ["volume" "network" "bluetooth" "systray" "media" "notifications"]; + }; + }; + }; + + # Configure and theme *most* of the options from the GUI. + # See './nix/module.nix:103'. + # Default: + settings = { + bar.launcher.autoDetectIcon = true; + bar.workspaces.show_icons = true; + + menus.clock = { + time = { + military = true; + hideSeconds = false; + }; + weather.unit = "metric"; + }; + + menus.dashboard.directories.enabled = false; + menus.dashboard.stats.enable_gpu = true; + + theme.bar.transparent = false; + + theme.font = { + name = "CaskaydiaCove NF"; + size = "16px"; + }; + }; + }; + kitty = { + enable = true; + settings = { + # Basic settings + enable_audio_bell = false; + font_family = "FiraCodeNerdFont"; + bold_font = "auto"; + italic_font = "auto"; + bold_italic_font = "auto"; + font_size = 11; + background_opacity = "0.80"; + confirm_os_window_close = 0; + + # Basic colors + foreground = "#CDD6F4"; + background = "#1E1E2E"; + selection_foreground = "#1E1E2E"; + selection_background = "#F5E0DC"; + + # Cursor colors + cursor = "#F5E0DC"; + cursor_text_color = "#1E1E2E"; + + # URL underline color + url_color = "#F5E0DC"; + + # Window border colors + active_border_color = "#B4BEFE"; + inactive_border_color = "#6C7086"; + bell_border_color = "#F9E2AF"; + + # OS Window titlebar colors + wayland_titlebar_color = "#1E1E2E"; + macos_titlebar_color = "#1E1E2E"; + + # Tab bar colors + active_tab_foreground = "#11111B"; + active_tab_background = "#CBA6F7"; + inactive_tab_foreground = "#CDD6F4"; + inactive_tab_background = "#181825"; + tab_bar_background = "#11111B"; + + # Mark colors + mark1_foreground = "#1E1E2E"; + mark1_background = "#B4BEFE"; + mark2_foreground = "#1E1E2E"; + mark2_background = "#CBA6F7"; + mark3_foreground = "#1E1E2E"; + mark3_background = "#74C7EC"; + + # The 16 terminal colors + color0 = "#45475A"; + color8 = "#585B70"; + color1 = "#F38BA8"; + color9 = "#F38BA8"; + color2 = "#A6E3A1"; + color10 = "#A6E3A1"; + color3 = "#F9E2AF"; + color11 = "#F9E2AF"; + color4 = "#89B4FA"; + color12 = "#89B4FA"; + color5 = "#F5C2E7"; + color13 = "#F5C2E7"; + color6 = "#94E2D5"; + color14 = "#94E2D5"; + color7 = "#BAC2DE"; + color15 = "#A6ADC8"; + }; + }; }; + wayland.windowManager.hyprland = { + enable = true; + settings = { + "$mainMod" = "SUPER"; + "$terminal" = "kitty"; + "$fileManager " = "dolphin"; + "$menu" = "wofi --show drun"; + + windowrule = [ + "workspace 6 silent,^(discord)$" + "workspace 7 silent,^(kitty)$" + "workspace 8 silent,^(firefox)$" + ]; + + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + bind = [ + "$mainMod, T, exec, $terminal" + "$mainMod, Q, killactive" + "$mainMod, M, exit" + "$mainMod, E, exec, $fileManager" + "$mainMod, V, togglefloating" + "$mainMod, SPACE, exec, $menu" + # "$mainMod, P, pseudo" # dwindle + # "$mainMod, J, togglesplit" # dwindle + + # Move focus with mainMod + arrow keys + "$mainMod, H, movefocus, l" + "$mainMod, L, movefocus, r" + "$mainMod, K, movefocus, u" + "$mainMod, J, movefocus, d" + + # Switch workspaces with mainMod + [0-9] + "$mainMod, 1, workspace, 1" + "$mainMod, 2, workspace, 2" + "$mainMod, 3, workspace, 3" + "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + + # Move active window to a workspace with mainMod + SHIFT + [0-9] + "$mainMod SHIFT, 1, movetoworkspace, 1" + "$mainMod SHIFT, 2, movetoworkspace, 2" + "$mainMod SHIFT, 3, movetoworkspace, 3" + "$mainMod SHIFT, 4, movetoworkspace, 4" + "$mainMod SHIFT, 5, movetoworkspace, 5" + "$mainMod SHIFT, 6, movetoworkspace, 6" + "$mainMod SHIFT, 7, movetoworkspace, 7" + "$mainMod SHIFT, 8, movetoworkspace, 8" + "$mainMod SHIFT, 9, movetoworkspace, 9" + "$mainMod SHIFT, 0, movetoworkspace, 10" + ]; + # monitor = [ + # "DP-1, 1920x1080@144, 1" + # ]; + }; + }; + home.sessionVariables.NIXOS_OZONE_WL = "1"; fonts.fontconfig.enable = true; }