diff --git a/flake.lock b/flake.lock index 58970a5..278f69f 100644 --- a/flake.lock +++ b/flake.lock @@ -55,11 +55,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1677104801, - "narHash": "sha256-2V5nKOYVFMYlseYdDKiEaww2xqcE0GtS1ax3SoUX99I=", + "lastModified": 1677621055, + "narHash": "sha256-n3D/pZX0cYEpWKcLJSFImo5Dpk3D1RrxKVDmI6lnaIg=", "owner": "nix-community", "repo": "home-manager", - "rev": "4295fdfa6b0005c32f2e1f0b732faf5810c1bc7f", + "rev": "ef7d316578367ed7732a21eede6c79546a36124f", "type": "github" }, "original": { @@ -78,11 +78,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1677162463, - "narHash": "sha256-wjZbwJvIagJ0i82LYm3eIHNsqwblOjIzAyegA3z9olA=", + "lastModified": 1677626247, + "narHash": "sha256-6Yh54fpH0jnomBDLPWTcKQSIdFXvnfc6sS0tPWNx1MY=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "60e37d727def25c87a3fd6c47751c05f6082260f", + "rev": "0e252d2c7770f712ed5395d75e31138abf0ea048", "type": "github" }, "original": { @@ -138,11 +138,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1677225707, - "narHash": "sha256-V+8RDil3L1SK1D5KFdVxvFmIRZkKvc8GhmJywx9K0io=", + "lastModified": 1677570356, + "narHash": "sha256-KbXK9ByJtuuO+NG/QOl5ULvSktqLq0IAF6DJjsgOO/Y=", "owner": "neovim", "repo": "neovim", - "rev": "306e67358377cd17bb20104ec4f8d27619937ad6", + "rev": "8acb3d742ce68adadf1def9e1d1bb5bfd671988c", "type": "github" }, "original": { @@ -159,11 +159,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1677226520, - "narHash": "sha256-27N8sBU+6osBNK56pY6bJEt9nb/tM48w8bWpW9BoUZg=", + "lastModified": 1677572160, + "narHash": "sha256-DEEwY6si6ZNVAQePpNUooMTOH/mRe04XVqtTlYCWiE8=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "e629f6741755e5c8c28f6335c592b7849649792c", + "rev": "4b2773ee687616104855a759a71591f875c29414", "type": "github" }, "original": { @@ -193,11 +193,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1677142198, - "narHash": "sha256-Y/uC2ZmkQkyrdRZ5szZilhZ/46786Wio5CGTgL+Vb/c=", + "lastModified": 1677468890, + "narHash": "sha256-V4MPvt4PKaHSInRLWpaF8ICdC91SH+5bdd0FGxalJIg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "03fb72201639e5274fee6d77b0d9c66e98329aba", + "rev": "3f19c04354dec3903f614eae09327a04d297835d", "type": "github" }, "original": { @@ -224,11 +224,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1677063315, - "narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=", + "lastModified": 1677407201, + "narHash": "sha256-3blwdI9o1BAprkvlByHvtEm5HAIRn/XPjtcfiunpY7s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "988cc958c57ce4350ec248d2d53087777f9e1949", + "rev": "7f5639fa3b68054ca0b062866dc62b22c3f11505", "type": "github" }, "original": { @@ -240,11 +240,11 @@ }, "nur": { "locked": { - "lastModified": 1677243766, - "narHash": "sha256-a+2V68cLjb951pYBEGbQGEVBcgti40uWtxTVnzvGFhY=", + "lastModified": 1677620771, + "narHash": "sha256-1APWgJwUewZcTYjC3Ih1bA1P/Oese4vsKc4wu8vv42w=", "owner": "nix-community", "repo": "NUR", - "rev": "9bde3171aeb5954b7955fcb09b231f53caf76b54", + "rev": "471f23c2b9cbfaf0384cc0e456cc27823e30ba09", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1341057..19dc706 100644 --- a/flake.nix +++ b/flake.nix @@ -108,6 +108,7 @@ fonts.enable = true; nixconf.enable = true; wayland.enable = true; + games.enable = true; }; homeModules = { hyprland.enable = true; diff --git a/modules/home/apps/default.nix b/modules/home/apps/default.nix index c5f58ff..9626875 100644 --- a/modules/home/apps/default.nix +++ b/modules/home/apps/default.nix @@ -18,11 +18,14 @@ with lib; let in { imports = [ ./gtk.nix ]; options.modules.apps = {enable = mkEnableOption "apps";}; + options.darkColors = lib.mkOption { + type = with types; attrsOf str; + }; config = mkIf cfg.enable { home.packages = with pkgs; [ - google-chrome + # google-chrome firefox mpv xdg-utils @@ -30,12 +33,13 @@ in { swaylock swayidle zathura + cliphist ] ++ [lock]; programs.kitty = { enable = true; - settings = with config.colorScheme.colors; { + settings = with config.darkColors; { foreground = "#${base05}"; background = "#${base00}"; selection_background = "#${base05}"; @@ -49,25 +53,34 @@ in { inactive_tab_background = "#${base01}"; inactive_tab_foreground = "#${base04}"; tab_bar_background = "#${base01}"; + + enable_audio_bell = false; + confirm_os_window_close = 0; + disable_ligatures = "always"; + #placement_strategy bottom-center + + tab_bar_min_tabs = 3; + tab_bar_style = "separator"; + tab_bar_edge = "top"; }; extraConfig = '' - enable_audio_bell no - confirm_os_window_close 0 - disable_ligatures always - clear_all_shortcuts yes kitty_mod alt map ctrl+shift+c copy_to_clipboard map ctrl+shift+v paste_from_clipboard - + map ctrl+equal change_font_size current +2.0 + map ctrl+plus change_font_size current +2.0 + map ctrl+minus change_font_size current -2.0 + map ctrl+backspace change_font_size current 0 + # map kitty_mod+r launch --type background --stdin-source=@screen_scrollback sh -c 'grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | sort -u | rofi -dmenu -p "Launch in browser" | xargs xdg-open' map kitty_mod+r open_url_with_hints - map kitty_mod+n launch --type=tab --cwd=current + map kitty_mod+t launch --type=tab --cwd=current - map kitty_mod+k scroll_line_up - map kitty_mod+j scroll_line_down + map kitty_mod+e scroll_line_up + map kitty_mod+y scroll_line_down map kitty_mod+h previous_tab map kitty_mod+l next_tab @@ -174,5 +187,9 @@ in { pictures = "${config.home.homeDirectory}/stuff"; publicShare = "${config.home.homeDirectory}/stuff"; }; + + xdg.configFile."nixpkgs/config.nix".text = '' + { allowUnfree = true; } + ''; }; } diff --git a/modules/home/colors/default.nix b/modules/home/colors/default.nix index 6b93583..efaf039 100644 --- a/modules/home/colors/default.nix +++ b/modules/home/colors/default.nix @@ -1,34 +1,74 @@ -{ nix-colors, lib, ... }: rec { +{ nix-colors, lib, pkgs, ... }: rec { imports = [ nix-colors.homeManagerModule ]; - colorScheme = { - slug = "catppuccin-mocha"; - name = "Catppuccin Mocha"; - author = "https://github.com/catppuccin/catppuccin"; - colors = { - base00 = "1e1e2e"; # base - base01 = "181825"; # mantle - base02 = "313244"; # surface0 - base03 = "45475a"; # surface1 - base04 = "585b70"; # surface2 - base05 = "cdd6f4"; # text - base06 = "f5e0dc"; # rosewater - base07 = "b4befe"; # lavender - base08 = "f38ba8"; # red - base09 = "fab387"; # peach - base0A = "f9e2af"; # yellow - base0B = "a6e3a1"; # green - base0C = "94e2d5"; # teal - base0D = "89b4fa"; # blue - base0E = "cba6f7"; # mauve - base0F = "f2cdcd"; # flamingo + home.packages = with pkgs; [ + (google-chrome.override { + commandLineArgs = ["--force-dark-mode" "--enable-features=WebUIDarkMode"]; + }) + home-manager + ]; + + + colorScheme = lib.mkDefault specialization.dark.configuration.colorScheme; + darkColors = specialization.dark.configuration.colorScheme.colors; + specialization = { + dark.configuration = { + colorScheme = { + slug = "catppuccin-mocha"; + name = "Catppuccin Mocha"; + author = "https://github.com/catppuccin/catppuccin"; + colors = { + base00 = "1e1e2e"; # base + base01 = "181825"; # mantle + base02 = "313244"; # surface0 + base03 = "45475a"; # surface1 + base04 = "585b70"; # surface2 + base05 = "cdd6f4"; # text + base06 = "f5e0dc"; # rosewater + base07 = "b4befe"; # lavender + base08 = "f38ba8"; # red + base09 = "fab387"; # peach + base0A = "f9e2af"; # yellow + base0B = "a6e3a1"; # green + base0C = "94e2d5"; # teal + base0D = "89b4fa"; # blue + base0E = "cba6f7"; # mauve + base0F = "f2cdcd"; # flamingo + }; + }; + }; + + light.configuration = { + colorScheme = { + slug = "catppuccin-latte"; + name = "Catppuccin Latte"; + author = "https://github.com/catppuccin/catppuccin"; + colors = { + base00 = "eff1f5"; # base + base01 = "e6e9ef"; # mantle + base02 = "ccd0da"; # surface0 + base03 = "bcc0cc"; # surface1 + base04 = "acb0be"; # surface2 + base05 = "4c4f69"; # text + base06 = "dc8a78"; # rosewater + base07 = "7287fd"; # lavender + base08 = "d20f39"; # red + base09 = "fe640b"; # peach + base0A = "df8e1d"; # yellow + base0B = "40a02b"; # green + base0C = "179299"; # teal + base0D = "1e66f5"; # blue + base0E = "8839ef"; # mauve + base0F = "dd7878"; # flamingo + }; + }; + + programs.kitty.settings = { + background_opacity = "0.7"; + dynamic_background_opacity = true; + }; }; }; - specialization.test.configuration = { - home.file.testfile.text = "very special"; - }; - - } diff --git a/modules/home/hyprland/hyprland.conf b/modules/home/hyprland/hyprland.conf index ed5e18e..59a51ac 100644 --- a/modules/home/hyprland/hyprland.conf +++ b/modules/home/hyprland/hyprland.conf @@ -6,7 +6,7 @@ exec-once=swayidle -w timeout 1200 lock before-sleep lock exec-once=/home/zoriya/.config/hypr/wallpaper.sh init exec-once=kitty --class=scratchpad exec-once=fcitx5 -d - +exec-once = wl-paste --type text --watch cliphist store autogenerated = 0 @@ -129,7 +129,7 @@ bind = $mainMod, F, fullscreen, 0 bind = $mainMod SHIFT, F, fakefullscreen, bind = $mainMod, backslash, togglespecialworkspace, special:default -bind = $mainMod, V, togglefloating, +bind = $mainMod, SLASH, togglefloating, # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l @@ -149,6 +149,7 @@ bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 bind = $mainMod, S, togglespecialworkspace, default +bind = $mainMod, space, togglespecialworkspace, scratchpad bind = $mainMod, backslash, togglespecialworkspace, scratchpad # Move active window to a workspace with mainMod + SHIFT + [0-9] @@ -172,6 +173,8 @@ bind = $mainMod, E, exec, kitty bind = $mainMod, R, exec, google-chrome-stable bind = $mainMod, P, exec, rofi -show run bind = $mainMod, X, exec, grim -g "$(slurp -b 00000000 -s 61616140)" - | wl-copy +bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy +# bind = $mainMod, SPACE, exec, gfold | rofi -dmenu | #bindr = SUPER, SUPER_L, exec, ~/.config/eww/togglepanel.sh bindl=,XF86MonBrightnessUp,exec,brightnessctl set 5%+ diff --git a/modules/home/nvim/lua/plugins/colorscheme.lua b/modules/home/nvim/lua/plugins/colorscheme.lua index 2992b49..f6c283a 100644 --- a/modules/home/nvim/lua/plugins/colorscheme.lua +++ b/modules/home/nvim/lua/plugins/colorscheme.lua @@ -4,51 +4,47 @@ return { name = "catppuccin", lazy = false, priority = 1000, - config = function() - require("catppuccin").setup({ - integrations = { - which_key = true, - lsp_trouble = true, - telescope = true, - treesitter = true, - neotree = true, - noice = true, - mini = true, - leap = true, - cmp = true, - native_lsp = { - enabled = true - }, - navic = true, - harpoon = true, - gitsigns = true, - semantic_tokens = true, - indent_blankline = { - enabled = true, - }, + opts = { + integrations = { + which_key = true, + lsp_trouble = true, + telescope = true, + treesitter = true, + neotree = true, + noice = true, + mini = true, + leap = true, + cmp = true, + native_lsp = { + enabled = true + }, + navic = true, + harpoon = true, + gitsigns = true, + semantic_tokens = true, + indent_blankline = { + enabled = true, + }, + }, + custom_highlights = function(colors) + return { + TelescopeMatching = { fg = colors.flamingo }, + TelescopeSelection = { fg = colors.text, bg = colors.surface0, bold = true }, + TelescopePromptPrefix = { bg = colors.surface0 }, + TelescopePromptNormal = { bg = colors.surface0 }, + TelescopeResultsNormal = { bg = colors.mantle }, + TelescopePreviewNormal = { bg = colors.mantle }, + TelescopePromptBorder = { bg = colors.surface0, fg = colors.surface0 }, + TelescopeResultsBorder = { bg = colors.mantle, fg = colors.mantle }, + TelescopePreviewBorder = { bg = colors.mantle, fg = colors.mantle }, + TelescopePromptTitle = { bg = colors.pink, fg = colors.mantle }, + TelescopeResultsTitle = { fg = colors.mantle }, + TelescopePreviewTitle = { bg = colors.green, fg = colors.mantle }, } - }) - - local colors = require("catppuccin.palettes").get_palette() - local TelescopeColor = { - TelescopeMatching = { fg = colors.flamingo }, - TelescopeSelection = { fg = colors.text, bg = colors.surface0, bold = true }, - - TelescopePromptPrefix = { bg = colors.surface0 }, - TelescopePromptNormal = { bg = colors.surface0 }, - TelescopeResultsNormal = { bg = colors.mantle }, - TelescopePreviewNormal = { bg = colors.mantle }, - TelescopePromptBorder = { bg = colors.surface0, fg = colors.surface0 }, - TelescopeResultsBorder = { bg = colors.mantle, fg = colors.mantle }, - TelescopePreviewBorder = { bg = colors.mantle, fg = colors.mantle }, - TelescopePromptTitle = { bg = colors.pink, fg = colors.mantle }, - TelescopeResultsTitle = { fg = colors.mantle }, - TelescopePreviewTitle = { bg = colors.green, fg = colors.mantle }, - } - - for hl, col in pairs(TelescopeColor) do - vim.api.nvim_set_hl(0, hl, col) - end + end, + }, + config = function(_, opts) + require("catppuccin").setup(opts) vim.cmd([[colorscheme catppuccin-mocha]]) end }, diff --git a/modules/home/nvim/lua/plugins/ui.lua b/modules/home/nvim/lua/plugins/ui.lua index f0d4a6e..aa72fee 100644 --- a/modules/home/nvim/lua/plugins/ui.lua +++ b/modules/home/nvim/lua/plugins/ui.lua @@ -19,7 +19,7 @@ return { vim.cmd [[ augroup virtcolumn autocmd! - autocmd FileType * if index(["netrw", "NvimTree", "neo-tree", "UltestAttach", "dap-float", "Trouble", "lspinfo", "qf", "harpoon", "toggleterm", "packer"], &ft) == -1 | lua require("virt-column").setup_buffer({ virtcolumn = "80,120", char = "▏" }) + autocmd FileType * if index(["netrw", "NvimTree", "neo-tree", "TelescopePrompt", "TelescopeResults", "UltestAttach", "dap-float", "Trouble", "lspinfo", "qf", "harpoon", "toggleterm", "packer"], &ft) == -1 | lua require("virt-column").setup_buffer({ virtcolumn = "80,120", char = "▏" }) augroup end ]] end, diff --git a/modules/home/zsh/default.nix b/modules/home/zsh/default.nix index fde6d4d..b7dfe16 100644 --- a/modules/home/zsh/default.nix +++ b/modules/home/zsh/default.nix @@ -20,6 +20,8 @@ in { tldr jq fd + duf + ncdu ripgrep psmisc atuin diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 0480499..758e79b 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -3,10 +3,14 @@ ./fonts ./nix ./wayland + ./games ]; boot.loader = { - systemd-boot.enable = true; + systemd-boot = { + enable = true; + configurationLimit = 4; + }; efi.canTouchEfiVariables = true; }; networking.networkmanager.enable = true; diff --git a/modules/nixos/games/default.nix b/modules/nixos/games/default.nix new file mode 100644 index 0000000..c50e700 --- /dev/null +++ b/modules/nixos/games/default.nix @@ -0,0 +1,16 @@ +{ pkgs, config, lib, ... }: let +cfg = config.games; +in { + options.games = { enable = lib.mkEnableOption "games"; }; + config = lib.mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + + environment.systemPackages = with pkgs; [ + steam-run + ]; + }; + }; +}