refactor(stylix): add home-manager integration

This commit is contained in:
Mohammad Rafiq 2025-03-25 06:07:17 +08:00
parent a70aebffff
commit 6e258fc023
No known key found for this signature in database
16 changed files with 52 additions and 33 deletions

View file

@ -1,29 +0,0 @@
{pkgs, ...}: {
fonts.packages = with pkgs; [
nerd-fonts.sauce-code-pro
];
stylix.fonts = {
serif = {
package = pkgs.nerd-fonts.terminess-ttf;
name = "SauceCodePro Nerd Font";
};
sansSerif = {
package = pkgs.nerd-fonts.terminess-ttf;
name = "SauceCodePro Nerd Font";
};
emoji = {
package = pkgs.nerd-fonts.terminess-ttf;
name = "SauceCodePro Nerd Font";
};
monospace = {
package = pkgs.nerd-fonts.terminess-ttf;
name = "SauceCodePro Nerd Font Mono";
};
sizes = {
applications = 16;
desktop = 12;
popups = 12;
terminal = 16;
};
};
}

View file

@ -2,12 +2,14 @@
{
imports = [
inputs.stylix.nixosModules.stylix
./themes/darkviolet.nix
./fonts/sauce-code-pro.nix
./cursors/banana-cursor.nix
../../themes/darkviolet.nix
../../themes/fonts/sauce-code-pro.nix
../../themes/cursors/banana-cursor.nix
];
stylix = {
enable = true;
image = ../../media/wallpaper.jpg;
homeManagerIntegration.autoImport = false;
homeManagerIntegration.followSystem = false;
};
}

View file

@ -0,0 +1,21 @@
{ pkgs, ... }:
{
stylix.fonts = {
# packages = [ pkgs.nerd-fonts.sauce-code-pro ];
emoji.name = "SauceCodePro Nerd Font";
emoji.package = pkgs.nerd-fonts.sauce-code-pro;
monospace.name = "SauceCodePro Nerd Font Mono";
monospace.package = pkgs.nerd-fonts.sauce-code-pro;
sansSerif.name = "SauceCodePro Nerd Font";
sansSerif.package = pkgs.nerd-fonts.sauce-code-pro;
serif.name = "SauceCodePro Nerd Font";
serif.package = pkgs.nerd-fonts.sauce-code-pro;
sizes = {
applications = 16;
desktop = 12;
popups = 12;
terminal = 16;
};
};
}

View file

@ -14,5 +14,6 @@
clang.enable = true;
lua.enable = true;
python.enable = true;
css.enable = true;
};
}

16
users/modules/stylix.nix Normal file
View file

@ -0,0 +1,16 @@
{ inputs, pkgs, ... }:
{
imports = [
inputs.stylix.homeManagerModules.stylix
../../themes/darkviolet.nix
../../themes/fonts/sauce-code-pro.nix
../../themes/cursors/banana-cursor.nix
];
stylix = {
enable = true;
image = ../../media/wallpaper.jpg;
};
stylix.targets.gtk.extraCss = ''
'';
}

View file

@ -1,8 +1,15 @@
{pkgs, ...}: {
{
pkgs,
inputs,
lib,
...
}:
{
imports = [
./modules/sh.nix
./modules/de.nix
./modules/utils.nix
./modules/stylix.nix
];
# This enables using home-manager from the command line.
@ -17,4 +24,5 @@
# Do not change it.
stateVersion = "25.05";
};
}