diff --git a/modules/apps/default.nix b/modules/apps/default.nix index 525ad6e..91b9623 100644 --- a/modules/apps/default.nix +++ b/modules/apps/default.nix @@ -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 diff --git a/modules/apps/element.nix b/modules/apps/element.nix deleted file mode 100644 index e69de29..0000000 diff --git a/modules/apps/keepassxc.nix b/modules/apps/keepassxc.nix new file mode 100644 index 0000000..2078f7b --- /dev/null +++ b/modules/apps/keepassxc.nix @@ -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"; + }; + }; + }; +} diff --git a/modules/apps/yazi.nix b/modules/apps/yazi.nix new file mode 100644 index 0000000..bdbd21c --- /dev/null +++ b/modules/apps/yazi.nix @@ -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 = [ "" ]; 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 = [ "" ]; description = "Restore previously closed tab"; run = "plugin close-and-restore-tab restore";} + ]; + }; + }; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 9af86ed..9d21971 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -78,7 +78,6 @@ environment.pathsToLink = [ "/share/xdg-desktop-portal" "/share/applications" ]; home-manager.users.djai = { xdg = { - autostart.enable = true; mimeApps = { enable = true; defaultApplications = { diff --git a/modules/desktop/hypr-rules.nix b/modules/desktop/hypr-rules.nix index d6236a6..35f0d5e 100644 --- a/modules/desktop/hypr-rules.nix +++ b/modules/desktop/hypr-rules.nix @@ -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";} diff --git a/modules/desktop/hypr.nix b/modules/desktop/hypr.nix index 434cf7c..47b1a62 100644 --- a/modules/desktop/hypr.nix +++ b/modules/desktop/hypr.nix @@ -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 ]) ]; diff --git a/modules/dev/uv.nix b/modules/dev/uv.nix index fba7dab..5ae9f08 100644 --- a/modules/dev/uv.nix +++ b/modules/dev/uv.nix @@ -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" ]; }; diff --git a/secrets/default.nix b/secrets/default.nix index 4fd9474..682ddc1 100644 --- a/secrets/default.nix +++ b/secrets/default.nix @@ -23,6 +23,10 @@ in sopsFile = ./ssh-config.bin; }; + "keepass-keyfile" = djaiOnly // { + sopsFile = ./keepass-keyfile.bin; + }; + # wireguard tunnels "wg-config-nixbook" = djaiOnly // { sopsFile = ./wg-config-nixbook.bin; diff --git a/secrets/keepass-keyfile.bin b/secrets/keepass-keyfile.bin new file mode 100644 index 0000000..7701b13 --- /dev/null +++ b/secrets/keepass-keyfile.bin @@ -0,0 +1,18 @@ +{ + "data": "ENC[AES256_GCM,data:jnUF2ZKMlkjhIfKV15WH332fe+b8I2jUl+UQzexDfH78cOU7c4w4TL81KE3lwP04Y+FRqrdSfekYcRMF7gX2QU3dEMRwNgI8Y4+DVYVhfw6TkAx5CfmPYZKS7HgEec9OVs7VlOU+Yzhm5eC4e8uQvpWWBQa9MxOR1/31kHGiaJU=,iv:eutrFrfrk97y8X2GJcwqlImIFe9MxMptnKGkCDcgPNw=,tag:VpoEDxus/DhybqrTKAUb4Q==,type:str]", + "sops": { + "age": [ + { + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAvcUNOY2lhS2xuektKT2dS\nNitPUTd1RHJxT0JSVytLeHRSK2RLdGpFMURFCkhDYTUyNmllMktLOG5PbUhhY1Rq\nL1pGdnNscmRvTVI4SWZtOVJQMm9yTVEKLS0tIG1yRDFIanFsK1Y4aHJLMWw1VlpT\nc0psaUJoc0tOZUxLMzUrWXYyM1R2L1UKByYFtkHwKmVUV3VBreKagxXEZMHoiEFp\nT2k2MMofmC8W9H+35qwMCwV8zHevFNzD4xd9toFcARcgoM9Bionb1A==\n-----END AGE ENCRYPTED FILE-----\n", + "recipient": "age1x7rkj5gpqe9rgp6wjs24r68u5vlg0628qafvdvwczm2gy27uup0q66vkv5" + }, + { + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBZllCRFNFeGdMV1FZM0NU\nbVhndFdkUHpBOVBJZmVDWk92Wm9Ca0NoK0JBCmx6ejdYdmV4N0RTOXlqRDFHWDFl\ncW1hWHV0WDFqb3U3Y3BKU3Nza1pDMW8KLS0tIGpRODBmanF5Z3VGN2pMR1JsZm9u\nMytZdkowbjVhdG5MSnZpbVUvMEZQQXMK33kT0L3IlhL7NjBe2JXyuJEndKHpyt8v\n5ZOGGpruWJhN0Q9Y+YSvfmivUhgN8Y2Bzj64V9FNpMZlRFW6jB37SA==\n-----END AGE ENCRYPTED FILE-----\n", + "recipient": "age1euc2azezqqashys9ejvqp0hs890sc3nugf9t749zmadkq9r4te2sqzlgtt" + } + ], + "lastmodified": "2026-10-09T12:04:48Z", + "mac": "ENC[AES256_GCM,data:yhZMiUm4q0Ua/6LFjH9o1PX2vTcMqd7CfSHDVh22cXfUeoinkrOrE3jN807//vGGwN8h/R7UCwpvOa98iSI6CWaDSDOYsQGivU3FY023y2HAfSg8cQkhfa8VJ5auuNaDTizF2ilFvxecDgJmUMarq8K7tcDdx+wdcM+ZEafTCks=,iv:QQ8UFLKm9LqsSmFxYirm+U971CvcCM8B4bqq4FQNs4o=,tag:f3wushDhfU4EK5q/uQHPSQ==,type:str]", + "version": "3.13.3" + } +}