diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 64a1b52..022539a 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -17,8 +17,8 @@ nixpkgs.lib.nixosSystem { identityFile = "/home/${globals.user}/.ssh/id_ed25519"; gui.enable = true; theme = { - colors = (import ../../modules/colorscheme/gruvbox).dark; - dark = true; + colors = (import ../../modules/colorscheme/gruvbox).light; + dark = false; }; wallpaper = "${wallpapers}/gruvbox/road.jpg"; gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark"; diff --git a/modules/applications/firefox.nix b/modules/applications/firefox.nix index 723d8d6..6ef36ab 100644 --- a/modules/applications/firefox.nix +++ b/modules/applications/firefox.nix @@ -45,6 +45,8 @@ "toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Allow userChrome.css "layout.css.color-mix.enabled" = true; + "ui.systemUsesDarkTheme" = + if config.theme.dark == true then 1 else 0; }; userChrome = '' :root { diff --git a/modules/colorscheme/gruvbox/default.nix b/modules/colorscheme/gruvbox/default.nix index 3567f00..07441ed 100644 --- a/modules/colorscheme/gruvbox/default.nix +++ b/modules/colorscheme/gruvbox/default.nix @@ -20,6 +20,7 @@ base0E = "#d3869b"; # purple base0F = "#d65d0e"; # brown neovimConfig = ./neovim.lua; + batTheme = "gruvbox-dark"; }; light = { base00 = "#fbf1c7"; # ---- @@ -38,6 +39,7 @@ base0D = "#076678"; # blue base0E = "#8f3f71"; # purple base0F = "#d65d0e"; # brown - neovimConfig = ./neovim-light.lua; + neovimConfig = ./neovim.lua; + batTheme = "gruvbox-light"; }; } diff --git a/modules/colorscheme/gruvbox/neovim.lua b/modules/colorscheme/gruvbox/neovim.lua index db3f77c..086b0cb 100644 --- a/modules/colorscheme/gruvbox/neovim.lua +++ b/modules/colorscheme/gruvbox/neovim.lua @@ -6,7 +6,6 @@ M.packer = function(use) config = function() vim.g.gruvbox_italicize_strings = 0 vim.cmd("colorscheme gruvbox8") - vim.cmd("set background=dark") end, }) end diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 8d48f02..a52b63e 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -19,9 +19,9 @@ }; "nvim/lua/packer/colors.lua".source = config.theme.colors.neovimConfig; "nvim/lua/background.lua".text = '' - vim.cmd("set background=${ + vim.o.background = "${ if config.theme.dark == true then "dark" else "light" - }") + }" ''; }; diff --git a/modules/shell/utilities.nix b/modules/shell/utilities.nix index 33d9c49..c32d6d2 100644 --- a/modules/shell/utilities.nix +++ b/modules/shell/utilities.nix @@ -13,50 +13,59 @@ let in { - home-manager.users.${config.user} = { + config = { - home.packages = with pkgs; [ - unzip # Extract zips - rsync # Copy folders - ripgrep # grep - bat # cat - fd # find - sd # sed - jq # JSON manipulation - tealdeer # Cheatsheets - tree # View directory hierarchy - htop # Show system processes - glow # Pretty markdown previews - qrencode # Generate qr codes - vimv-rs # Batch rename files - dig # DNS lookup - lf # File viewer - # whois # Lookup IPs - age # Encryption - ]; + home-manager.users.${config.user} = { - programs.zoxide.enable = true; # Shortcut jump command + home.packages = with pkgs; [ + unzip # Extract zips + rsync # Copy folders + ripgrep # grep + fd # find + sd # sed + jq # JSON manipulation + tealdeer # Cheatsheets + tree # View directory hierarchy + htop # Show system processes + glow # Pretty markdown previews + qrencode # Generate qr codes + vimv-rs # Batch rename files + dig # DNS lookup + lf # File viewer + inetutils # Includes telnet, whois + age # Encryption + ]; - home.file = { - ".rgignore".text = ignorePatterns; - ".fdignore".text = ignorePatterns; - ".digrc".text = "+noall +answer"; # Cleaner dig commands - }; + programs.zoxide.enable = true; # Shortcut jump command - programs.fish.shellAbbrs = { - cat = "bat"; # Swap cat with bat - }; - - programs.fish.functions = { - ping = { - description = "Improved ping"; - argumentNames = "target"; - body = "${pkgs.prettyping}/bin/prettyping --nolegend $target"; + home.file = { + ".rgignore".text = ignorePatterns; + ".fdignore".text = ignorePatterns; + ".digrc".text = "+noall +answer"; # Cleaner dig commands }; - qr = { - body = - "${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | open /tmp/qr.png"; # Fix for non-macOS + + programs.bat = { + enable = true; # cat replacement + config = { theme = config.theme.colors.batTheme; }; }; + + programs.fish.shellAbbrs = { + cat = "bat"; # Swap cat with bat + }; + + programs.fish.functions = { + ping = { + description = "Improved ping"; + argumentNames = "target"; + body = "${pkgs.prettyping}/bin/prettyping --nolegend $target"; + }; + qr = { + # Fix for non-macOS + body = + "${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.gnome.sushi}/bin/sushi /tmp/qr.png"; + }; + }; + }; };