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

View File

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

17
flake.lock generated
View File

@ -304,6 +304,22 @@
"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": {
"flake": false,
"locked": {
@ -910,6 +926,7 @@
"root": {
"inputs": {
"doom-emacs": "doom-emacs",
"fonts": "fonts",
"home-manager": "home-manager",
"hyprland": "hyprland",
"jawz-scripts": "jawz-scripts",

View File

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

View File

@ -2,13 +2,30 @@
config,
lib,
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";
config = lib.mkIf config.my.apps.fonts.enable {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ];
fonts.packages = builtins.attrValues {
inherit customFonts;
inherit (pkgs)
symbola
comic-neue