diff --git a/flake.lock b/flake.lock index 31981ce..7ff2380 100644 --- a/flake.lock +++ b/flake.lock @@ -75,6 +75,73 @@ "type": "github" } }, + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1746562888, + "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1752979451, + "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, "caelestia-cli": { "inputs": { "caelestia-shell": [ @@ -201,6 +268,22 @@ "type": "github" } }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1748383148, + "narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-compat": { "locked": { "lastModified": 1746162366, @@ -391,6 +474,27 @@ "type": "indirect" } }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-schemas": { "locked": { "lastModified": 1721999734, @@ -497,7 +601,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_10" + "systems": "systems_11" }, "locked": { "lastModified": 1731533236, @@ -513,6 +617,22 @@ "type": "github" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "ghostty": { "inputs": { "flake-compat": "flake-compat_2", @@ -630,6 +750,23 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "48.2", + "repo": "gnome-shell", + "type": "github" + } + }, "hercules-ci-effects": { "inputs": { "flake-parts": "flake-parts_3", @@ -1569,6 +1706,31 @@ "type": "github" } }, + "nur": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751906969, + "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", + "owner": "nix-community", + "repo": "NUR", + "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_3", @@ -1663,6 +1825,7 @@ "nix-tmodloader": "nix-tmodloader", "nixpkgs": "nixpkgs_6", "sops-nix": "sops-nix", + "stylix": "stylix", "swww": "swww", "yazi": "yazi", "zen-browser": "zen-browser" @@ -1786,6 +1949,40 @@ "url": "https://spectrum-os.org/git/spectrum" } }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": "flake-parts_4", + "gnome-shell": "gnome-shell", + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur", + "systems": "systems_10", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1755546184, + "narHash": "sha256-KxRj/8SydDk3gzamS0VEewo5pu8JAYhSZ5GPcImPGNQ=", + "owner": "nix-community", + "repo": "stylix", + "rev": "9810b32b9b7520e3b37358ff8e793fb5034c3299", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "stylix", + "type": "github" + } + }, "swww": { "inputs": { "flake-compat": "flake-compat_8", @@ -1836,6 +2033,21 @@ "type": "github" } }, + "systems_11": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -1956,6 +2168,87 @@ "type": "github" } }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index f809aff..676bc4d 100644 --- a/flake.nix +++ b/flake.nix @@ -108,6 +108,11 @@ url = "github:microvm-nix/microvm.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + + stylix = { + url = "github:nix-community/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -137,6 +142,7 @@ inputs.sops-nix.nixosModules.sops inputs.chaotic.nixosModules.default inputs.actual-budget-api.nixosModules.default + inputs.stylix.nixosModules.stylix ]; args = { inherit @@ -192,11 +198,6 @@ linkConfig.RequiredForOnline = "routable"; }; - # microvm.autostart = [ - # "vm-1" - # "vm-2" - # ]; - microvm.vms = { vm-1 = { flake = self; diff --git a/home/config/fcitx5-dark-transparent/arrow.png b/home/config/fcitx5-dark-transparent/arrow.png deleted file mode 100644 index 6582e12..0000000 Binary files a/home/config/fcitx5-dark-transparent/arrow.png and /dev/null differ diff --git a/home/config/fcitx5-dark-transparent/highlight.png b/home/config/fcitx5-dark-transparent/highlight.png deleted file mode 100644 index 59ba459..0000000 Binary files a/home/config/fcitx5-dark-transparent/highlight.png and /dev/null differ diff --git a/home/config/fcitx5-dark-transparent/panel-origin.png b/home/config/fcitx5-dark-transparent/panel-origin.png deleted file mode 100644 index 0ffddf6..0000000 Binary files a/home/config/fcitx5-dark-transparent/panel-origin.png and /dev/null differ diff --git a/home/config/fcitx5-dark-transparent/panel-round.png b/home/config/fcitx5-dark-transparent/panel-round.png deleted file mode 100644 index 7e52b8c..0000000 Binary files a/home/config/fcitx5-dark-transparent/panel-round.png and /dev/null differ diff --git a/home/config/fcitx5-dark-transparent/panel.png b/home/config/fcitx5-dark-transparent/panel.png deleted file mode 100644 index f1e9aec..0000000 Binary files a/home/config/fcitx5-dark-transparent/panel.png and /dev/null differ diff --git a/home/config/fcitx5-dark-transparent/radio.png b/home/config/fcitx5-dark-transparent/radio.png deleted file mode 100644 index 9b6c5ab..0000000 Binary files a/home/config/fcitx5-dark-transparent/radio.png and /dev/null differ diff --git a/home/config/fcitx5-dark-transparent/theme.conf b/home/config/fcitx5-dark-transparent/theme.conf deleted file mode 100644 index cf5a8e5..0000000 --- a/home/config/fcitx5-dark-transparent/theme.conf +++ /dev/null @@ -1,80 +0,0 @@ -[Metadata] -Name=fcitx5-dark-transparent -Version=0.1 -Author=hosxy -Description=dark transparent Theme -ScaleWithDPI=True - -[InputPanel] -Font=Sans 10 -NormalColor=#ffffff -HighlightColor=#ffffff -Spacing=3 - -[InputPanel/TextMargin] -Left=7 -Right=7 -Top=7 -Bottom=7 - -[InputPanel/Background] -Image=panel.png - -[InputPanel/Background/Margin] -Left=2 -Right=2 -Top=2 -Bottom=2 - -[InputPanel/Highlight] -Image=highlight.png - -[InputPanel/Highlight/Margin] -Left=5 -Right=5 -Top=5 -Bottom=5 - -[Menu/Background] -Image=panel.png - -[Menu] -Font=Sans 10 -NormalColor=#ffffff -HighlightCandidateColor=#ffffff - -[Menu/Background/Margin] -Left=0 -Right=0 -Top=2 -Bottom=2 - -[Menu/ContentMargin] -Left=2 -Right=2 -Top=2 -Bottom=2 - -[Menu/Highlight] -Image=highlight.png - -[Menu/Highlight/Margin] -Left=5 -Right=5 -Top=5 -Bottom=5 - -[Menu/Separator] -Color=#ffffff - -[Menu/CheckBox] -Image=radio.png - -[Menu/SubMenu] -Image=arrow.png - -[Menu/TextMargin] -Left=5 -Right=5 -Top=5 -Bottom=5 diff --git a/home/config/fcitx5/classicui.conf b/home/config/fcitx5/classicui.conf deleted file mode 100644 index de210ce..0000000 --- a/home/config/fcitx5/classicui.conf +++ /dev/null @@ -1,34 +0,0 @@ -# Vertical Candidate List -Vertical Candidate List=False -# Use mouse wheel to go to prev or next page -WheelForPaging=True -# Font -Font="Noto Sans CJK TC 10" -# Menu Font -MenuFont="Serif 10" -# Tray Font -TrayFont="Noto Sans CJK TC 10" -# Tray Label Outline Color -TrayOutlineColor=#000000 -# Tray Label Text Color -TrayTextColor=#ffffff -# Prefer Text Icon -PreferTextIcon=True -# Show Layout Name In Icon -ShowLayoutNameInIcon=True -# Use input method language to display text -UseInputMethodLanguageToDisplayText=True -# Theme -Theme=fcitx5-dark-transparent -# Dark Theme -DarkTheme=fcitx5-dark-transparent -# Follow system light/dark color scheme -UseDarkTheme=False -# Follow system accent color if it is supported by theme and desktop -UseAccentColor=True -# Use Per Screen DPI on X11 -PerScreenDPI=False -# Force font DPI on Wayland -ForceWaylandDPI=0 -# Enable fractional scale under Wayland -EnableFractionalScale=True diff --git a/home/config/nvim/lua/plugins/colorscheme.lua b/home/config/nvim/lua/plugins/colorscheme.lua index fb64d47..de240dd 100644 --- a/home/config/nvim/lua/plugins/colorscheme.lua +++ b/home/config/nvim/lua/plugins/colorscheme.lua @@ -71,10 +71,4 @@ return { "sainnhe/gruvbox-material", name = "gruvbox-material", }, - { - "LazyVim/LazyVim", - opts = { - colorscheme = "gruvbox-material", - }, - }, } diff --git a/home/config/waybar/style.css b/home/config/waybar/style.css deleted file mode 100644 index 649fabd..0000000 --- a/home/config/waybar/style.css +++ /dev/null @@ -1,191 +0,0 @@ -@define-color main #ebdbb2; - -* { - font-family: "JetBrainsMonoNerdFontMono"; - font-weight: bold; - min-height: 0; - font-size: 102%; - font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"'; - transition-property: all; - transition-duration: 0.3s; -} - -window#waybar { - background-color: rgba(0, 0, 0, 0); - transition-property: background-color; - transition-duration: 0.5s; -} - -window#waybar.hidden { - opacity: 0.5; -} - -window#waybar.empty { - background-color: transparent; -} - -window#waybar.empty #window { - padding: 0px; - border: 0px; - background-color: transparent; -} - -tooltip { - background: alpha(#fff, 0.05); - border-radius: 10px; -} - -tooltip label { - padding: 10px; - color: @main; -} - -#idle_inhibitor, -#custom-cava, -#custom-wireguard, -#custom-gamemode, -#custom-wallRand, -#custom-airplay, -#custom-bitwarden, -#custom-recording, -#clock, -#cpu, -#memory, -#mpris, -#network, -#pulseaudio, -#temperature, -#workspaces, -#custom-os, -#battery, -#custom-swaync { - background: alpha(#fff, 0.05); - border-radius: 6px; - color: @main; - font-weight: 600; - padding: 2.5px 12px; - margin: 4px 0 4px 0; - border: 1px solid alpha(#fff, 0.05); -} - - -#custom-os, -#workspaces, -#clock, -#custom-cava, -#mpris { - margin-right: 4px; -} - -#idle_inhibitor, -#custom-swaync, -#pulseaudio, -#cpu, -#memory -#temperature, -#network, -#custom-wireguard, -#custom-gamemode, -#custom-wallRand, -#custom-airplay, -#custom-bitwarden, -#custom-recording, -#battery { - margin-left: 4px; -} - -#cpu { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - padding-right: 0; - border-right: none; -} - -#memory { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - margin-left: 0; - border-left: none; -} - -#clock { - font-weight: 600; -} - -#custom-swaync { - margin-right: 10px; - margin-right: 10px; - padding-right: 18px; -} - -#window { - color: @main; - padding-top: 3px; - padding-bottom: 3px; - padding-right: 6px; - padding-left: 6px; - border-radius: 12px; -} - -#workspaces { - font-weight: Bold; - padding-left: 3.5px; - padding-right: 3.5px; -} - -/* Center Icon */ -#custom-os, -#custom-wireguard, -#custom-gamemode, -#custom-wallRand, -#custom-airplay, -#custom-bitwarden, -#custom-recording, -#network, -#idle_inhibitor { - padding-left: 10px; padding-right: 14px; -} - -/* Most left Item */ -#custom-os { - margin-left: 10px; -} - -#workspaces button { - margin: 1px; - box-shadow: none; - text-shadow: none; - border-radius: 12px; - padding-left: 4px; - padding-right: 9px; - color: @main; - transition-property: all; - transition-duration: 0.3s; -} - -#workspaces button.focused { - background-color: alpha(@main, 0.3); - transition-property: all; - transition-duration: 0.3s; -} - -#temperature.critical { - background-color: red; -} - -#battery.good { - color: #ebdbb2; -} - -#battery.warning { - color: #eed49f; -} - -#battery.critical { - color: #ee99a0; -} - -#battery.charging, -#battery.plugged { - color: #a6da95; -} diff --git a/home/presets/basic.nix b/home/presets/basic.nix index fc2c21a..07f761d 100644 --- a/home/presets/basic.nix +++ b/home/presets/basic.nix @@ -1,16 +1,15 @@ { ... }: { imports = [ + ../user/internationalisation.nix ../user/config.nix ../user/desktops.nix ../user/direnv.nix ../user/environment.nix ../user/gtk.nix ../user/wlogout.nix - # ../user/music-production.nix ../user/nvim.nix ../user/packages.nix - # ../user/firefox.nix ../user/zen-browser.nix ../user/shell.nix ../user/tmux.nix diff --git a/home/user/caelestia-shell.nix b/home/user/caelestia-shell.nix index c4b678f..25e6876 100644 --- a/home/user/caelestia-shell.nix +++ b/home/user/caelestia-shell.nix @@ -5,15 +5,6 @@ ... }: let - patchPapirus = pkgs.stdenv.mkDerivation { - name = "${pkgs.papirus-icon-theme.name}-patch"; - src = pkgs.papirus-icon-theme; - installPhase = '' - mkdir -p $out/share/icons - ln $src/share/icons/Papirus $out/share/icons/hicolor - ''; - }; - caelestiaDot = pkgs.fetchFromGitHub { owner = "caelestia-dots"; repo = "caelestia"; @@ -199,11 +190,9 @@ in systemd.user.services.caelestia = { Service = { - ExecStart = lib.mkForce "${pkgs.writeShellScript "caelestia-wrapper" '' - export QT_QPA_PLATFORMTHEME=gtk3 - - ${config.programs.caelestia.package}/bin/caelestia-shell - ''}"; + Environment = [ + "QT_QPA_PLATFORMTHEME=gtk3" + ]; }; }; diff --git a/home/user/config.nix b/home/user/config.nix index 171b2d1..6026da2 100644 --- a/home/user/config.nix +++ b/home/user/config.nix @@ -1,28 +1,28 @@ -{ ... }: +{ lib, config, ... }: let configDir = ../config; browser = "zen.desktop"; in { + home.file."${config.home.homeDirectory}/.config/starship.toml".source = + lib.mkForce "${configDir}/starship/starship.toml"; + home.file = { ".config/neofetch".source = "${configDir}/neofetch"; - ".config/btop".source = "${configDir}/btop"; ".config/rofi".source = "${configDir}/rofi"; ".config/scripts".source = "${configDir}/scripts"; - ".config/starship.toml".source = "${configDir}/starship/starship.toml"; - ".config/macchiato.toml".source = "${configDir}/starship/macchiato.toml"; ".config/gh" = { recursive = true; source = "${configDir}/gh"; }; - ".local/share/fcitx5/themes/fcitx5-dark-transparent" = { - recursive = true; - source = "${configDir}/fcitx5-dark-transparent"; - }; - ".config/fcitx5/conf" = { - recursive = true; - source = "${configDir}/fcitx5"; - }; + # ".local/share/fcitx5/themes/fcitx5-dark-transparent" = { + # recursive = true; + # source = "${configDir}/fcitx5-dark-transparent"; + # }; + # ".config/fcitx5/conf" = { + # recursive = true; + # source = "${configDir}/fcitx5"; + # }; ".face".source = "${configDir}/.face"; }; diff --git a/home/user/gtk.nix b/home/user/gtk.nix index 38ceb6e..7d94fa5 100644 --- a/home/user/gtk.nix +++ b/home/user/gtk.nix @@ -15,15 +15,6 @@ in package = pkgs.catppuccin-cursors.macchiatoLavender; }; - theme = { - name = themeName; - package = pkgs.catppuccin-gtk.override { - accents = [ "lavender" ]; - size = "compact"; - variant = "macchiato"; - }; - }; - iconTheme = { name = "Papirus-Dark"; package = pkgs.papirus-icon-theme; @@ -43,14 +34,7 @@ in }; home.packages = with pkgs; [ - libsForQt5.qt5ct gsettings-desktop-schemas glib ]; - - qt = { - enable = true; - style.name = "adwaita-dark"; - platformTheme.name = "gtk3"; - }; } diff --git a/home/user/hypr/window.nix b/home/user/hypr/window.nix index a661a93..cb5c6c3 100644 --- a/home/user/hypr/window.nix +++ b/home/user/hypr/window.nix @@ -1,3 +1,4 @@ +{ lib }: { xwayland = { force_zero_scaling = true; @@ -7,8 +8,8 @@ gaps_in = 5; gaps_out = 10; border_size = 2; - "col.active_border" = "rgb(EBDBB2) rgb(24273A) rgb(24273A) rgb(EBDBB2) 45deg"; - "col.inactive_border" = "rgb(24273A) rgb(24273A) rgb(24273A) rgb(24273A) 45deg"; + "col.active_border" = lib.mkForce "rgb(EBDBB2) rgb(24273A) rgb(24273A) rgb(EBDBB2) 45deg"; + "col.inactive_border" = lib.mkForce "rgb(24273A) rgb(24273A) rgb(24273A) rgb(24273A) 45deg"; layout = "dwindle"; }; diff --git a/home/user/hyprland.nix b/home/user/hyprland.nix index c9a70f4..422aaa6 100644 --- a/home/user/hyprland.nix +++ b/home/user/hyprland.nix @@ -133,18 +133,11 @@ in force_default_wallpaper = 0; }; } - // (import ./hypr/window.nix) + // (import ./hypr/window.nix { inherit lib; }) // (import ./hypr/windowrule.nix) // (import ./hypr/input.nix); }; - # === gamemode === # - systemd.user.services.gamemode = lib.mkIf osConfig.programs.gamemode.enable { - Service = { - ExecStart = "${pkgs.gamemode}/bin/gamemoded -r"; - }; - }; - # === Swww === # services.swww = { enable = true; @@ -254,7 +247,7 @@ in }; # INPUT FIELD - input-field = [ + input-field = lib.mkForce [ { monitor = "${mainMonitor}"; size = "290, 60"; @@ -370,7 +363,7 @@ in control-center-margin-right = 20; control-center-margin-top = 20; control-center-width = 500; - fit-to-screen = false; + fit-to-screen = true; hide-on-action = true; hide-on-clear = true; image-visibility = "when-available"; @@ -400,9 +393,9 @@ in @define-color textc #212121; * { - font-family: JetBrainsMonoNerdFontMono; + font-family: ${osConfig.stylix.fonts.sansSerif.name}; + font-size: ${toString osConfig.stylix.fonts.sizes.desktop}pt; font-weight: bold; - font-size: 15px; border-width: 3px; border-color: #ebdbb2; } @@ -415,7 +408,7 @@ in .notification-row { outline: none; - margin: 20px; + margin: 5px; padding: 0; } diff --git a/home/user/internationalisation.nix b/home/user/internationalisation.nix new file mode 100644 index 0000000..a4c841a --- /dev/null +++ b/home/user/internationalisation.nix @@ -0,0 +1,59 @@ +{ + pkgs, + config, + lib, + ... +}: +let + addons = with pkgs; [ + fcitx5-gtk + fcitx5-mozc # Japanese + fcitx5-chinese-addons + fcitx5-rime # Bopomofo + rime-data + ]; + +in +{ + i18n = { + inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5 = { + inherit addons; + waylandFrontend = true; + + settings = { + addons.classicui.globalSection = + let + font = "Noto Sans CJK TC ${toString config.stylix.fonts.sizes.popups}"; + in + { + Font = lib.mkForce font; + MenuFont = lib.mkForce font; + TrayFont = lib.mkForce font; + }; + }; + }; + }; + }; + + systemd.user.services.fcitx5 = { + Unit = { + WantedBy = [ "graphical-session.target" ]; + PartOf = [ "graphical-session.target" ]; + Description = "Fcitx5 Input Method"; + }; + Service = { + Type = "simple"; + Restart = "always"; + RestartSec = 2; + ExecStart = "${pkgs.fcitx5}/bin/fcitx5"; + Environment = [ + "GTK_IM_MODULE=" + "XMODIFIERS=@im=fcitx" + "QT_IM_MODULE=fcitx" + ]; + }; + }; +} diff --git a/home/user/packages.nix b/home/user/packages.nix index 38cbf59..7cda8e0 100644 --- a/home/user/packages.nix +++ b/home/user/packages.nix @@ -6,9 +6,6 @@ osConfig, ... }: -let - inherit (lib) optional; -in { programs.poetry = { enable = true; @@ -24,9 +21,6 @@ in enableFishIntegration = true; package = inputs.ghostty.packages.${system}.default; settings = { - font-family = "CaskaydiaCove Nerd Font Mono"; - font-size = 15; - theme = "Espresso"; unfocused-split-opacity = 0.85; desktop-notifications = false; diff --git a/home/user/waybar.nix b/home/user/waybar.nix index 982e884..260b843 100644 --- a/home/user/waybar.nix +++ b/home/user/waybar.nix @@ -10,6 +10,8 @@ ... }: let + inherit (lib) optionalString; + mkWall = import ../scripts/mkWall.nix { inherit config pkgs; }; rofiWall = import ../scripts/rofiwall.nix { inherit config pkgs; }; @@ -44,6 +46,13 @@ in "d /tmp/wall_cache 700 ${username} -" ]; + # === gamemode === # + systemd.user.services.gamemode = lib.mkIf osConfig.programs.gamemode.enable { + Service = { + ExecStart = "${pkgs.gamemode}/bin/gamemoded -r"; + }; + }; + # === waybar === # systemd.user.services.waybar = lib.mkIf config.programs.waybar.enable { Unit = { @@ -54,7 +63,132 @@ in programs.waybar = { enable = true; - style = ../../home/config/waybar/style.css; + style = + let + borderRadius = "6px"; + border = "1px solid @fg-bg"; + gap = "4px"; + in + lib.mkForce + # css + '' + @define-color main #ebdbb2; + @define-color bg-bg rgba(0, 0, 0, 0); + @define-color fg-bg alpha(#fff, 0.05); + + * { + font-family: ${osConfig.stylix.fonts.sansSerif.name}; + min-height: 0; + font-size: ${toString (osConfig.stylix.fonts.sizes.desktop + 2)}; + font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"'; + transition-property: all; + transition-duration: 0.3s; + } + + /* Main bar */ + window#waybar { + background-color: @bg-bg; + } + + window#waybar > .horizontal { + padding: ${gap}; + } + + window#waybar.hidden { + opacity: 0.5; + } + + /* Set transparent if empty */ + window#waybar .empty { + background-color: transparent; + border-color: transparent; + } + + /* tooltip */ + tooltip { + background-color: @fg-bg; + border-radius: ${borderRadius}; + } + + tooltip label { + padding: 4px 10px; + color: @main; + } + + box.module, label.module, #gamemode { + background: @fg-bg; + color: @main; + border-radius: ${borderRadius}; + border: ${border}; + padding: 2.5px 12px; + } + + #gamemode { + padding-right: 6px; + } + + box.module button:hover { + background: shade(@fg-bg, 1.5); + } + + label:hover { + background: shade(@fg-bg, 1.5); + } + + .modules-left .module { + margin-right: ${gap}; + } + + .modules-right .module { + margin-left: ${gap}; + } + + .modules-center .module { + background: transparent; + border-color: transparent; + } + + #taskbar { + background: transparent; + border-color: transparent; + } + + /* Group */ + #cpu { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + padding-right: 0; + border-right: none; + } + #memory { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + margin-left: 0; + border-left: none; + } + + #temperature.critical { + background-color: red; + } + + #battery.good { + color: #ebdbb2; + } + + #battery.warning { + color: #eed49f; + } + + #battery.critical { + color: #ee99a0; + } + + #battery.charging, + #battery.plugged { + color: #a6da95; + } + ''; + settings = let commonConfig = { @@ -325,18 +459,17 @@ in return-type = "json"; escape = true; }; - "custom/gamemode" = { - format = "{icon}"; - format-icons = { - active = "󰊗"; - inactive = "󰺷"; - }; - exec = "~/.config/scripts/gamemodeStatus.sh"; - on-click = "~/.config/scripts/gamemodeStatus.sh toggle"; + gamemode = { + format = "{glyph}"; + glyph = ""; + hide-not-running = false; + use-icon = true; + icon-name = "input-gaming-symbolic"; + icon-spacing = 4; + icon-size = 20; tooltip = true; - interval = 3; - return-type = "json"; - escape = true; + tooltip-format = "Games running: {count}"; + on-click-right = "systemctl is-active --quiet gamemode.service && systemctl stop gamemode.service || systemctl start gamemode.service"; }; "custom/wallRand" = { format = ""; @@ -403,6 +536,7 @@ in ]; modules-right = [ "wlr/taskbar" + (optionalString config.programs.gamemode.enable "gamemode") "temperature" "custom/recording" "idle_inhibitor" diff --git a/home/user/yazi.nix b/home/user/yazi.nix index e26664f..a9a5229 100644 --- a/home/user/yazi.nix +++ b/home/user/yazi.nix @@ -28,22 +28,6 @@ in git = ''${yaziPlugins}/git''; }; - flavors = { - gruvbox-dark = pkgs.fetchFromGitHub { - owner = "bennyyip"; - repo = "gruvbox-dark.yazi"; - rev = "91fdfa70f6d593934e62aba1e449f4ec3d3ccc90"; - hash = "sha256-RWqyAdETD/EkDVGcnBPiMcw1mSd78Aayky9yoxSsry4="; - }; - }; - - theme = { - flavors = { - dark = "gruvbox-dark"; - light = "gruvbox-dark"; - }; - }; - settings = { plugin.prepend_fetchers = [ { diff --git a/home/user/zen-browser.nix b/home/user/zen-browser.nix index a0b5751..fa0876e 100644 --- a/home/user/zen-browser.nix +++ b/home/user/zen-browser.nix @@ -50,5 +50,4 @@ in }; }; }; - } diff --git a/system/dev/dn-pre7780/default.nix b/system/dev/dn-pre7780/default.nix index bbd15dd..02c0804 100644 --- a/system/dev/dn-pre7780/default.nix +++ b/system/dev/dn-pre7780/default.nix @@ -6,7 +6,6 @@ ... }: let - inherit (lib) optionalString; monitors = [ "desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271" "desc:Acer Technologies XV272U V3 1322131231233" @@ -38,7 +37,7 @@ in ./sops-conf.nix # Secret ../../modules/gaming.nix # ../../modules/secure-boot.nix - (import ../../modules/virtualization.nix { inherit username; }) + ../../modules/virtualization.nix ../../modules/wine.nix ../../modules/wireguard.nix ../../modules/localsend.nix @@ -106,7 +105,7 @@ in ++ ( if config.programs.gamemode.enable then [ - "custom/gamemode" + "gamemode" ] else [ ] diff --git a/system/modules/fonts.nix b/system/modules/fonts.nix deleted file mode 100644 index beb2850..0000000 --- a/system/modules/fonts.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - pkgs, - lib, - nix-version, - ... -}: -let - nerdfont-pkg = - if nix-version == "25.05" then - pkgs.nerd-fonts.caskaydia-cove - else - (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; }); - - sf-pro-display-bold = pkgs.callPackage ../../pkgs/fonts/sf-pro-display-bold { }; -in -{ - fonts.packages = - (with pkgs; [ - font-awesome - jetbrains-mono - noto-fonts-cjk-sans - noto-fonts-cjk-serif - noto-fonts-emoji - sf-pro-display-bold - ]) - ++ [ - nerdfont-pkg - ]; - - fonts.fontDir.enable = true; - - fonts.fontconfig = { - enable = true; - defaultFonts = { - serif = [ - "CaskaydiaCove Nerd Font" - "Noto Sans CJK" - ]; - sansSerif = [ - "CaskaydiaCove Nerd Font" - "Noto Sans CJK" - ]; - monospace = [ "CaskaydiaCove Nerd Font Mono" ]; - }; - cache32Bit = true; - }; -} diff --git a/system/modules/internationalisation.nix b/system/modules/internationalisation.nix index e180b6e..550f6da 100644 --- a/system/modules/internationalisation.nix +++ b/system/modules/internationalisation.nix @@ -1,52 +1,20 @@ -{ pkgs, ... }: - -let - addons = with pkgs; [ - fcitx5-gtk - fcitx5-mozc # Japanese - fcitx5-chinese-addons - fcitx5-rime # Bopomofo - rime-data - ]; -in { - i18n.defaultLocale = "en_US.UTF-8"; + i18n = { + defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - - i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ]; - - i18n.inputMethod = { - enable = true; - type = "fcitx5"; - fcitx5.addons = addons; - }; - - systemd.user.services.fcitx5 = { - enable = true; - wantedBy = [ "graphical-session.target" ]; - partOf = [ "graphical-session.target" ]; - description = "Fcitx5 Input Method"; - environment = { - GTK_IM_MODULE = ""; - XMODIFIERS = "@im=fcitx"; - QT_IM_MODULE = "fcitx"; - }; - serviceConfig = { - Type = "simple"; - Restart = "always"; - RestartSec = 2; - ExecStart = "/run/current-system/sw/bin/fcitx5"; + extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; }; + + supportedLocales = [ "en_US.UTF-8/UTF-8" ]; }; + } diff --git a/system/modules/plymouth.nix b/system/modules/plymouth.nix index 410bed7..21a0daa 100644 --- a/system/modules/plymouth.nix +++ b/system/modules/plymouth.nix @@ -3,11 +3,6 @@ boot = { plymouth = { enable = true; - theme = "hexagon_dots"; - themePackages = with pkgs; [ - (adi1090x-plymouth-themes.override { selected_themes = [ "hexagon_dots" ]; }) - (catppuccin-plymouth.override { variant = "frappe"; }) - ]; }; consoleLogLevel = 0; diff --git a/system/modules/presets/basic.nix b/system/modules/presets/basic.nix index 95c428b..c3824e4 100644 --- a/system/modules/presets/basic.nix +++ b/system/modules/presets/basic.nix @@ -1,32 +1,17 @@ { pkgs, ... }: { imports = [ + ./minimal.nix + ../stylix.nix ../auto-mount.nix ../bluetooth.nix ../display-manager.nix - ../environment.nix ../flatpak.nix - ../fonts.nix - ../gc.nix - ../hardware.nix ../hyprland.nix - ../internationalisation.nix - ../misc.nix - ../networking.nix - ../nixsettings.nix ../obs-studio.nix - ../packages.nix ../plymouth.nix ../polkit.nix - ../programs.nix ../security.nix - ../services.nix - ../sound.nix - ../time.nix - ../tmux.nix - ../users.nix - ../ca.nix - ../sops-nix.nix ]; programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; diff --git a/system/modules/presets/minimal.nix b/system/modules/presets/minimal.nix index c41a8f1..dac91e7 100644 --- a/system/modules/presets/minimal.nix +++ b/system/modules/presets/minimal.nix @@ -2,7 +2,6 @@ { imports = [ ../environment.nix - ../fonts.nix ../hardware.nix ../internationalisation.nix ../misc.nix diff --git a/system/modules/stylix.nix b/system/modules/stylix.nix new file mode 100644 index 0000000..2f4e51d --- /dev/null +++ b/system/modules/stylix.nix @@ -0,0 +1,72 @@ +{ + pkgs, + config, + username, + ... +}: +let + caskaydia = { + name = "CaskaydiaCove Nerd Font Mono"; + package = pkgs.nerd-fonts.caskaydia-cove; + }; + + sf-pro-display-bold = pkgs.callPackage ../../pkgs/fonts/sf-pro-display-bold { }; +in +{ + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; + polarity = "dark"; + + fonts = { + serif = config.stylix.fonts.monospace; + + sansSerif = config.stylix.fonts.monospace; + + monospace = caskaydia; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + + sizes = { + terminal = 15; + desktop = 15; + popups = 12; + }; + }; + }; + + fonts = { + packages = ( + with pkgs; + [ + font-awesome + jetbrains-mono + noto-fonts-cjk-sans + noto-fonts-cjk-serif + noto-fonts-emoji + sf-pro-display-bold + ] + ); + + fontDir.enable = true; + }; + + home-manager.users."${username}" = { + stylix.targets.neovim.transparentBackground = { + main = true; + numberLine = true; + signColumn = true; + }; + stylix.targets = { + swaync.enable = false; + zen-browser.enable = false; + waybar.enable = false; + hyprlock.enable = false; + hyprland.enable = false; + rofi.enable = false; + }; + }; +}