2024-09-04 20:28:41 +00:00
|
|
|
args@{
|
2021-05-30 19:10:28 +00:00
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
psCfg = config.pub-solar;
|
2024-06-03 10:30:14 +00:00
|
|
|
tomlFormat = pkgs.formats.toml {};
|
2023-10-07 14:45:42 +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";
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
in {
|
2023-10-07 14:45:42 +00:00
|
|
|
imports = [
|
|
|
|
./sway
|
2024-03-26 22:58:04 +00:00
|
|
|
./waybar.nix
|
|
|
|
./mako.nix
|
2023-10-07 14:45:42 +00:00
|
|
|
];
|
|
|
|
|
2021-05-30 19:10:28 +00:00
|
|
|
options.pub-solar.graphical = {
|
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
|
|
|
};
|
|
|
|
|
2023-10-07 14:45:42 +00:00
|
|
|
config = {
|
2021-05-30 19:10:28 +00:00
|
|
|
hardware.opengl.enable = true;
|
2023-10-07 14:45:42 +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-10-07 14:45:42 +00:00
|
|
|
xdg-utils
|
2024-08-24 19:12:05 +00:00
|
|
|
xorg.xbacklight
|
2024-11-14 11:18:28 +00:00
|
|
|
|
|
|
|
desktop-file-utils
|
2021-05-30 19:10:28 +00:00
|
|
|
];
|
2023-10-07 14:45:42 +00:00
|
|
|
|
|
|
|
variables = sessionVariables;
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
|
2023-10-07 14:45:42 +00:00
|
|
|
services.getty.autologinUser = psCfg.user.name;
|
2021-05-30 19:10:28 +00:00
|
|
|
|
|
|
|
# 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;
|
2023-10-07 14:45:42 +00:00
|
|
|
|
2024-04-03 19:02:21 +00:00
|
|
|
# This actually lowers security and is
|
|
|
|
# required to run electron apps with the hardened kernel
|
|
|
|
boot.kernel.sysctl."kernel.unprivileged_userns_clone" = 1;
|
|
|
|
|
2023-10-07 14:45:42 +00:00
|
|
|
fonts = {
|
2023-12-17 16:14:19 +00:00
|
|
|
packages = with pkgs; [
|
2023-10-07 14:45:42 +00:00
|
|
|
dejavu_fonts
|
|
|
|
powerline-fonts
|
|
|
|
];
|
2023-12-17 16:14:19 +00:00
|
|
|
enableDefaultPackages = true;
|
2023-10-07 14:45:42 +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-10-07 14:45:42 +00:00
|
|
|
users.users."${psCfg.user.name}".packages = with pkgs; [
|
|
|
|
alacritty
|
|
|
|
gnome.adwaita-icon-theme
|
|
|
|
gnome.eog
|
|
|
|
gnome.nautilus
|
2023-10-07 19:11:08 +00:00
|
|
|
gnome.seahorse
|
2023-10-07 14:45:42 +00:00
|
|
|
gnome.yelp
|
2023-10-07 19:11:08 +00:00
|
|
|
keepassxc
|
|
|
|
libnotify
|
2023-10-07 14:45:42 +00:00
|
|
|
toggle-kbd-layout
|
|
|
|
vlc
|
2023-10-07 19:11:08 +00:00
|
|
|
wcwd
|
2024-10-18 14:43:00 +00:00
|
|
|
wdisplays
|
2024-08-18 22:22:59 +00:00
|
|
|
wl-mirror
|
2021-05-30 19:10:28 +00:00
|
|
|
];
|
|
|
|
|
2024-09-05 21:26:51 +00:00
|
|
|
qt = {
|
|
|
|
enable = true;
|
|
|
|
platformTheme = "gtk2";
|
|
|
|
style = "gtk2";
|
|
|
|
};
|
|
|
|
|
2023-10-07 14:45:42 +00:00
|
|
|
home-manager.users."${psCfg.user.name}" = {
|
|
|
|
home.file."xinitrc".source = ./.xinitrc;
|
2024-09-04 20:28:41 +00:00
|
|
|
xdg.configFile."alacritty/alacritty.toml".source = tomlFormat.generate "alacritty.toml" ((import ./alacritty.nix) args);
|
2023-10-07 14:45:42 +00:00
|
|
|
xdg.configFile."xmodmap".source = ./.config/xmodmap;
|
|
|
|
xdg.configFile."user-dirs.locale".source = ./.config/user-dirs.locale;
|
|
|
|
xdg.configFile."libinput-gestures.conf".source = ./.config/libinput-gestures.conf;
|
|
|
|
xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg;
|
|
|
|
|
2024-09-04 23:22:56 +00:00
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.firefox-wayland;
|
|
|
|
};
|
|
|
|
|
2024-09-04 20:28:41 +00:00
|
|
|
dconf.settings = {
|
|
|
|
"org/gnome/desktop/interface" = {
|
|
|
|
color-scheme = "prefer-dark";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-10-07 14:45:42 +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-10-07 14:45:42 +00:00
|
|
|
gtk3.extraConfig = {
|
|
|
|
gtk-xft-antialias = "1";
|
|
|
|
gtk-xft-hinting = "1";
|
|
|
|
gtk-xft-hintstyle = "hintfull";
|
|
|
|
gtk-xft-rgba = "rgb";
|
2024-09-04 20:28:41 +00:00
|
|
|
gtk-application-prefer-dark-theme = "1";
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
2023-10-07 14:45:42 +00:00
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-10-07 14:45:42 +00:00
|
|
|
xresources.extraConfig = builtins.readFile ./.Xdefaults;
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2024-10-18 14:43:00 +00:00
|
|
|
services.network-manager-applet.enable = true;
|
|
|
|
systemd.user.services.network-manager-applet = {
|
|
|
|
Unit = {
|
|
|
|
BindsTo = ["sway-session.target"];
|
|
|
|
After = lib.mkForce ["sway-session.target"];
|
|
|
|
Requires = lib.mkForce [ ];
|
|
|
|
};
|
|
|
|
Install.WantedBy = [ "sway-session.target" ];
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
|
2023-10-07 14:45:42 +00:00
|
|
|
home.sessionVariables = sessionVariables;
|
|
|
|
systemd.user.sessionVariables = sessionVariables;
|
|
|
|
};
|
2021-05-30 19:10:28 +00:00
|
|
|
};
|
|
|
|
}
|