feat: apps options

This commit is contained in:
punkfairie 2025-05-25 20:28:54 -07:00
parent 783502952c
commit 8c014a0a97
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
3 changed files with 24 additions and 27 deletions

View file

@ -2,6 +2,7 @@
imports = [
../options
./option-inheritance.nix
./options
./home-manager.nix
./profile.nix

View file

@ -2,14 +2,9 @@
lib,
config,
pkgs,
system,
...
}: let
inherit (lib.snowfall.system) is-linux;
cfg = config.marleyos.apps;
in {
options.marleyos.apps = {
}: {
options.marleycfg.apps = {
pinentry = lib.mkOption {
type = lib.types.package;
default = pkgs.pinentry-gtk2;
@ -46,7 +41,7 @@ in {
};
};
default = default;
inherit default;
};
terminal = lib.mkOption {
@ -77,15 +72,10 @@ in {
options = {
package = lib.mkOption {
type = lib.types.package;
default =
if config.marleyos.wayland.hyprland.enable
then config.programs.wofi.package
else config.programs.rofi.package;
description = "The launcher to use.";
};
command = lib.mkOption {
type = lib.types.str;
default = "--show drun";
description = ''
The command appended after the launcher binary to run it.
'';
@ -95,18 +85,19 @@ in {
};
};
config = lib.mkIf (is-linux system) {
home.packages = [
cfg.pinentry
cfg.clipboard.package
];
programs.rbw = lib.mkDefault {
settings.pinentry = cfg.pinentry;
};
services.gpg-agent = lib.mkDefault {
pinentryPackage = cfg.pinentry;
};
};
# config = lib.mkIf pkgs.stdenv.isLinux {
# home.packages = [
# cfg.pinentry
# cfg.clipboard.package
# ];
#
# # TODO: move these to respective modules
# programs.rbw = lib.mkDefault {
# settings.pinentry = cfg.pinentry;
# };
#
# services.gpg-agent = lib.mkDefault {
# pinentryPackage = cfg.pinentry;
# };
# };
}

View file

@ -0,0 +1,5 @@
{
imports = [
./apps.nix
];
}