refactor(hyprland.nix): use module from hm and set config in nix

This commit is contained in:
matt1432 2023-10-03 12:07:50 -04:00
parent 12659e916f
commit 20f2f3890b

View file

@ -1,6 +1,9 @@
{ pkgs, config, hyprland, hyprgrass, ags, ... }: let
configDir = (import ../vars.nix).configDir;
symlink = config.lib.file.mkOutOfStoreSymlink;
gset = pkgs.gsettings-desktop-schemas;
polkit = pkgs.plasma5Packages.polkit-kde-agent;
in
{
home.packages = with pkgs; [
@ -9,7 +12,6 @@ in
];
imports = [
hyprland.homeManagerModules.default
ags.homeManagerModules.default
];
@ -27,16 +29,22 @@ in
"${hyprgrass.packages.x86_64-linux.default}/lib/libhyprgrass.so"
];
extraConfig = ''
env = XDG_DATA_DIRS, ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS
settings = {
env = [
"XDG_DATA_DIRS, ${builtins.concatStringsSep ":" [
"${gset}/share/gsettings-schemas/${gset.name}"
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
"$XDG_DATA_DIRS"
]}"
env = AGS_PATH, ${configDir}/ags/bin
env = HYPR_PATH, ${configDir}/hypr/scripts
env = LOCK_PATH, ${configDir}/gtklock/scripts
"AGS_PATH, ${configDir}/ags/bin"
"HYPR_PATH, ${configDir}/hypr/scripts"
"LOCK_PATH, ${configDir}/gtklock/scripts"
];
exec-once = ${pkgs.plasma5Packages.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1
source = ~/.config/hypr/main.conf
'';
exec-once = [ "${polkit}/libexec/polkit-kde-authentication-agent-1" ];
source = [ "~/.config/hypr/main.conf" ];
};
};
xdg.configFile = {