From e633f165052e1adc669407ecefd307de0c23bf89 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Sat, 3 May 2025 13:46:47 +0100 Subject: [PATCH] Move fonts to home config --- home/apps/ghostty.nix | 3 ++- home/default.nix | 1 + home/desktop/hyprland.nix | 6 +++++- {modules => home}/fonts/default.nix | 7 ++++--- .../fonts/encrypt/DankMono-Bold.otf.age | Bin .../fonts/encrypt/DankMono-Italic.otf.age | Bin .../fonts/encrypt/DankMono-Regular.otf.age | Bin {modules => home}/fonts/encrypt/codicon.otf.age | Bin {modules => home}/fonts/encrypt/faicon.ttf.age | Bin machines/fanta/configuration.nix | 1 - machines/pepper/configuration.nix | 1 - machines/sodacream/configuration.nix | 1 - machines/sprite/configuration.nix | 1 - modules/default.nix | 1 - modules/desktop/fonts.nix | 1 - secrets.nix | 12 ++++++------ 16 files changed, 18 insertions(+), 17 deletions(-) rename {modules => home}/fonts/default.nix (88%) rename {modules => home}/fonts/encrypt/DankMono-Bold.otf.age (100%) rename {modules => home}/fonts/encrypt/DankMono-Italic.otf.age (100%) rename {modules => home}/fonts/encrypt/DankMono-Regular.otf.age (100%) rename {modules => home}/fonts/encrypt/codicon.otf.age (100%) rename {modules => home}/fonts/encrypt/faicon.ttf.age (100%) diff --git a/home/apps/ghostty.nix b/home/apps/ghostty.nix index 6430bf1..01b8b2a 100644 --- a/home/apps/ghostty.nix +++ b/home/apps/ghostty.nix @@ -82,7 +82,7 @@ in { window-theme = ghostty window-colorspace = display-p3 window-save-state = always - window-decoration = client + window-decoration = server window-inherit-working-directory = true unfocused-split-opacity = 0.9 freetype-load-flags = no-monochrome @@ -100,6 +100,7 @@ in { macos-titlebar-style = tabs adw-toolbar-style = flat + gtk-titlebar = false shell-integration-features = no-cursor,sudo,title shell-integration = zsh diff --git a/home/default.nix b/home/default.nix index 431a83e..e5e3ebd 100644 --- a/home/default.nix +++ b/home/default.nix @@ -6,5 +6,6 @@ ./development ./desktop ./apps + ./fonts ]; } diff --git a/home/desktop/hyprland.nix b/home/desktop/hyprland.nix index d0cf91b..86f5918 100644 --- a/home/desktop/hyprland.nix +++ b/home/desktop/hyprland.nix @@ -16,8 +16,12 @@ in { config = mkIf cfg.hyprland.enable { wayland.windowManager.hyprland = { enable = true; + + package = null; + portalPackage = null; systemd.enable = false; - xwayland.enable = true; + xwayland.enable = false; + settings = { "$mod" = "SUPER"; diff --git a/modules/fonts/default.nix b/home/fonts/default.nix similarity index 88% rename from modules/fonts/default.nix rename to home/fonts/default.nix index 9f58395..ed6e5cb 100644 --- a/modules/fonts/default.nix +++ b/home/fonts/default.nix @@ -3,18 +3,19 @@ with lib; let cfg = config.modules.fonts; - fontsPath = if helpers.isDarwin then "/Library/Fonts" else "/usr/share/fonts/nonfree"; + fontsPath = if helpers.isDarwin then "Library/Fonts" else "${config.xdg.dataHome}/fonts"; in { options.modules.fonts = { enable = mkOption { - default = false; - example = true; + default = true; description = "Whether to enable fonts options."; type = types.bool; }; }; config = mkIf cfg.enable { + fonts.fontconfig.enable = true; + age.secrets."DankMono-Regular.otf" = { symlink = false; file = ./encrypt/DankMono-Regular.otf.age; diff --git a/modules/fonts/encrypt/DankMono-Bold.otf.age b/home/fonts/encrypt/DankMono-Bold.otf.age similarity index 100% rename from modules/fonts/encrypt/DankMono-Bold.otf.age rename to home/fonts/encrypt/DankMono-Bold.otf.age diff --git a/modules/fonts/encrypt/DankMono-Italic.otf.age b/home/fonts/encrypt/DankMono-Italic.otf.age similarity index 100% rename from modules/fonts/encrypt/DankMono-Italic.otf.age rename to home/fonts/encrypt/DankMono-Italic.otf.age diff --git a/modules/fonts/encrypt/DankMono-Regular.otf.age b/home/fonts/encrypt/DankMono-Regular.otf.age similarity index 100% rename from modules/fonts/encrypt/DankMono-Regular.otf.age rename to home/fonts/encrypt/DankMono-Regular.otf.age diff --git a/modules/fonts/encrypt/codicon.otf.age b/home/fonts/encrypt/codicon.otf.age similarity index 100% rename from modules/fonts/encrypt/codicon.otf.age rename to home/fonts/encrypt/codicon.otf.age diff --git a/modules/fonts/encrypt/faicon.ttf.age b/home/fonts/encrypt/faicon.ttf.age similarity index 100% rename from modules/fonts/encrypt/faicon.ttf.age rename to home/fonts/encrypt/faicon.ttf.age diff --git a/machines/fanta/configuration.nix b/machines/fanta/configuration.nix index 5c02f45..c306fe4 100644 --- a/machines/fanta/configuration.nix +++ b/machines/fanta/configuration.nix @@ -4,7 +4,6 @@ imports = [ ]; modules = { - fonts.enable = true; nvim.enable = true; }; diff --git a/machines/pepper/configuration.nix b/machines/pepper/configuration.nix index 38f1974..bb90ab5 100755 --- a/machines/pepper/configuration.nix +++ b/machines/pepper/configuration.nix @@ -13,7 +13,6 @@ modules = { desktop.enable = true; - fonts.enable = true; server = { enable = true; sshd.enable = true; diff --git a/machines/sodacream/configuration.nix b/machines/sodacream/configuration.nix index e595346..be519f6 100644 --- a/machines/sodacream/configuration.nix +++ b/machines/sodacream/configuration.nix @@ -21,7 +21,6 @@ rawaccel.enable = false; affinity.performanceCores = [ 4 5 6 7 ]; }; - fonts.enable = true; server = { enable = true; tailscale.enable = true; diff --git a/machines/sprite/configuration.nix b/machines/sprite/configuration.nix index 1cb9f33..207fc45 100644 --- a/machines/sprite/configuration.nix +++ b/machines/sprite/configuration.nix @@ -4,7 +4,6 @@ imports = [ ]; modules = { - fonts.enable = true; nvim.enable = true; }; diff --git a/modules/default.nix b/modules/default.nix index 1e731ba..2c402fa 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -5,7 +5,6 @@ ./base ./apps ./desktop - ./fonts ./nvim ./router ./server diff --git a/modules/desktop/fonts.nix b/modules/desktop/fonts.nix index 6e5d0f2..3b6e7b5 100644 --- a/modules/desktop/fonts.nix +++ b/modules/desktop/fonts.nix @@ -14,7 +14,6 @@ in { }; config = mkIf cfg.fonts.enable { - fonts = { fontDir.enable = true; diff --git a/secrets.nix b/secrets.nix index bd883ee..05c347b 100644 --- a/secrets.nix +++ b/secrets.nix @@ -6,15 +6,15 @@ in { "./modules/base/encrypt/nix-access-tokens.conf.age".publicKeys = keys; - "./modules/fonts/encrypt/DankMono-Regular.otf.age".publicKeys = keys; - "./modules/fonts/encrypt/DankMono-Bold.otf.age".publicKeys = keys; - "./modules/fonts/encrypt/DankMono-Italic.otf.age".publicKeys = keys; - "./modules/fonts/encrypt/codicon.otf.age".publicKeys = keys; - "./modules/fonts/encrypt/faicon.ttf.age".publicKeys = keys; - "./modules/server/encrypt/tailscale.age".publicKeys = keys; "./modules/server/encrypt/rclone.conf.age".publicKeys = keys; + "./home/fonts/encrypt/DankMono-Regular.otf.age".publicKeys = keys; + "./home/fonts/encrypt/DankMono-Bold.otf.age".publicKeys = keys; + "./home/fonts/encrypt/DankMono-Italic.otf.age".publicKeys = keys; + "./home/fonts/encrypt/codicon.otf.age".publicKeys = keys; + "./home/fonts/encrypt/faicon.ttf.age".publicKeys = keys; + "./home/base/encrypt/pubring.kbx.age".publicKeys = keys; "./home/base/encrypt/75EF1DBB30A59CFB56BCE06A88CCF363DA63B1A7.key.age".publicKeys = keys; "./home/base/encrypt/E2BFF19637FDC25A02F45583176FAD1ED1F6BDD6.key.age".publicKeys = keys; -- knotmirror 0.0.1