mirror of
https://github.com/thegeneralist01/config.git
synced 2026-10-09 12:55:25 +02:00
aerospace: assign apps to workspaces on-window-detected
This commit is contained in:
parent
691dfad298
commit
ff7e33c0af
23 changed files with 572 additions and 4 deletions
40
modules/common/omp.nix
Normal file
40
modules/common/omp.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
filterAttrs
|
||||
mapAttrs'
|
||||
nameValuePair
|
||||
;
|
||||
|
||||
ompDotfiles = ../dotfiles/omp;
|
||||
|
||||
# Only manage named files (force=true). Does NOT take over the whole agents/
|
||||
# directory, so stock `omp agents unpack` files can coexist.
|
||||
filesFromDir =
|
||||
relDir: targetPrefix:
|
||||
let
|
||||
dir = ompDotfiles + "/${relDir}";
|
||||
entries = filterAttrs (_: type: type == "regular") (builtins.readDir dir);
|
||||
in
|
||||
mapAttrs' (
|
||||
name: _:
|
||||
nameValuePair "${targetPrefix}/${name}" {
|
||||
source = dir + "/${name}";
|
||||
force = true;
|
||||
}
|
||||
) entries;
|
||||
in
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.file = {
|
||||
".omp/agent/AGENTS.md" = {
|
||||
source = ompDotfiles + "/AGENTS.md";
|
||||
force = true;
|
||||
};
|
||||
}
|
||||
// filesFromDir "agents" ".omp/agent/agents"
|
||||
// filesFromDir "prompts" ".omp/agent/prompts";
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue