Compare commits
6 commits
bd449ebd8c
...
0b72dd7dee
Author | SHA1 | Date | |
---|---|---|---|
0b72dd7dee | |||
ccf30d8414 | |||
6e3a046918 | |||
8bbf31a916 | |||
d8fd615040 | |||
7c53906edb |
29 changed files with 166 additions and 68 deletions
|
@ -61,12 +61,5 @@ in {
|
|||
|
||||
desktop = mkOption {default = "google-chrome.desktop";};
|
||||
};
|
||||
|
||||
font = {
|
||||
emoji = mkOption {default = "Noto Color Emoji";};
|
||||
monospace = mkOption {default = "IosevkaTerm NFP SemiBold";};
|
||||
sans-serif = mkOption {default = "Outfit";};
|
||||
serif = mkOption {default = "Liberation Serif";};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ in {
|
|||
bar_padding = 10;
|
||||
bar_precedence_over_border = true; # Render borders around hyprbars
|
||||
bar_text_align = "left";
|
||||
bar_text_font = config.custom.font.monospace;
|
||||
bar_text_font = config.custom.settings.fonts.monospace;
|
||||
bar_text_size = 11;
|
||||
#// bar_title_enabled = false;
|
||||
"col.text" = "rgb(93a1a1)";
|
||||
|
|
|
@ -185,7 +185,7 @@ in {
|
|||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
focus_on_activate = true;
|
||||
font_family = config.custom.font.monospace;
|
||||
font_family = config.custom.settings.fonts.monospace;
|
||||
force_default_wallpaper = 0;
|
||||
initial_workspace_tracking = 2; # All children
|
||||
key_press_enables_dpms = true;
|
||||
|
|
|
@ -44,6 +44,7 @@ in {
|
|||
home-manager.sharedModules = [
|
||||
{
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Key-Bindings
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsbinds
|
||||
#?? Mod = Super/Win, Alt when nested; Mod5 = AltGr
|
||||
#?? wev
|
||||
programs.niri.settings.binds = let
|
||||
|
|
|
@ -41,7 +41,6 @@ in {
|
|||
|
||||
# https://github.com/YaLTeR/niri
|
||||
# https://github.com/sodiboo/niri-flake
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
#// package = pkgs.niri; # nixpkgs
|
||||
|
@ -50,7 +49,7 @@ in {
|
|||
|
||||
nixpkgs.overlays = [inputs.niri-flake.overlays.niri];
|
||||
|
||||
#!! Disable bundled KDE polkit agent by default
|
||||
# Disable bundled KDE polkit agent by default
|
||||
# https://github.com/sodiboo/niri-flake?tab=readme-ov-file#additional-notes
|
||||
systemd.user.services.niri-flake-polkit.enable = cfg.polkit;
|
||||
|
||||
|
|
|
@ -15,16 +15,19 @@ in {
|
|||
{
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Input
|
||||
programs.niri.settings.input = {
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Input#general-settings
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputfocus-follows-mouseenable
|
||||
focus-follows-mouse = {
|
||||
enable = true;
|
||||
max-scroll-amount = "100%";
|
||||
};
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputpower-key-handlingenable
|
||||
power-key-handling.enable = false;
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputworkspace-auto-back-and-forth
|
||||
workspace-auto-back-and-forth = true;
|
||||
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Input#keyboard
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputkeyboardrepeat-delay
|
||||
keyboard = {
|
||||
repeat-delay = 300;
|
||||
repeat-rate = 40;
|
||||
|
@ -32,12 +35,13 @@ in {
|
|||
|
||||
# BUG: Applies to trackball device, switch to "flat" when per-device configuration is supported
|
||||
# https://github.com/YaLTeR/niri/issues/371
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Input#pointing-devices
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputmouseaccel-profile
|
||||
mouse = {
|
||||
accel-profile = "adaptive";
|
||||
accel-speed = -0.2;
|
||||
};
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputtouchpadaccel-profile
|
||||
touchpad = {
|
||||
accel-profile = "adaptive";
|
||||
accel-speed = 0.3;
|
||||
|
@ -47,6 +51,7 @@ in {
|
|||
scroll-factor = 0.4;
|
||||
};
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsinputtrackballaccel-profile
|
||||
trackball = {
|
||||
accel-profile = "adaptive";
|
||||
accel-speed = 0.5;
|
||||
|
|
|
@ -17,8 +17,10 @@ in {
|
|||
programs.niri.settings.layout = let
|
||||
gap = config.custom.gap / 2;
|
||||
in {
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutalways-center-single-column
|
||||
always-center-single-column = true;
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutborder
|
||||
border = {
|
||||
enable = true;
|
||||
width = config.custom.border;
|
||||
|
@ -26,33 +28,39 @@ in {
|
|||
inactive.color = "#00000000";
|
||||
};
|
||||
|
||||
#/// center-focused-column = mkIf config.custom.ultrawide "always";
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutcenter-focused-column
|
||||
#// center-focused-column = mkIf config.custom.ultrawide "always";
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutdefault-column-width
|
||||
default-column-width.proportion = 1.0 / 3.0; # 33%
|
||||
|
||||
# TODO: Uncomment after next release > v1.10.1
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Layout#empty-workspace-above-first
|
||||
#// empty-workspace-above-first = true;
|
||||
|
||||
focus-ring.enable = false;
|
||||
gaps = gap;
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutinsert-hint
|
||||
insert-hint = {
|
||||
enable = true;
|
||||
display.color = "#d3368280";
|
||||
};
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutpreset-column-widths
|
||||
preset-column-widths = [
|
||||
{proportion = 1.0 / 3.0;} # 33%, default
|
||||
{proportion = 2.0 / 3.0;} # 66%
|
||||
{proportion = 3.0 / 3.0;} # 100%
|
||||
];
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutpreset-window-heights
|
||||
preset-window-heights = [
|
||||
{proportion = 2.0 / 3.0;} # 66%
|
||||
{proportion = 1.0 / 3.0;} # 33%
|
||||
{proportion = 3.0 / 3.0;} # 100%, default
|
||||
];
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingslayoutstruts
|
||||
struts = {
|
||||
left = gap;
|
||||
right = gap;
|
||||
|
|
|
@ -22,8 +22,9 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous
|
||||
programs.niri.settings = {
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingscursorhide-after-inactive-ms
|
||||
cursor = with hm.gtk.cursorTheme; {
|
||||
# Inherit home-manager GTK settings
|
||||
inherit size;
|
||||
|
@ -35,13 +36,18 @@ in {
|
|||
|
||||
# HACK: Inherit home-manager environment variables in lieu of upstream fix
|
||||
# https://github.com/nix-community/home-manager/issues/2659
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsenvironment
|
||||
environment = mapAttrs (name: value: toString value) hm.home.sessionVariables;
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingshotkey-overlayskip-at-startup
|
||||
hotkey-overlay.skip-at-startup = true;
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsprefer-no-csd
|
||||
prefer-no-csd = true;
|
||||
|
||||
#!! Not executed in a shell
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Key-Bindings#spawn
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsspawn-at-startup
|
||||
spawn-at-startup = let
|
||||
home = hm.home.homeDirectory;
|
||||
in
|
||||
|
@ -55,6 +61,7 @@ in {
|
|||
{command = [wallpaper];}
|
||||
];
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsswitch-eventslid-close
|
||||
switch-events = {
|
||||
# Turn display off while inhibiting suspend
|
||||
lid-close.action.spawn = [niri "msg" "action" "power-off-monitors"];
|
||||
|
|
|
@ -15,6 +15,7 @@ in {
|
|||
home-manager.sharedModules = [
|
||||
{
|
||||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsoutputs
|
||||
#?? niri msg outputs
|
||||
programs.niri.settings.outputs = listToAttrs (forEach cfg.connectors (connector: {
|
||||
name = connector;
|
||||
|
|
|
@ -16,6 +16,7 @@ in {
|
|||
# https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||
programs.niri.settings = {
|
||||
# HACK: Name workspaces after index to use open-on-workspace rule
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingsworkspaces
|
||||
#?? niri msg workspaces
|
||||
# workspaces = {
|
||||
# "1" = {};
|
||||
|
@ -23,10 +24,10 @@ in {
|
|||
# "3" = {};
|
||||
# };
|
||||
|
||||
# https://github.com/sodiboo/niri-flake/blob/main/docs.md#programsnirisettingswindow-rules
|
||||
#?? niri msg windows
|
||||
window-rules = [
|
||||
### Defaults
|
||||
|
||||
{
|
||||
# Global
|
||||
geometry-corner-radius = let
|
||||
|
|
|
@ -47,7 +47,7 @@ in {
|
|||
*:focus { outline: none; }
|
||||
|
||||
#window {
|
||||
font: 16px ${config.custom.font.monospace};
|
||||
font: 16px ${config.custom.settings.fonts.monospace};
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,15 +72,15 @@ in {
|
|||
"gnomeTheme.bookmarksToolbarUnderTabs" = true;
|
||||
#// "gnomeTheme.systemIcons" = true;
|
||||
|
||||
"font.default.x-unicode" = config.custom.font.sans-serif;
|
||||
"font.default.x-western" = config.custom.font.sans-serif;
|
||||
"font.name-list.emoji" = config.custom.font.emoji; # System emoji
|
||||
"font.name.monospace.x-unicode" = config.custom.font.monospace;
|
||||
"font.name.monospace.x-western" = config.custom.font.monospace;
|
||||
"font.name.sans-serif.x-unicode" = config.custom.font.sans-serif;
|
||||
"font.name.sans-serif.x-western" = config.custom.font.sans-serif;
|
||||
"font.name.serif.x-unicode" = config.custom.font.sans-serif;
|
||||
"font.name.serif.x-western" = config.custom.font.sans-serif;
|
||||
"font.default.x-unicode" = config.custom.settings.fonts.sans-serif;
|
||||
"font.default.x-western" = config.custom.settings.fonts.sans-serif;
|
||||
"font.name-list.emoji" = config.custom.settings.fonts.emoji; # System emoji
|
||||
"font.name.monospace.x-unicode" = config.custom.settings.fonts.monospace;
|
||||
"font.name.monospace.x-western" = config.custom.settings.fonts.monospace;
|
||||
"font.name.sans-serif.x-unicode" = config.custom.settings.fonts.sans-serif;
|
||||
"font.name.sans-serif.x-western" = config.custom.settings.fonts.sans-serif;
|
||||
"font.name.serif.x-unicode" = config.custom.settings.fonts.sans-serif;
|
||||
"font.name.serif.x-western" = config.custom.settings.fonts.sans-serif;
|
||||
"full-screen-api.ignore-widgets" = false; # Fake fullscreen
|
||||
"full-screen-api.warning.delay" = -1;
|
||||
"full-screen-api.warning.timeout" = 0;
|
||||
|
|
|
@ -15,7 +15,7 @@ in {
|
|||
|
||||
# https://codeberg.org/dnkl/foot/src/branch/master/foot.ini
|
||||
settings = {
|
||||
main.font = "${config.custom.font.monospace}:size=12";
|
||||
main.font = "${config.custom.settings.fonts.monospace}:size=12";
|
||||
scrollback.lines = 10000; # Default 1000
|
||||
|
||||
# Solarized Dark
|
||||
|
|
|
@ -56,7 +56,7 @@ in {
|
|||
# Time
|
||||
{
|
||||
color = "rgb(93a1a1)";
|
||||
font_family = config.custom.font.sans-serif;
|
||||
font_family = config.custom.settings.fonts.sans-serif;
|
||||
font_size = 64;
|
||||
halign = "center";
|
||||
position = "0, 200";
|
||||
|
@ -73,7 +73,7 @@ in {
|
|||
# Date
|
||||
{
|
||||
color = "rgb(93a1a1)";
|
||||
font_family = config.custom.font.sans-serif;
|
||||
font_family = config.custom.settings.fonts.sans-serif;
|
||||
font_size = 32;
|
||||
halign = "center";
|
||||
position = "0, 100";
|
||||
|
@ -85,7 +85,7 @@ in {
|
|||
# Fingerprint
|
||||
{
|
||||
color = "rgb(93a1a1)";
|
||||
font_family = config.custom.font.monospace;
|
||||
font_family = config.custom.settings.fonts.monospace;
|
||||
font_size = 42;
|
||||
halign = "center";
|
||||
position = "0, -100";
|
||||
|
|
|
@ -16,7 +16,7 @@ in {
|
|||
shellIntegration.mode = "no-cursor"; # Disable forced beam cursor
|
||||
|
||||
font = {
|
||||
name = config.custom.font.monospace;
|
||||
name = config.custom.settings.fonts.monospace;
|
||||
size = 14;
|
||||
};
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ in {
|
|||
fullScreen = true;
|
||||
quickSplash = true;
|
||||
size = "${toString (config.custom.width / 2)}x${toString (config.custom.height / 2)}";
|
||||
uiFont = config.custom.font.monospace;
|
||||
uiFont = config.custom.settings.fonts.monospace;
|
||||
uiSize = 24;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@ in {
|
|||
|
||||
#?? rofi-theme-selector
|
||||
theme = "custom";
|
||||
font = "${config.custom.font.monospace} 16";
|
||||
font = "${config.custom.settings.fonts.monospace} 16";
|
||||
|
||||
# https://github.com/davatorium/rofi/blob/next/CONFIG.md
|
||||
extraConfig = {
|
||||
|
|
|
@ -31,7 +31,7 @@ in {
|
|||
indicator-idle-visible = true;
|
||||
indicator-radius = 150;
|
||||
font-size = 48 * config.custom.scale;
|
||||
font = config.custom.font.monospace;
|
||||
font = config.custom.settings.fonts.monospace;
|
||||
image = mkIf config.custom.wallpaper "/tmp/altered.png";
|
||||
bs-hl-color = "93a1a1";
|
||||
color = "073642";
|
||||
|
|
|
@ -138,11 +138,11 @@ in {
|
|||
theme = {
|
||||
style = ''
|
||||
#box {
|
||||
font: larger ${config.custom.font.sans-serif};
|
||||
font: larger ${config.custom.settings.fonts.sans-serif};
|
||||
}
|
||||
|
||||
placeholder {
|
||||
font: larger ${config.custom.font.monospace};
|
||||
font: larger ${config.custom.settings.fonts.monospace};
|
||||
}
|
||||
|
||||
${readFile ./style.css}
|
||||
|
|
|
@ -67,7 +67,7 @@ in {
|
|||
#?? GTK_DEBUG=interactive waybar
|
||||
style = let
|
||||
border = toString config.custom.border;
|
||||
font = config.custom.font.monospace;
|
||||
font = config.custom.settings.fonts.monospace;
|
||||
gap = toString config.custom.gap;
|
||||
in ''
|
||||
* {
|
||||
|
@ -95,7 +95,7 @@ in {
|
|||
#!! Some settings are commonly available for use but not documented per module
|
||||
common = {
|
||||
# https://github.com/Alexays/Waybar/issues/1800
|
||||
smooth-scrolling-threshold = 2;
|
||||
smooth-scrolling-threshold = 1; #!! Affects discrete scroll events
|
||||
|
||||
on-scroll-down =
|
||||
if config.custom.desktop == "niri"
|
||||
|
|
|
@ -21,7 +21,7 @@ in {
|
|||
local act = wezterm.action
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.font = wezterm.font('${config.custom.font.monospace}')
|
||||
config.font = wezterm.font('${config.custom.settings.fonts.monospace}')
|
||||
|
||||
-- # TODO: Remove when using Wayland
|
||||
config.font_size = ${toString (14 * config.custom.scale)}
|
||||
|
|
22
options/custom/programs/xwayland.nix
Normal file
22
options/custom/programs/xwayland.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.programs.xwayland;
|
||||
in {
|
||||
options.custom.programs.xwayland = {
|
||||
enable = mkOption {default = false;};
|
||||
xwayland-run = mkOption {default = true;};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.archlinux.org/title/Wayland#Xwayland
|
||||
programs.xwayland.enable = true;
|
||||
|
||||
# https://gitlab.freedesktop.org/ofourdan/xwayland-run
|
||||
environment.systemPackages = mkIf cfg.xwayland-run [pkgs.xwayland-run];
|
||||
};
|
||||
}
|
|
@ -21,7 +21,7 @@ in {
|
|||
anchor = "top-center";
|
||||
backgroundColor = "#073642";
|
||||
borderColor = "#002b36";
|
||||
font = "${config.custom.font.sans-serif} 12";
|
||||
font = "${config.custom.settings.fonts.sans-serif} 12";
|
||||
layer = "overlay";
|
||||
margin = "20";
|
||||
padding = "10";
|
||||
|
|
|
@ -25,7 +25,7 @@ in {
|
|||
fill-tabs = mkBoolean true;
|
||||
floating-controls = mkBoolean true;
|
||||
floating-controls-hover-area = mkUint32 10;
|
||||
font = mkString "${config.custom.font.monospace} 14";
|
||||
font = mkString "${config.custom.settings.fonts.monospace} 14";
|
||||
headerbar-drag-area = mkBoolean false;
|
||||
notify-process-completion = mkBoolean false;
|
||||
opacity = mkUint32 100;
|
||||
|
@ -71,7 +71,7 @@ in {
|
|||
cursor-blink = mkBoolean false;
|
||||
gtk-enable-primary-paste = mkBoolean false;
|
||||
color-scheme = mkString "prefer-dark";
|
||||
monospace-font-name = mkString "${config.custom.font.monospace} 14";
|
||||
monospace-font-name = mkString "${config.custom.settings.fonts.monospace} 14";
|
||||
};
|
||||
|
||||
# GNOME Files
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
with lib; let
|
||||
cfg = config.custom.settings.dconf;
|
||||
in {
|
||||
options.custom.settings.dconf.default = mkOption {default = false;};
|
||||
options.custom.settings.dconf.enable = mkOption {default = false;};
|
||||
|
||||
config.custom.settings.dconf = mkIf cfg.default {
|
||||
config.custom.settings.dconf = mkIf cfg.enable {
|
||||
apps.enable = true;
|
||||
gnome.enable = true;
|
||||
gnome-shell.enable = true;
|
||||
|
|
|
@ -16,9 +16,10 @@ with lib; {
|
|||
})
|
||||
|
||||
(mkIf config.custom.minimal {
|
||||
dconf.default = true;
|
||||
dconf.enable = true;
|
||||
fonts.enable = true;
|
||||
gtk.enable = true;
|
||||
icons.enable = true;
|
||||
qt.enable = true;
|
||||
#// stylix.enable = true;
|
||||
xdg.enable = true;
|
||||
|
|
|
@ -7,7 +7,13 @@
|
|||
with lib; let
|
||||
cfg = config.custom.settings.fonts;
|
||||
in {
|
||||
options.custom.settings.fonts.enable = mkOption {default = false;};
|
||||
options.custom.settings.fonts = {
|
||||
enable = mkOption {default = false;};
|
||||
emoji = mkOption {default = "Noto Color Emoji";};
|
||||
monospace = mkOption {default = "IosevkaTerm NFP SemiBold";};
|
||||
sans-serif = mkOption {default = "Outfit";};
|
||||
serif = mkOption {default = "Liberation Serif";};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://wiki.nixos.org/wiki/Fonts
|
||||
|
@ -52,10 +58,10 @@ in {
|
|||
|
||||
#?? fc-list --brief | grep family: | sort
|
||||
fontconfig.defaultFonts = {
|
||||
emoji = [config.custom.font.emoji];
|
||||
monospace = [config.custom.font.monospace];
|
||||
sansSerif = [config.custom.font.sans-serif];
|
||||
serif = [config.custom.font.serif];
|
||||
emoji = [cfg.emoji];
|
||||
monospace = [cfg.monospace];
|
||||
sansSerif = [cfg.sans-serif];
|
||||
serif = [cfg.serif];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -14,28 +14,18 @@ in {
|
|||
css = readFile ./style.css;
|
||||
in {
|
||||
enable = true;
|
||||
gtk3.extraCss = css;
|
||||
|
||||
gtk4 = {
|
||||
extraConfig.gtk-hint-font-metrics = 1; # Fix blurry fonts
|
||||
extraCss = css;
|
||||
};
|
||||
|
||||
font = {
|
||||
name = config.custom.font.sans-serif;
|
||||
font = with config.custom.settings.fonts; {
|
||||
name = sans-serif;
|
||||
size = 12;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
cursorTheme = with config.custom.settings.icons.cursor; {
|
||||
inherit name package size;
|
||||
};
|
||||
|
||||
# BUG: home.pointerCursor breaks XCURSOR_PATH for some child windows, so avoid that workaround
|
||||
cursorTheme = {
|
||||
size = 24;
|
||||
name = "GoogleDot-Black";
|
||||
package = pkgs.google-cursor;
|
||||
iconTheme = with config.custom.settings.icons.icon; {
|
||||
inherit name package;
|
||||
};
|
||||
|
||||
theme = {
|
||||
|
@ -45,6 +35,15 @@ in {
|
|||
# https://github.com/nix-community/home-manager/issues/5133
|
||||
#// package = pkgs.adw-gtk3;
|
||||
};
|
||||
|
||||
gtk3 = {
|
||||
extraCss = css;
|
||||
};
|
||||
|
||||
gtk4 = {
|
||||
extraConfig.gtk-hint-font-metrics = 1; # Fix blurry fonts
|
||||
extraCss = css;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
55
options/custom/settings/icons.nix
Normal file
55
options/custom/settings/icons.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.custom.settings.icons;
|
||||
in {
|
||||
options.custom.settings.icons = {
|
||||
enable = mkOption {default = false;};
|
||||
|
||||
cursor = {
|
||||
# https://github.com/ful1e5/Google_Cursor
|
||||
name = mkOption {default = "GoogleDot-Black";};
|
||||
package = mkOption {default = pkgs.google-cursor;};
|
||||
size = mkOption {default = 24;};
|
||||
};
|
||||
|
||||
icon = {
|
||||
# https://github.com/PapirusDevelopmentTeam/papirus-icon-theme
|
||||
name = mkOption {default = "Papirus-Dark";};
|
||||
package = mkOption {default = pkgs.papirus-icon-theme;};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [cfg.cursor.package cfg.icon.package];
|
||||
|
||||
# BUG: home.pointerCursor breaks XCURSOR_PATH for some child windows, so avoid that workaround
|
||||
# HACK: Copy home-manager index.theme without setting XCURSOR_* environment variables
|
||||
home-manager.sharedModules = let
|
||||
# https://github.com/nix-community/home-manager/blob/59a4c43e9ba6db24698c112720a58a334117de83/modules/config/home-cursor.nix#L66C3-L77C8
|
||||
defaultIndexThemePackage = pkgs.writeTextFile {
|
||||
name = "index.theme";
|
||||
destination = "/share/icons/default/index.theme";
|
||||
|
||||
text = ''
|
||||
[Icon Theme]
|
||||
Name=Default
|
||||
Comment=Default Cursor Theme
|
||||
Inherits=${cfg.cursor.name}
|
||||
'';
|
||||
};
|
||||
in [
|
||||
{
|
||||
# https://github.com/nix-community/home-manager/blob/59a4c43e9ba6db24698c112720a58a334117de83/modules/config/home-cursor.nix#L161
|
||||
home.file.".icons/default/index.theme".source = "${defaultIndexThemePackage}/share/icons/default/index.theme";
|
||||
home.file.".icons/${cfg.cursor.name}".source = "${cfg.cursor.package}/share/icons/${cfg.cursor.name}";
|
||||
xdg.dataFile."icons/default/index.theme".source = "${defaultIndexThemePackage}/share/icons/default/index.theme";
|
||||
xdg.dataFile."icons/${cfg.cursor.name}".source = "${cfg.cursor.package}/share/icons/${cfg.cursor.name}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue