From 03895585293de5931dac37b5f5c2ba88fce50f53 Mon Sep 17 00:00:00 2001 From: MathewHDYT <48954742+MathewHDYT@users.noreply.github.com> Date: Fri, 8 Nov 2024 19:41:51 +0100 Subject: [PATCH] Include `customSettings` option to configure regreet (#4) * Attempt to add regrett configuration * Prevent double install of regreet * Install regreet over program enable * Force regreet settings * Revert regreet over programs enable. * Move regreet config into homemanger. --- modules/conf.nix | 2 +- modules/programs/browser/firefox.nix | 2 +- modules/programs/greetd.nix | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/conf.nix b/modules/conf.nix index cb92f2b..2c3236f 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -88,7 +88,7 @@ ]; type = with lib.types; listOf attrs; description = '' - Adds modules to ironbar. + Adds modules to ironbar. See https://github.com/JakeStanger/ironbar/wiki/ for more information. ''; }; }; diff --git a/modules/programs/browser/firefox.nix b/modules/programs/browser/firefox.nix index 108ce1c..9452a07 100644 --- a/modules/programs/browser/firefox.nix +++ b/modules/programs/browser/firefox.nix @@ -46,7 +46,7 @@ }; example = { }; type = with lib.types; attrsOf anything; - description = "Firefox policy configuration"; + description = "Firefox policy configuration. See https://mozilla.github.io/policy-templates/ for more information."; }; extensions = lib.mkOption { default = with pkgs.nur.repos.rycee.firefox-addons; [ diff --git a/modules/programs/greetd.nix b/modules/programs/greetd.nix index 5a3f598..075b575 100644 --- a/modules/programs/greetd.nix +++ b/modules/programs/greetd.nix @@ -58,6 +58,16 @@ ''; }; }; + regreet = { + customSettings = lib.mkOption { + default = { }; + example = { }; + type = with lib.types; attrsOf anything; + description = '' + Custom regret settings. See https://github.com/rharish101/ReGreet/blob/main/regreet.sample.toml for more information. + ''; + }; + }; }; config = @@ -120,11 +130,13 @@ env=XCURSOR_SIZE,${toString config.mods.stylix.cursor.size} env=QT_QPA_PLATFORMTHEME,qt5ct - exec-once=regreet --style /home/${username}/.config/gtk-3.0/gtk.css; hyprctl dispatch exit + exec-once=regreet --style /home/${username}/.config/gtk-3.0/gtk.css --config /home/${username}/.config/regreet/regreet.toml; hyprctl dispatch exit ''; # unlock GPG keyring on login security.pam.services.greetd.enableGnomeKeyring = true; + } // lib.optionalAttrs (options ? home) { + xdg.configFile."regreet/regreet.toml".source = (pkgs.formats.toml { }).generate "regreet" config.mods.regreet.customSettings; } ); }