2021-05-30 19:10:28 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
psCfg = config.pub-solar;
|
|
|
|
cfg = config.pub-solar.graphical;
|
|
|
|
yamlFormat = pkgs.formats.yaml {};
|
|
|
|
recursiveMerge = attrList: let
|
2022-08-14 12:15:02 +00:00
|
|
|
f = attrPath:
|
|
|
|
zipAttrsWith (
|
|
|
|
n: values:
|
|
|
|
if tail values == []
|
|
|
|
then head values
|
|
|
|
else if all isList values
|
|
|
|
then unique (concatLists values)
|
|
|
|
else if all isAttrs values
|
|
|
|
then f (attrPath ++ [n]) values
|
|
|
|
else last values
|
|
|
|
);
|
|
|
|
in
|
|
|
|
f [] attrList;
|
2021-05-30 19:10:28 +00:00
|
|
|
in {
|
|
|
|
options.pub-solar.graphical = {
|
|
|
|
enable = mkEnableOption "Life in color";
|
|
|
|
alacritty = {
|
|
|
|
settings = mkOption {
|
|
|
|
type = yamlFormat.type;
|
|
|
|
default = {};
|
|
|
|
};
|
|
|
|
};
|
2022-05-03 17:11:25 +00:00
|
|
|
autologin.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
description = "Feature flag enabling autologin after boot.";
|
|
|
|
};
|
2022-02-03 01:47:00 +00:00
|
|
|
wayland.software-renderer.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Feature flag enabling wlroots software renderer, useful in VMs";
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
hardware.opengl.enable = true;
|
|
|
|
environment = {
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
gtk-engine-murrine
|
|
|
|
gtk_engines
|
|
|
|
gsettings-desktop-schemas
|
|
|
|
|
|
|
|
matcha-gtk-theme
|
|
|
|
papirus-maia-icon-theme
|
|
|
|
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
etc = {
|
|
|
|
"xdg/PubSolar.conf".text = ''
|
|
|
|
[Qt]
|
|
|
|
style=GTK+
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-08-29 09:55:20 +00:00
|
|
|
services.getty.autologinUser = mkIf cfg.autologin.enable (mkForce "${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";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Required for running Gnome apps outside the Gnome DE, see https://nixos.wiki/wiki/GNOME#Running_GNOME_programs_outside_of_GNOME
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
services.udev.packages = with pkgs; [gnome3.gnome-settings-daemon];
|
|
|
|
# Enable Sushi, a quick previewer for nautilus
|
|
|
|
services.gnome.sushi.enable = true;
|
|
|
|
# Enable GVfs, a userspace virtual filesystem
|
|
|
|
services.gvfs.enable = true;
|
|
|
|
|
|
|
|
fonts.enableDefaultFonts = true;
|
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
fira-code
|
|
|
|
fira-code-symbols
|
|
|
|
google-fonts
|
|
|
|
lato
|
|
|
|
montserrat
|
|
|
|
nerdfonts
|
|
|
|
noto-fonts
|
|
|
|
noto-fonts-cjk
|
|
|
|
open-sans
|
|
|
|
powerline-fonts
|
|
|
|
source-sans-pro
|
|
|
|
];
|
|
|
|
|
2022-02-03 00:34:01 +00:00
|
|
|
home-manager = with pkgs;
|
|
|
|
setAttrByPath ["users" psCfg.user.name] {
|
2021-05-30 19:10:28 +00:00
|
|
|
home.packages = [
|
|
|
|
alacritty
|
2022-02-03 01:01:05 +00:00
|
|
|
foot
|
2023-06-13 13:06:07 +00:00
|
|
|
ungoogled-chromium
|
2021-09-22 20:21:11 +00:00
|
|
|
firefox-wayland
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
flameshot
|
|
|
|
libnotify
|
2022-04-30 13:13:20 +00:00
|
|
|
gnome.adwaita-icon-theme
|
2021-07-13 17:05:36 +00:00
|
|
|
gnome.eog
|
2022-04-30 13:13:20 +00:00
|
|
|
gnome.nautilus
|
|
|
|
gnome.yelp
|
|
|
|
hicolor-icon-theme
|
2021-05-30 19:10:28 +00:00
|
|
|
toggle-kbd-layout
|
|
|
|
];
|
|
|
|
|
|
|
|
xdg.configFile."alacritty/alacritty.yml" = {
|
|
|
|
source = yamlFormat.generate "alacritty.yml" (recursiveMerge [(import ./alacritty.nix) cfg.alacritty.settings]);
|
|
|
|
};
|
|
|
|
|
2022-11-20 22:28:23 +00:00
|
|
|
gtk = {
|
2021-05-30 19:10:28 +00:00
|
|
|
enable = true;
|
2022-05-03 17:11:25 +00:00
|
|
|
font.name = "Lato";
|
2021-05-30 19:10:28 +00:00
|
|
|
iconTheme = {
|
2022-04-30 13:13:20 +00:00
|
|
|
package = pkgs.papirus-icon-theme;
|
2021-05-30 19:10:28 +00:00
|
|
|
name = "Papirus-Adapta-Nokto-Maia";
|
2022-11-20 22:28:23 +00:00
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
theme = {
|
|
|
|
package = pkgs.matcha-gtk-theme;
|
|
|
|
name = "Matcha-dark-aliz";
|
2022-11-20 22:28:23 +00:00
|
|
|
};
|
|
|
|
|
2021-05-30 19:10:28 +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";
|
2022-11-20 22:28:23 +00:00
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Fix KeepassXC rendering issue
|
|
|
|
# https://github.com/void-linux/void-packages/issues/23517
|
|
|
|
systemd.user.sessionVariables.QT_AUTO_SCREEN_SCALE_FACTOR = "0";
|
|
|
|
|
|
|
|
xresources.extraConfig = builtins.readFile ./.Xdefaults;
|
|
|
|
|
|
|
|
systemd.user.services.network-manager-applet = import ./network-manager-applet.service.nix pkgs;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|