hyprland: split off gnome-keyring to its own module
This commit is contained in:
parent
8af4513dcf
commit
71732127de
|
@ -22,6 +22,7 @@ in
|
|||
./swayosd.nix
|
||||
./sway-notification-center.nix
|
||||
./ntfy-sh.nix
|
||||
./gnome-keyring.nix
|
||||
];
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
|
|
27
home/modules/hyprland/gnome-keyring.nix
Normal file
27
home/modules/hyprland/gnome-keyring.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
cfg = config.profile.hyprland;
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.meta) getExe;
|
||||
secretKey = "gnome-keyring/${config.home.username}";
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
gnome.gnome-keyring
|
||||
];
|
||||
|
||||
sops.secrets.${secretKey} = { };
|
||||
wayland.windowManager.hyprland.settings.exec-once =
|
||||
let
|
||||
scriptFile = getExe (pkgs.writeShellScriptBin "gnome-keyring.sh" /*sh*/ ''
|
||||
cat "${config.sops.secrets.${secretKey}.path}" | gnome-keyring-daemon --unlock
|
||||
gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
|
||||
'');
|
||||
in
|
||||
[
|
||||
''${scriptFile}''
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, inputs, pkgs, config, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
cfg = config.profile.hyprland;
|
||||
select-window = rec {
|
||||
|
@ -11,11 +11,6 @@ let
|
|||
script = pkgs.writeScriptBin filename (builtins.readFile (./scripts/init-wallpaper.sh));
|
||||
path = "${script}/bin/${filename}";
|
||||
};
|
||||
gnome-keyring = rec {
|
||||
filename = "gnome-keyring.sh";
|
||||
script = pkgs.writeScriptBin filename (builtins.readFile (./scripts/gnome-keyring.sh));
|
||||
path = "${script}/bin/${filename}";
|
||||
};
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -211,7 +206,6 @@ in
|
|||
};
|
||||
extraConfig = /*hyprlang*/ ''
|
||||
exec-once=dbus-update-activation-environment --all
|
||||
exec-once=${gnome-keyring.path} ${config.sops.secrets."gnome-keyring/${config.home.username}".path}
|
||||
exec-once=foot --server
|
||||
|
||||
exec-once=${init-wallpaper.path} ${./wallpaper.jpeg}
|
||||
|
|
Loading…
Reference in a new issue