hyprland safe escape with stylix + fonts flake

This commit is contained in:
Danilo Reyes 2025-09-29 21:19:38 -06:00
parent a5e8cf27ec
commit bb08c52790
5 changed files with 43 additions and 4 deletions

View File

@ -11,6 +11,7 @@ let
}; };
scheme = schemesFile.schemes.cheems; scheme = schemesFile.schemes.cheems;
cfg = config.my.stylix; cfg = config.my.stylix;
gnomeEnabled = config.services.xserver.desktopManager.gnome.enable;
in in
{ {
options.my.stylix.enable = lib.mkEnableOption "system-wide theming with Stylix"; options.my.stylix.enable = lib.mkEnableOption "system-wide theming with Stylix";
@ -23,7 +24,7 @@ in
} }
// lib.optionalAttrs (scheme ? base16Scheme) { inherit (scheme) base16Scheme; }; // lib.optionalAttrs (scheme ? base16Scheme) { inherit (scheme) base16Scheme; };
home-manager.users.jawz = { home-manager.users.jawz = {
gtk = lib.mkIf (!cfg.enable) { gtk = lib.mkIf (!cfg.enable && gnomeEnabled) {
enable = true; enable = true;
iconTheme = { iconTheme = {
name = "Papirus-Light"; name = "Papirus-Light";
@ -33,7 +34,7 @@ in
}; };
}; };
stylix = { stylix = {
enable = true; inherit (cfg) enable;
autoEnable = cfg.enable; autoEnable = cfg.enable;
iconTheme = { iconTheme = {
inherit (cfg) enable; inherit (cfg) enable;

View File

@ -22,7 +22,7 @@ in
enable = true; enable = true;
extraPortals = [ extraPortals = [
pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk # pkgs.xdg-desktop-portal-gtk
]; ];
}; };
users.users.jawz.packages = builtins.attrValues { users.users.jawz.packages = builtins.attrValues {
@ -37,7 +37,7 @@ in
mako # Notification daemon mako # Notification daemon
libnotify # dependency of mako libnotify # dependency of mako
swaylock-effects # Screen locker swaylock-effects # Screen locker
nautilus # File manager # nautilus # File manager
; ;
}; };
home-manager.users.jawz = { home-manager.users.jawz = {

17
flake.lock generated
View File

@ -304,6 +304,22 @@
"type": "github" "type": "github"
} }
}, },
"fonts": {
"flake": false,
"locked": {
"lastModified": 1759200391,
"narHash": "sha256-S5LwvPL7sKgwKUhCyTpcuWUxCq57RFh7wbZ6rIc5AgU=",
"ref": "refs/heads/master",
"rev": "edea9d2aaf2f4e0481fbbb8e26f68a9f39248e3f",
"revCount": 2,
"type": "git",
"url": "https://git.servidos.lat/jawz/fonts.git"
},
"original": {
"type": "git",
"url": "https://git.servidos.lat/jawz/fonts.git"
}
},
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -910,6 +926,7 @@
"root": { "root": {
"inputs": { "inputs": {
"doom-emacs": "doom-emacs", "doom-emacs": "doom-emacs",
"fonts": "fonts",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"jawz-scripts": "jawz-scripts", "jawz-scripts": "jawz-scripts",

View File

@ -17,6 +17,10 @@
url = "git+https://git.servidos.lat/jawz/wallpapers.git"; url = "git+https://git.servidos.lat/jawz/wallpapers.git";
flake = false; flake = false;
}; };
fonts = {
url = "git+https://git.servidos.lat/jawz/fonts.git";
flake = false;
};
nur = { nur = {
url = "github:nix-community/nur"; url = "github:nix-community/nur";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@ -2,13 +2,30 @@
config, config,
lib, lib,
pkgs, pkgs,
inputs,
... ...
}: }:
let
customFonts = pkgs.stdenvNoCC.mkDerivation {
name = "custom-fonts";
src = inputs.fonts;
installPhase = ''
mkdir -p $out/share/fonts
find $src -type f \( \
-name "*.ttf" -o \
-name "*.otf" -o \
-name "*.woff" -o \
-name "*.woff2" \
\) -exec cp {} $out/share/fonts/ \;
'';
};
in
{ {
options.my.apps.fonts.enable = lib.mkEnableOption "additional fonts and typography"; options.my.apps.fonts.enable = lib.mkEnableOption "additional fonts and typography";
config = lib.mkIf config.my.apps.fonts.enable { config = lib.mkIf config.my.apps.fonts.enable {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ];
fonts.packages = builtins.attrValues { fonts.packages = builtins.attrValues {
inherit customFonts;
inherit (pkgs) inherit (pkgs)
symbola symbola
comic-neue comic-neue