nixos/home/hyprland/default.nix

70 lines
2 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, hyprland, anyrun, wallpapers, ... }:
2023-07-28 09:09:39 +01:00
let
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}";
gtk-theme = config.gtk.theme.name;
icon-theme = config.gtk.iconTheme.name;
cursor-theme = config.gtk.cursorTheme.name;
in ''
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
gnome_schema=org.gnome.desktop.interface
gsettings set $gnome_schema gtk-theme '${gtk-theme}'
gsettings set $gnome_schema icon-theme '${icon-theme}'
gsettings set $gnome_schema cursor-theme '${cursor-theme}'
'';
};
in {
imports = [
hyprland.homeManagerModules.default
../alacritty/tiling.nix
./waybar/default.nix
./swaync/default.nix
./rofi/default.nix
./anyrun/default.nix
./swaylock.nix
./gtk.nix
];
home.packages = with pkgs; [ libsForQt5.polkit-kde-agent configure-gtk ];
programs = {
emacs.package = pkgs.emacs29-pgtk;
firefox.package = pkgs.firefox-wayland;
rofi = {
package = pkgs.rofi-wayland;
terminal = "${pkgs.alacritty}/bin/alacritty";
2023-09-05 18:44:29 +01:00
pass.extraConfig = ''
backend=wtype
clibpoard_backend=wl-clipboard
'';
};
};
services.kanshi = {
enable = true;
systemdTarget = "hyprland-session.target";
};
wayland.windowManager.hyprland = {
enable = true;
package = null; # Use package from nixpkgs
xwayland = {
enable = true;
hidpi = true;
};
extraConfig = import ./config.nix {
pkgs = pkgs;
anyrun = anyrun;
};
};
xdg.configFile = {
"hypr/hyprpaper.conf".text = ''
preload = ${wallpapers.outputs.default}
wallpaper = ,${wallpapers.outputs.default}
'';
"hypr/macchiato.conf".source = ./macchiato.conf;
2023-09-04 09:13:06 +01:00
"hypr/extra.conf" = lib.mkDefault { text = ""; };
};
}