mwahahahaha, have the orome config building! on to manwe

This commit is contained in:
Chris Kruining 2025-03-18 21:06:40 +01:00
parent 3a2f52f45e
commit af58cfb4ab
30 changed files with 259 additions and 199 deletions

View file

@ -1,4 +1,4 @@
{ config, options, lib, pkgs, ... }:
{ config, options, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) optionalAttrs;
inherit (lib.modules) mkIf;
@ -10,7 +10,7 @@ in
config = mkIf config.modules.${user}.shell.toolset.fzf.enable {
home-manager.users.${user}.programs.fzf = let
defShell = config.modules.shell.default;
defShell = config.modules.${user}.shell.default;
in {
enable = true;
enableBashIntegration = true;

View file

@ -14,7 +14,7 @@ in
inherit (pkgs) act dura lazygit;
inherit (pkgs.gitAndTools) gh git-open;
}
// optionalAttrs config.modules.shell.toolset.gnupg.enable {
// optionalAttrs config.modules.${user}.shell.toolset.gnupg.enable {
inherit (pkgs.gitAndTools) git-crypt;
});

View file

@ -1,4 +1,4 @@
{ config, options, lib, pkgs, ... }:
{ config, options, lib, pkgs, user, ... }:
let
inherit (builtins) getEnv;
inherit (lib.modules) mkIf;
@ -8,23 +8,31 @@ in
{
options.modules.${user}.shell.toolset.gnupg = let
inherit (lib.options) mkEnableOption;
in { enable = mkEnableOption "cryptographic suite"; };
in {
enable = mkEnableOption "cryptographic suite";
};
config = mkIf cfg.enable {
user.package = with pkgs; [ gnupg ];
config = mkIf config.modules.shell.toolset.gnupg.enable {
environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
home-manager.users.${user}.programs.gnupg.agent = {
home-manager.users.${user}.programs.gnupg = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gnome3;
settings = let
cacheTTL = 86400;
in {
default-cache-ttl = cacheTTL;
default-cache-ttl-ssh = cacheTTL;
max-cache-ttl = cacheTTL;
max-cache-ttl-ssh = cacheTTL;
agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gnome3;
settings = let
cacheTTL = 86400;
in {
default-cache-ttl = cacheTTL;
default-cache-ttl-ssh = cacheTTL;
max-cache-ttl = cacheTTL;
max-cache-ttl-ssh = cacheTTL;
};
};
};
};