From 4477a98282cdd5c1e6b7433a4dd8b151e21ee48d Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Mon, 24 Nov 2025 22:12:05 -0800 Subject: [PATCH] feat: meep --- home/environments/niri/anyrun.nix | 42 ++++++++++++++ home/environments/niri/fzfdapter.nix | 83 ++++++++++++++++++---------- home/profiles/nixvim/nixvim.nix | 3 + nixos/profiles/gaming/wine.nix | 14 +++++ nixos/servers/mail/mail.nix | 2 + 5 files changed, 114 insertions(+), 30 deletions(-) create mode 100644 home/environments/niri/anyrun.nix create mode 100644 nixos/servers/mail/mail.nix diff --git a/home/environments/niri/anyrun.nix b/home/environments/niri/anyrun.nix new file mode 100644 index 00000000..95769cd0 --- /dev/null +++ b/home/environments/niri/anyrun.nix @@ -0,0 +1,42 @@ +{ + config, + lib, + ... +}: let + cfg = config.programs.anyrun; + inherit (lib.meta) getExe; +in { + programs.niri.settings.binds = { + "Mod+D".action = let + sh = config.lib.niri.actions.spawn "sh" "-c"; + in + sh (getExe cfg.package); + }; + programs.anyrun = { + enable = true; + config = { + x = {fraction = 0.5;}; + y = {fraction = 0.3;}; + width = {fraction = 0.3;}; + hideIcons = false; + ignoreExclusiveZones = false; + layer = "overlay"; + hidePluginInfo = false; + closeOnClick = false; + showResultsImmediately = true; + maxEntries = null; + plugins = let + pluginNames = [ + "applications" + "symbols" + "niri_focus" + "dictionary" + "rink" + "nix_run" + ]; + pluginLibs = map (p: "${cfg.package}/lib/lib${p}.so") pluginNames; + in + pluginLibs; + }; + }; +} diff --git a/home/environments/niri/fzfdapter.nix b/home/environments/niri/fzfdapter.nix index 166327c2..a4953c7f 100644 --- a/home/environments/niri/fzfdapter.nix +++ b/home/environments/niri/fzfdapter.nix @@ -5,6 +5,9 @@ inputs, ... }: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.types) attrs package; + inherit (lib.modules) mkIf mkMerge; inherit (lib.meta) getExe getExe'; inherit (inputs.fzfdapter.packages.${pkgs.system}) fzfdapter; terminal_exec = args: "${getExe pkgs.alacritty}${ @@ -12,39 +15,59 @@ then " ${args} " else " " }-e"; + cfg = config.programs.fzfdapter; in { - home.packages = [ - fzfdapter - pkgs.skim - ]; - - xdg.configFile."fzfdapter/config.toml".source = (pkgs.formats.toml {}).generate "fzfdapter-config" { - terminal_exec = terminal_exec ""; - fuzzy_exec = "${getExe' pkgs.skim "sk"} --layout=reverse-list"; - }; - - # TODO: `niri msg focused-output` to handle resolution(s) - programs.niri.settings = let - sh = config.lib.niri.actions.spawn "sh" "-c"; - in { - binds = { - "Mod+D".action = sh "${terminal_exec "-T fzfdapter --option 'font.size=18' --class fzfdapter"} ${getExe fzfdapter} --mode all"; + options.programs.fzfdapter = { + enable = mkEnableOption "Enable fzfdapter"; + settings = mkOption { + type = attrs; }; - window-rules = [ - { - matches = [ + package = mkOption { + type = package; + default = fzfdapter; + }; + }; + config = mkMerge [ + (mkIf cfg.enable { + home.packages = [ + cfg.package + ]; + xdg.configFile."fzfdapter/config.toml".source = (pkgs.formats.toml {}).generate "fzfdapter-config" cfg.settings; + }) + { + home.packages = [ + pkgs.skim + ]; + programs.fzfdapter = { + enable = false; + settings = { + terminal_exec = terminal_exec ""; + fuzzy_exec = "${getExe' pkgs.skim "sk"} --layout=reverse-list"; + }; + }; + + # TODO: `niri msg focused-output` to handle resolution(s) + programs.niri.settings = { + binds = { + #"Mod+D".action = sh "${terminal_exec "-T fzfdapter --option 'font.size=18' --class fzfdapter"} ${getExe fzfdapter} --mode all"; + }; + window-rules = [ { - app-id = "^fzfdapter$"; - title = "fzfdapter"; + matches = [ + { + app-id = "^fzfdapter$"; + title = "fzfdapter"; + } + ]; + max-height = 1000; + max-width = 750; + min-height = 1000; + min-width = 750; + open-focused = true; + open-floating = true; } ]; - max-height = 1000; - max-width = 750; - min-height = 1000; - min-width = 750; - open-focused = true; - open-floating = true; - } - ]; - }; + }; + } + ]; } diff --git a/home/profiles/nixvim/nixvim.nix b/home/profiles/nixvim/nixvim.nix index d5996222..f08bada4 100644 --- a/home/profiles/nixvim/nixvim.nix +++ b/home/profiles/nixvim/nixvim.nix @@ -9,6 +9,7 @@ in { programs.nixvim = { enable = true; + defaultEditor = true; imports = [ tree.home.profiles.nixvim.plugins ]; @@ -87,6 +88,8 @@ in { (genAttrs pluginsToGen (_: basePlugin)) { auto-session.settings = { + auto_save = true; + auto_create = true; bypass_save_filetypes = ["startup"]; close_filetypes_on_save = ["startup"]; }; diff --git a/nixos/profiles/gaming/wine.nix b/nixos/profiles/gaming/wine.nix index 161b0282..8437e566 100644 --- a/nixos/profiles/gaming/wine.nix +++ b/nixos/profiles/gaming/wine.nix @@ -155,6 +155,20 @@ in { vnExe = "./HANA9.exe"; }; + # + # VRChat utilities + # + + vrosc = mkMerge [ + protonCommon + rec { + long_name = "VR OSC"; + prefixFolder = gameStorage + "/Steam Library/steamapps/compatdata/438100"; + gameFolder = gameStorage + "/Steam Library/steamapps/common/VRChat"; + gameExecutable = gameFolder + "/VROSCSetup.exe"; + } + ]; + # # Guild Warses # diff --git a/nixos/servers/mail/mail.nix b/nixos/servers/mail/mail.nix new file mode 100644 index 00000000..87a13d7f --- /dev/null +++ b/nixos/servers/mail/mail.nix @@ -0,0 +1,2 @@ +_: { +}