feat: add stylix theme

Break Changes:
- May need reconfigure fcitx5 input method
This commit is contained in:
danny 2025-08-20 22:32:44 +08:00
parent ca73fac1f6
commit d1913a50ae
30 changed files with 621 additions and 531 deletions

295
flake.lock generated
View file

@ -75,6 +75,73 @@
"type": "github" "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": { "caelestia-cli": {
"inputs": { "inputs": {
"caelestia-shell": [ "caelestia-shell": [
@ -201,6 +268,22 @@
"type": "github" "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": { "flake-compat": {
"locked": { "locked": {
"lastModified": 1746162366, "lastModified": 1746162366,
@ -391,6 +474,27 @@
"type": "indirect" "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": { "flake-schemas": {
"locked": { "locked": {
"lastModified": 1721999734, "lastModified": 1721999734,
@ -497,7 +601,7 @@
}, },
"flake-utils_6": { "flake-utils_6": {
"inputs": { "inputs": {
"systems": "systems_10" "systems": "systems_11"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@ -513,6 +617,22 @@
"type": "github" "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": { "ghostty": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@ -630,6 +750,23 @@
"type": "github" "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": { "hercules-ci-effects": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
@ -1569,6 +1706,31 @@
"type": "github" "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": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
@ -1663,6 +1825,7 @@
"nix-tmodloader": "nix-tmodloader", "nix-tmodloader": "nix-tmodloader",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_6",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix",
"swww": "swww", "swww": "swww",
"yazi": "yazi", "yazi": "yazi",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
@ -1786,6 +1949,40 @@
"url": "https://spectrum-os.org/git/spectrum" "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": { "swww": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_8", "flake-compat": "flake-compat_8",
@ -1836,6 +2033,21 @@
"type": "github" "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": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -1956,6 +2168,87 @@
"type": "github" "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": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View file

@ -108,6 +108,11 @@
url = "github:microvm-nix/microvm.nix"; url = "github:microvm-nix/microvm.nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
@ -137,6 +142,7 @@
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.chaotic.nixosModules.default inputs.chaotic.nixosModules.default
inputs.actual-budget-api.nixosModules.default inputs.actual-budget-api.nixosModules.default
inputs.stylix.nixosModules.stylix
]; ];
args = { args = {
inherit inherit
@ -192,11 +198,6 @@
linkConfig.RequiredForOnline = "routable"; linkConfig.RequiredForOnline = "routable";
}; };
# microvm.autostart = [
# "vm-1"
# "vm-2"
# ];
microvm.vms = { microvm.vms = {
vm-1 = { vm-1 = {
flake = self; flake = self;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

View file

@ -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

View file

@ -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

View file

@ -71,10 +71,4 @@ return {
"sainnhe/gruvbox-material", "sainnhe/gruvbox-material",
name = "gruvbox-material", name = "gruvbox-material",
}, },
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox-material",
},
},
} }

View file

@ -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;
}

View file

@ -1,16 +1,15 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
../user/internationalisation.nix
../user/config.nix ../user/config.nix
../user/desktops.nix ../user/desktops.nix
../user/direnv.nix ../user/direnv.nix
../user/environment.nix ../user/environment.nix
../user/gtk.nix ../user/gtk.nix
../user/wlogout.nix ../user/wlogout.nix
# ../user/music-production.nix
../user/nvim.nix ../user/nvim.nix
../user/packages.nix ../user/packages.nix
# ../user/firefox.nix
../user/zen-browser.nix ../user/zen-browser.nix
../user/shell.nix ../user/shell.nix
../user/tmux.nix ../user/tmux.nix

View file

@ -5,15 +5,6 @@
... ...
}: }:
let 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 { caelestiaDot = pkgs.fetchFromGitHub {
owner = "caelestia-dots"; owner = "caelestia-dots";
repo = "caelestia"; repo = "caelestia";
@ -199,11 +190,9 @@ in
systemd.user.services.caelestia = { systemd.user.services.caelestia = {
Service = { Service = {
ExecStart = lib.mkForce "${pkgs.writeShellScript "caelestia-wrapper" '' Environment = [
export QT_QPA_PLATFORMTHEME=gtk3 "QT_QPA_PLATFORMTHEME=gtk3"
];
${config.programs.caelestia.package}/bin/caelestia-shell
''}";
}; };
}; };

View file

@ -1,28 +1,28 @@
{ ... }: { lib, config, ... }:
let let
configDir = ../config; configDir = ../config;
browser = "zen.desktop"; browser = "zen.desktop";
in in
{ {
home.file."${config.home.homeDirectory}/.config/starship.toml".source =
lib.mkForce "${configDir}/starship/starship.toml";
home.file = { home.file = {
".config/neofetch".source = "${configDir}/neofetch"; ".config/neofetch".source = "${configDir}/neofetch";
".config/btop".source = "${configDir}/btop";
".config/rofi".source = "${configDir}/rofi"; ".config/rofi".source = "${configDir}/rofi";
".config/scripts".source = "${configDir}/scripts"; ".config/scripts".source = "${configDir}/scripts";
".config/starship.toml".source = "${configDir}/starship/starship.toml";
".config/macchiato.toml".source = "${configDir}/starship/macchiato.toml";
".config/gh" = { ".config/gh" = {
recursive = true; recursive = true;
source = "${configDir}/gh"; source = "${configDir}/gh";
}; };
".local/share/fcitx5/themes/fcitx5-dark-transparent" = { # ".local/share/fcitx5/themes/fcitx5-dark-transparent" = {
recursive = true; # recursive = true;
source = "${configDir}/fcitx5-dark-transparent"; # source = "${configDir}/fcitx5-dark-transparent";
}; # };
".config/fcitx5/conf" = { # ".config/fcitx5/conf" = {
recursive = true; # recursive = true;
source = "${configDir}/fcitx5"; # source = "${configDir}/fcitx5";
}; # };
".face".source = "${configDir}/.face"; ".face".source = "${configDir}/.face";
}; };

View file

@ -15,15 +15,6 @@ in
package = pkgs.catppuccin-cursors.macchiatoLavender; package = pkgs.catppuccin-cursors.macchiatoLavender;
}; };
theme = {
name = themeName;
package = pkgs.catppuccin-gtk.override {
accents = [ "lavender" ];
size = "compact";
variant = "macchiato";
};
};
iconTheme = { iconTheme = {
name = "Papirus-Dark"; name = "Papirus-Dark";
package = pkgs.papirus-icon-theme; package = pkgs.papirus-icon-theme;
@ -43,14 +34,7 @@ in
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
libsForQt5.qt5ct
gsettings-desktop-schemas gsettings-desktop-schemas
glib glib
]; ];
qt = {
enable = true;
style.name = "adwaita-dark";
platformTheme.name = "gtk3";
};
} }

View file

@ -1,3 +1,4 @@
{ lib }:
{ {
xwayland = { xwayland = {
force_zero_scaling = true; force_zero_scaling = true;
@ -7,8 +8,8 @@
gaps_in = 5; gaps_in = 5;
gaps_out = 10; gaps_out = 10;
border_size = 2; border_size = 2;
"col.active_border" = "rgb(EBDBB2) rgb(24273A) rgb(24273A) rgb(EBDBB2) 45deg"; "col.active_border" = lib.mkForce "rgb(EBDBB2) rgb(24273A) rgb(24273A) rgb(EBDBB2) 45deg";
"col.inactive_border" = "rgb(24273A) rgb(24273A) rgb(24273A) rgb(24273A) 45deg"; "col.inactive_border" = lib.mkForce "rgb(24273A) rgb(24273A) rgb(24273A) rgb(24273A) 45deg";
layout = "dwindle"; layout = "dwindle";
}; };

View file

@ -133,18 +133,11 @@ in
force_default_wallpaper = 0; force_default_wallpaper = 0;
}; };
} }
// (import ./hypr/window.nix) // (import ./hypr/window.nix { inherit lib; })
// (import ./hypr/windowrule.nix) // (import ./hypr/windowrule.nix)
// (import ./hypr/input.nix); // (import ./hypr/input.nix);
}; };
# === gamemode === #
systemd.user.services.gamemode = lib.mkIf osConfig.programs.gamemode.enable {
Service = {
ExecStart = "${pkgs.gamemode}/bin/gamemoded -r";
};
};
# === Swww === # # === Swww === #
services.swww = { services.swww = {
enable = true; enable = true;
@ -254,7 +247,7 @@ in
}; };
# INPUT FIELD # INPUT FIELD
input-field = [ input-field = lib.mkForce [
{ {
monitor = "${mainMonitor}"; monitor = "${mainMonitor}";
size = "290, 60"; size = "290, 60";
@ -370,7 +363,7 @@ in
control-center-margin-right = 20; control-center-margin-right = 20;
control-center-margin-top = 20; control-center-margin-top = 20;
control-center-width = 500; control-center-width = 500;
fit-to-screen = false; fit-to-screen = true;
hide-on-action = true; hide-on-action = true;
hide-on-clear = true; hide-on-clear = true;
image-visibility = "when-available"; image-visibility = "when-available";
@ -400,9 +393,9 @@ in
@define-color textc #212121; @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-weight: bold;
font-size: 15px;
border-width: 3px; border-width: 3px;
border-color: #ebdbb2; border-color: #ebdbb2;
} }
@ -415,7 +408,7 @@ in
.notification-row { .notification-row {
outline: none; outline: none;
margin: 20px; margin: 5px;
padding: 0; padding: 0;
} }

View file

@ -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"
];
};
};
}

View file

@ -6,9 +6,6 @@
osConfig, osConfig,
... ...
}: }:
let
inherit (lib) optional;
in
{ {
programs.poetry = { programs.poetry = {
enable = true; enable = true;
@ -24,9 +21,6 @@ in
enableFishIntegration = true; enableFishIntegration = true;
package = inputs.ghostty.packages.${system}.default; package = inputs.ghostty.packages.${system}.default;
settings = { settings = {
font-family = "CaskaydiaCove Nerd Font Mono";
font-size = 15;
theme = "Espresso";
unfocused-split-opacity = 0.85; unfocused-split-opacity = 0.85;
desktop-notifications = false; desktop-notifications = false;

View file

@ -10,6 +10,8 @@
... ...
}: }:
let let
inherit (lib) optionalString;
mkWall = import ../scripts/mkWall.nix { inherit config pkgs; }; mkWall = import ../scripts/mkWall.nix { inherit config pkgs; };
rofiWall = import ../scripts/rofiwall.nix { inherit config pkgs; }; rofiWall = import ../scripts/rofiwall.nix { inherit config pkgs; };
@ -44,6 +46,13 @@ in
"d /tmp/wall_cache 700 ${username} -" "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 === # # === waybar === #
systemd.user.services.waybar = lib.mkIf config.programs.waybar.enable { systemd.user.services.waybar = lib.mkIf config.programs.waybar.enable {
Unit = { Unit = {
@ -54,7 +63,132 @@ in
programs.waybar = { programs.waybar = {
enable = true; 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 = settings =
let let
commonConfig = { commonConfig = {
@ -325,18 +459,17 @@ in
return-type = "json"; return-type = "json";
escape = true; escape = true;
}; };
"custom/gamemode" = { gamemode = {
format = "{icon}"; format = "{glyph}";
format-icons = { glyph = "";
active = "󰊗"; hide-not-running = false;
inactive = "󰺷"; use-icon = true;
}; icon-name = "input-gaming-symbolic";
exec = "~/.config/scripts/gamemodeStatus.sh"; icon-spacing = 4;
on-click = "~/.config/scripts/gamemodeStatus.sh toggle"; icon-size = 20;
tooltip = true; tooltip = true;
interval = 3; tooltip-format = "Games running: {count}";
return-type = "json"; on-click-right = "systemctl is-active --quiet gamemode.service && systemctl stop gamemode.service || systemctl start gamemode.service";
escape = true;
}; };
"custom/wallRand" = { "custom/wallRand" = {
format = ""; format = "";
@ -403,6 +536,7 @@ in
]; ];
modules-right = [ modules-right = [
"wlr/taskbar" "wlr/taskbar"
(optionalString config.programs.gamemode.enable "gamemode")
"temperature" "temperature"
"custom/recording" "custom/recording"
"idle_inhibitor" "idle_inhibitor"

View file

@ -28,22 +28,6 @@ in
git = ''${yaziPlugins}/git''; 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 = { settings = {
plugin.prepend_fetchers = [ plugin.prepend_fetchers = [
{ {

View file

@ -50,5 +50,4 @@ in
}; };
}; };
}; };
} }

View file

@ -6,7 +6,6 @@
... ...
}: }:
let let
inherit (lib) optionalString;
monitors = [ monitors = [
"desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271" "desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271"
"desc:Acer Technologies XV272U V3 1322131231233" "desc:Acer Technologies XV272U V3 1322131231233"
@ -38,7 +37,7 @@ in
./sops-conf.nix # Secret ./sops-conf.nix # Secret
../../modules/gaming.nix ../../modules/gaming.nix
# ../../modules/secure-boot.nix # ../../modules/secure-boot.nix
(import ../../modules/virtualization.nix { inherit username; }) ../../modules/virtualization.nix
../../modules/wine.nix ../../modules/wine.nix
../../modules/wireguard.nix ../../modules/wireguard.nix
../../modules/localsend.nix ../../modules/localsend.nix
@ -106,7 +105,7 @@ in
++ ( ++ (
if config.programs.gamemode.enable then if config.programs.gamemode.enable then
[ [
"custom/gamemode" "gamemode"
] ]
else else
[ ] [ ]

View file

@ -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;
};
}

View file

@ -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 = { extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8"; LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8"; LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8"; LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8"; LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8"; LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8"; LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8"; LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "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";
}; };
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
}; };
} }

View file

@ -3,11 +3,6 @@
boot = { boot = {
plymouth = { plymouth = {
enable = true; enable = true;
theme = "hexagon_dots";
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override { selected_themes = [ "hexagon_dots" ]; })
(catppuccin-plymouth.override { variant = "frappe"; })
];
}; };
consoleLogLevel = 0; consoleLogLevel = 0;

View file

@ -1,32 +1,17 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [
./minimal.nix
../stylix.nix
../auto-mount.nix ../auto-mount.nix
../bluetooth.nix ../bluetooth.nix
../display-manager.nix ../display-manager.nix
../environment.nix
../flatpak.nix ../flatpak.nix
../fonts.nix
../gc.nix
../hardware.nix
../hyprland.nix ../hyprland.nix
../internationalisation.nix
../misc.nix
../networking.nix
../nixsettings.nix
../obs-studio.nix ../obs-studio.nix
../packages.nix
../plymouth.nix ../plymouth.nix
../polkit.nix ../polkit.nix
../programs.nix
../security.nix ../security.nix
../services.nix
../sound.nix
../time.nix
../tmux.nix
../users.nix
../ca.nix
../sops-nix.nix
]; ];
programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; programs.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];

View file

@ -2,7 +2,6 @@
{ {
imports = [ imports = [
../environment.nix ../environment.nix
../fonts.nix
../hardware.nix ../hardware.nix
../internationalisation.nix ../internationalisation.nix
../misc.nix ../misc.nix

72
system/modules/stylix.nix Normal file
View file

@ -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;
};
};
}