ft: keepassxc as secret-service

ft: keepassxc as secret-service

ft: keepassxc as secret-service
This commit is contained in:
2026-10-09 13:19:55 +02:00
parent 7e63cc79ce
commit d690d2b32c
10 changed files with 118 additions and 7 deletions

View File

@@ -6,6 +6,8 @@
./feh.nix
./freetube.nix
./mpv.nix
./yazi.nix
./keepassxc.nix
./starship.nix
./tealdeer.nix
./vesktop.nix
@@ -33,13 +35,10 @@
};
services = {
flameshot.enable = true;
pass-secret-service.enable = true; # TODO: test if works/howto setup with autodecrypt
};
};
users.users.djai.packages = with pkgs; [
yazi # TODO home manager program
# chat
signal-desktop

View File

@@ -0,0 +1,19 @@
{ ... }:
{
home-manager.users.djai.programs.keepassxc = {
enable = true;
settings = {
General.ConfigVersion = 2;
FdoSecrets = {
Enabled = true;
ConfirmAccessItem = false;
};
GUI = {
HideMenuBar = true;
HideToolbar = true;
ApplicationTheme = "dark";
};
};
};
}

70
modules/apps/yazi.nix Normal file
View File

@@ -0,0 +1,70 @@
{ lib, pkgs, ... }:
let
make_plugin = names: lib.listToAttrs (map (name: {
name = name;
value = {
package = pkgs.yaziPlugins.${name};
setup = true;
};
}) names);
in
{
home-manager.users.djai.programs.yazi = {
enable = true;
enableFishIntegration = true;
plugins = with pkgs.yaziPlugins; {
duckdb = duckdb;
compress = compress;
bookmarks = bookmarks;
clipboard = clipboard;
ouch = ouch;
rich-preview = rich-preview;
jump-to-char = jump-to-char;
yafg = {
package = yafg;
setup = true;
settings = {
toggle-mode-key = "alt-t";
editor = "nvim";
args = [ "--noplugin" ];
file-arg-format = "+{row} {file}";
};
};
relative-motions = relative-motions;
} // make_plugin ["starship" "close-and-restore-tab" "full-border"] ;
# FIXME: lots of these are wonky
keymap = {
mgr.prepend_keymap = [
{on = [ "F" "G" ]; description = "use fmf"; run = "plugin yafg";}
{on = [ "f" ]; description = "Jump to char"; run = "plugin jump-to-char";}
{on = [ "y" ]; description = "Yank selected files (copy)"; run = [ "yank" "plugin clipboard -- --action=copy" ];}
{on = [ "x" ]; description = "Yank selected files (cut)"; run = [ "yank --cut" "plugin clipboard -- --action=copy" ];}
{on = [ "<C-p>" ]; description = "Paste yanked clipboard files"; run = "plugin clipboard -- --action=paste";}
{on = [ "m" ]; description = "Save current position as bookmark "; run = "plugin bookmarks save";}
{on = [ "'" ]; description = "Jump to bookmark "; run = "plugin bookmarks jump";}
{on = [ "b" "d" ]; description = "Delete bookmark"; run = "plugin bookmarks delete";}
{on = [ "B" "D" ]; description = "Delete all bookmarks"; run = "plugin bookmarks delete_all";}
{on = [ "c" "a" "a" ]; description = "Archive selected files"; run = "plugin compress";}
{on = [ "c" "a" "p" ]; description = "Archive selected files (encrypted)"; run = "plugin compress -p";}
{on = [ "1" ]; run = "plugin relative-motions 1";}
{on = [ "2" ]; run = "plugin relative-motions 2";}
{on = [ "3" ]; run = "plugin relative-motions 3";}
{on = [ "4" ]; run = "plugin relative-motions 4";}
{on = [ "5" ]; run = "plugin relative-motions 5";}
{on = [ "6" ]; run = "plugin relative-motions 6";}
{on = [ "7" ]; run = "plugin relative-motions 7";}
{on = [ "8" ]; run = "plugin relative-motions 8";}
{on = [ "9" ]; run = "plugin relative-motions 9";}
{on = [ "<C-t>" ]; description = "Restore previously closed tab"; run = "plugin close-and-restore-tab restore";}
];
};
};
}

View File

@@ -78,7 +78,6 @@
environment.pathsToLink = [ "/share/xdg-desktop-portal" "/share/applications" ];
home-manager.users.djai = {
xdg = {
autostart.enable = true;
mimeApps = {
enable = true;
defaultApplications = {

View File

@@ -59,6 +59,7 @@
{ match.class = "krita"; workspace = "7 silent";}
{ match.class = "com.github.aaronerhardt.Tailor"; workspace = "10 silent";}
{ match.class = "desktop.opencloud.eu."; workspace = "10 silent";}
{ match.class = "org.keepassxc.KeePassXC"; workspace = "10 silent";}
# shadowdim
{ match.title = ".*shadowDim.*"; workspace = "999 silent";}

View File

@@ -61,8 +61,9 @@ in
(hyprLib.on-signal "hyprland.start" [
''uwsm app -- env QT_STYLE_OVERRIDE= opencloud''
"uwsm app -- kitty --class scratchme -d /home/djai/Documents/diary"
"uwsm app -- nohup flameshot"
"hyprctl setcursor Catppuccin-Macchiato-Dark-Cursors 24" # really shouldnt be in here but we get veyr large cursors if we dont
"uwsm app -s b -- nohup flameshot"
"uwsm app -- keepassxc --keyfile ${config.sops.secrets."keepass-keyfile".path} $HOME/Documents/databases/secret.kdbx" # TODO: init secret.kdbx if does not exist
"hyprctl setcursor Catppuccin-Macchiato-Dark-Cursors 24" # really shouldnt be in here but we get very large cursors if we dont
])
];

View File

@@ -4,7 +4,7 @@
home-manager.users.djai.programs.uv = {
enable = true;
tool.packages = [ # NOTE: these are pinned now so keep that in mind
"ruff==v0.16" # FIXME: check these work now
"ruff==v0.16"
"ipython==v9.17"
];
};