fix wayland stuff #135
5 changed files with 73 additions and 48 deletions
|
@ -20,15 +20,30 @@ in {
|
|||
./services/docker.nix
|
||||
./services/cifs.nix
|
||||
];
|
||||
fonts.fonts = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override {fonts = ["FiraCode" "DroidSansMono" "Noto"];})
|
||||
nix-packages.packages.${system}.nasin-nanpa
|
||||
nix-packages.packages.${system}.fairfax-hd
|
||||
];
|
||||
fonts.fontconfig.enable = true;
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
monospace = [ "Fira Code" "Font Awesome 5 Free" ];
|
||||
sansSerif = [ "Noto Sans" "Font Awesome 5 Free" ];
|
||||
serif = [ "Noto Serif" "Font Awesome 5 Free" ];
|
||||
};
|
||||
};
|
||||
fonts = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
font-awesome
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
(nerdfonts.override {fonts = ["FiraCode" "DroidSansMono" "Noto"];})
|
||||
nix-packages.packages.${system}.nasin-nanpa
|
||||
nix-packages.packages.${system}.fairfax-hd
|
||||
];
|
||||
};
|
||||
fonts.fontconfig.localConf = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
|
@ -103,17 +118,16 @@ in {
|
|||
programs.dconf.enable = true;
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.defaultSession = "sway";
|
||||
displayManager.sddm.enable = true;
|
||||
libinput.enable = true;
|
||||
layout = "de";
|
||||
xkbVariant = "neo";
|
||||
};
|
||||
programs.sway.enable = true;
|
||||
boot.kernelPackages = pkgs.zfsUnstable.latestCompatibleLinuxPackages;
|
||||
i18n.inputMethod = {
|
||||
enabled = "ibus";
|
||||
ibus.engines = with pkgs.ibus-engines; [anthy];
|
||||
};
|
||||
security.polkit.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.dbus.packages = with pkgs; [ dconf ];
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ desktop: {pkgs, ...}: {
|
|||
plugins = [
|
||||
];
|
||||
};
|
||||
atuin.enable = true;
|
||||
autojump.enable = true;
|
||||
jq.enable = true;
|
||||
ledger.enable = true;
|
||||
|
|
|
@ -48,25 +48,6 @@
|
|||
'';
|
||||
installPhase = "true";
|
||||
};
|
||||
# currently, there is some friction between sway and gtk:
|
||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||
# the suggested way to set gtk settings is with gsettings
|
||||
# for gsettings to work, we need to tell it where the schemas are
|
||||
# using the XDG_DATA_DIR environment variable
|
||||
# run at the end of sway config
|
||||
configure-gtk = pkgs.writeTextFile {
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
executable = true;
|
||||
text = let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in ''
|
||||
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
||||
gnome_schema=org.gnome.desktop.interface
|
||||
${pkgs.glib}/bin/gsettings set $gnome_schema gtk-theme 'Breeze-Dark'
|
||||
'';
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
./wl-clipboard.nix
|
||||
|
@ -145,19 +126,22 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
wrapperFeatures.gtk = true;
|
||||
wrapperFeatures = {
|
||||
base = true;
|
||||
gtk = true;
|
||||
};
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export GTK_USE_PORTAL=1
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=0
|
||||
export QT_SCALE_FACTOR=1
|
||||
export GDK_SCALE=1
|
||||
export GDK_DPI_SCALE=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
'';
|
||||
extraConfig = ''
|
||||
exec ${configure-gtk}/bin/configure-gtk
|
||||
exec ${pkgs.systemd}/bin/systemctl --user import-environment
|
||||
default_border none
|
||||
gaps outer 8
|
||||
gaps inner 4
|
||||
|
|
|
@ -7,12 +7,20 @@
|
|||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
rasiColor = c: mkLiteral (theme.cssColor c);
|
||||
in {
|
||||
dconf.settings."org/gnome/desktop/interface" = {
|
||||
gtk-theme = "Breeze-Dark";
|
||||
icon-theme = "breeze-dark";
|
||||
cursor-theme = "Vanilla-DMZ";
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
package = pkgs.libsForQt5.breeze-icons;
|
||||
name = "breeze-dark";
|
||||
size = 24;
|
||||
gtk2.extraConfig = ''
|
||||
gtk-cursor-theme-name = "Vanilla-DMZ"
|
||||
gtk-cursor-theme-size = 0
|
||||
'';
|
||||
gtk3.extraConfig = {
|
||||
gtk-cursor-theme-name = "Vanilla-DMZ";
|
||||
gtk-cursor-theme-size = 0;
|
||||
};
|
||||
font = {
|
||||
package = pkgs.noto-fonts;
|
||||
|
@ -28,9 +36,22 @@ in {
|
|||
name = "Breeze-Dark";
|
||||
};
|
||||
};
|
||||
qt.enable = true;
|
||||
qt.style.package = pkgs.libsForQt5.breeze-qt5;
|
||||
qt.style.name = "BreezeDark";
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style = {
|
||||
name = "Breeze";
|
||||
package = pkgs.libsForQt5.breeze-qt5;
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
".icons/default/index.theme".text = ''
|
||||
[Icon Theme]
|
||||
Name=Default
|
||||
Comment=Default Cursor Theme
|
||||
Inherits=Vanilla-DMZ
|
||||
'';
|
||||
};
|
||||
# Taken from https://github.com/jakehamilton/dotfiles/blob/master/waybar/style.css
|
||||
programs.waybar.style = with theme; ''
|
||||
* {
|
||||
|
@ -178,7 +199,9 @@ in {
|
|||
client.urgent ${cssColor peach} ${cssColor base} ${cssColor peach} ${cssColor overlay0} ${cssColor peach}
|
||||
client.placeholder ${cssColor overlay0} ${cssColor base} ${cssColor text} ${cssColor overlay0} ${cssColor overlay0}
|
||||
client.background ${cssColor base}
|
||||
seat seat0 xcursor_theme breeze-dark 24
|
||||
'';
|
||||
home.packages = with pkgs; [ libsForQt5.breeze-icons vanilla-dmz ];
|
||||
|
||||
programs.foot.settings.colors = with theme; {
|
||||
alpha = 0.9;
|
||||
|
|
|
@ -7,6 +7,11 @@ desktop: _: {
|
|||
enableSyntaxHighlighting = true;
|
||||
enableVteIntegration = desktop;
|
||||
autocd = true;
|
||||
loginExtra = if desktop then ''
|
||||
if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty1" ]]; then
|
||||
exec sway
|
||||
fi
|
||||
'' else "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue