2023-01-28 20:49:10 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-06-13 00:14:25 +00:00
|
|
|
let
|
2021-05-30 19:10:28 +00:00
|
|
|
psCfg = config.pub-solar;
|
2024-04-18 10:57:14 +00:00
|
|
|
tomlFormat = pkgs.formats.toml { };
|
2023-11-10 18:48:06 +00:00
|
|
|
sessionVariables = {
|
|
|
|
WLR_RENDERER = if psCfg.graphical.wayland.software-renderer.enable then "pixman" else "gles2";
|
|
|
|
# Fix KeepassXC rendering issue
|
|
|
|
# https://github.com/void-linux/void-packages/issues/23517
|
|
|
|
QT_AUTO_SCREEN_SCALE_FACTOR = "0";
|
|
|
|
};
|
2023-01-28 20:49:10 +00:00
|
|
|
in
|
|
|
|
{
|
2023-11-10 18:48:06 +00:00
|
|
|
imports = [ ./sway ];
|
|
|
|
|
2021-05-30 19:10:28 +00:00
|
|
|
options.pub-solar.graphical = {
|
2024-06-13 00:14:25 +00:00
|
|
|
wayland.software-renderer.enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2022-02-03 01:47:00 +00:00
|
|
|
default = false;
|
|
|
|
description = "Feature flag enabling wlroots software renderer, useful in VMs";
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
config = {
|
2024-11-05 14:31:42 +00:00
|
|
|
hardware.graphics.enable = true;
|
2023-11-10 18:48:06 +00:00
|
|
|
|
2021-05-30 19:10:28 +00:00
|
|
|
environment = {
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
gtk-engine-murrine
|
|
|
|
gtk_engines
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
|
|
|
|
matcha-gtk-theme
|
|
|
|
papirus-maia-icon-theme
|
|
|
|
|
|
|
|
glib
|
2023-11-10 18:48:06 +00:00
|
|
|
xdg-utils
|
2021-05-30 19:10:28 +00:00
|
|
|
];
|
2023-11-10 18:48:06 +00:00
|
|
|
|
2021-05-30 19:10:28 +00:00
|
|
|
etc = {
|
|
|
|
"xdg/PubSolar.conf".text = ''
|
|
|
|
[Qt]
|
|
|
|
style=GTK+
|
|
|
|
'';
|
|
|
|
};
|
2023-11-10 18:48:06 +00:00
|
|
|
|
|
|
|
variables = sessionVariables;
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
services.getty.autologinUser = psCfg.user.name;
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-05-17 22:04:39 +00:00
|
|
|
qt = {
|
2021-05-30 19:10:28 +00:00
|
|
|
enable = true;
|
|
|
|
platformTheme = "gtk2";
|
|
|
|
style = "gtk2";
|
|
|
|
};
|
|
|
|
|
2024-10-28 14:24:04 +00:00
|
|
|
services.udev.packages = with pkgs; [ gnome-settings-daemon ];
|
2021-05-30 19:10:28 +00:00
|
|
|
# Enable Sushi, a quick previewer for nautilus
|
|
|
|
services.gnome.sushi.enable = true;
|
|
|
|
# Enable GVfs, a userspace virtual filesystem
|
|
|
|
services.gvfs.enable = true;
|
2023-11-10 18:48:06 +00:00
|
|
|
services.yubikey-agent.enable = true;
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
fonts = {
|
2023-11-12 18:06:07 +00:00
|
|
|
packages = with pkgs; [
|
2023-11-10 18:48:06 +00:00
|
|
|
dejavu_fonts
|
|
|
|
powerline-fonts
|
2024-07-15 17:04:53 +00:00
|
|
|
tt2020
|
2023-11-10 18:48:06 +00:00
|
|
|
];
|
2023-11-12 18:06:07 +00:00
|
|
|
enableDefaultPackages = true;
|
2023-11-10 18:48:06 +00:00
|
|
|
fontconfig.enable = true;
|
|
|
|
fontconfig.defaultFonts = {
|
|
|
|
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
|
|
|
sansSerif = [ "DejaVu Sans" ];
|
|
|
|
};
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
users.users."${psCfg.user.name}".packages = with pkgs; [
|
|
|
|
alacritty
|
2024-03-06 17:45:20 +00:00
|
|
|
firefox-wayland
|
2023-11-10 18:48:06 +00:00
|
|
|
flameshot
|
2024-10-28 14:24:04 +00:00
|
|
|
adwaita-icon-theme
|
|
|
|
eog
|
|
|
|
nautilus
|
|
|
|
seahorse
|
|
|
|
yelp
|
2023-11-10 18:48:06 +00:00
|
|
|
hicolor-icon-theme
|
|
|
|
keepassxc
|
2024-10-28 14:24:04 +00:00
|
|
|
qMasterPassword-wayland
|
2023-11-10 18:48:06 +00:00
|
|
|
libnotify
|
|
|
|
vlc
|
|
|
|
];
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
home-manager.users."${psCfg.user.name}" = {
|
|
|
|
home.file."xinitrc".source = ./.xinitrc;
|
2024-04-18 10:57:14 +00:00
|
|
|
xdg.configFile."alacritty/alacritty.toml".source = tomlFormat.generate "alacritty.toml" (import ./alacritty.nix);
|
2023-11-10 18:48:06 +00:00
|
|
|
xdg.configFile."xmodmap".source = ./.config/xmodmap;
|
|
|
|
xdg.configFile."user-dirs.dirs".source = ./.config/user-dirs.dirs;
|
|
|
|
xdg.configFile."user-dirs.locale".source = ./.config/user-dirs.locale;
|
|
|
|
xdg.configFile."xsettingsd/xsettingsd.conf".source = ./.config/xsettingsd/xsettingsd.conf;
|
|
|
|
xdg.configFile."mako/config".source = ./.config/mako/config;
|
|
|
|
xdg.configFile."libinput-gestures.conf".source = ./.config/libinput-gestures.conf;
|
|
|
|
xdg.configFile."swaync/config.json".source = ./.config/swaync/config.json;
|
|
|
|
xdg.configFile."swaync/style.css".source = ./.config/swaync/style.css;
|
|
|
|
xdg.configFile."waybar/config".source = ./.config/waybar/config;
|
|
|
|
xdg.configFile."waybar/style.css".source = ./.config/waybar/style.css;
|
|
|
|
xdg.configFile."waybar/colorscheme.css".source = ./.config/waybar/colorscheme.css;
|
|
|
|
xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg;
|
|
|
|
|
2023-11-12 21:15:48 +00:00
|
|
|
# Required for running Gnome apps outside the Gnome DE, see
|
|
|
|
# https://nixos.wiki/wiki/GNOME#Running_GNOME_programs_outside_of_GNOME
|
|
|
|
dconf = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
"org/gnome/desktop/interface" = {
|
|
|
|
color-scheme = "prefer-dark";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
gtk = {
|
|
|
|
enable = true;
|
|
|
|
font.name = "Lato";
|
|
|
|
iconTheme = {
|
|
|
|
package = pkgs.papirus-icon-theme;
|
|
|
|
name = "Papirus-Adapta-Nokto-Maia";
|
|
|
|
};
|
|
|
|
theme = {
|
|
|
|
package = pkgs.matcha-gtk-theme;
|
|
|
|
name = "Matcha-dark-aliz";
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
gtk3.extraConfig = {
|
|
|
|
gtk-xft-antialias = "1";
|
|
|
|
gtk-xft-hinting = "1";
|
|
|
|
gtk-xft-hintstyle = "hintfull";
|
|
|
|
gtk-xft-rgba = "rgb";
|
|
|
|
gtk-application-prefer-dark-theme = "true";
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
2023-11-12 21:15:48 +00:00
|
|
|
|
|
|
|
gtk4.extraConfig = {
|
|
|
|
gtk-xft-antialias = "1";
|
|
|
|
gtk-xft-hinting = "1";
|
|
|
|
gtk-xft-hintstyle = "hintfull";
|
|
|
|
gtk-xft-rgba = "rgb";
|
|
|
|
gtk-application-prefer-dark-theme = "true";
|
|
|
|
};
|
2023-11-10 18:48:06 +00:00
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
xresources.extraConfig = builtins.readFile ./.Xdefaults;
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
systemd.user.services.network-manager-applet = import ./network-manager-applet.service.nix pkgs;
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-11-10 18:48:06 +00:00
|
|
|
home.sessionVariables = sessionVariables;
|
|
|
|
systemd.user.sessionVariables = sessionVariables;
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
}
|