feat: direnv and lorri support
This commit is contained in:
parent
ecef58f465
commit
9a845636d0
@ -44,6 +44,7 @@ in
|
||||
# };
|
||||
#};
|
||||
|
||||
services.my-lorri.enable = true;
|
||||
services.durnitisp.enable = true;
|
||||
services.node-exporter.enable = true;
|
||||
services.prometheus.enable = true;
|
||||
|
6
nix/base-system/flake.lock
generated
6
nix/base-system/flake.lock
generated
@ -1116,11 +1116,11 @@
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1720058333,
|
||||
"narHash": "sha256-gM2RCi5XkxmcsZ44pUkKIYBiBMfZ6u7MdcZcykmccrs=",
|
||||
"lastModified": 1728279793,
|
||||
"narHash": "sha256-W3D5YpNrUVTFPVU4jiEiboaaUDShaiH5fRl9aJLqUnU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6842b061970bf96965d66fcc86a28e1f719aae95",
|
||||
"rev": "f85a2d005e83542784a755ca8da112f4f65c4aa4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -86,6 +86,7 @@
|
||||
nil-pkg = nil-flake.packages."${system}".default;
|
||||
in
|
||||
{ config, pkgs, ...}: let
|
||||
unstablePkgs = import unstable { inherit system; };
|
||||
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
|
||||
inherit (pkgs.vimUtils) buildVimPlugin;
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
@ -133,6 +134,7 @@
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
custom-neovim = nvim;
|
||||
lorri = unstablePkgs.lorri;
|
||||
})
|
||||
];
|
||||
programs = with pkgs; {
|
||||
@ -223,6 +225,9 @@ EOF";
|
||||
lua-language-server
|
||||
rust-analyzer
|
||||
dasht
|
||||
direnv
|
||||
lorri
|
||||
devenv
|
||||
]);
|
||||
};
|
||||
};
|
||||
@ -374,6 +379,7 @@ EOF";
|
||||
./modules/darwin-monitor.nix
|
||||
./modules/victoria-logs.nix
|
||||
./modules/vector.nix
|
||||
./modules/lorri.nix
|
||||
./darwin-configuration.nix
|
||||
];
|
||||
};
|
||||
|
26
nix/base-system/modules/lorri.nix
Normal file
26
nix/base-system/modules/lorri.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{pkgs, lib, config, ...}:
|
||||
with lib;
|
||||
let
|
||||
mkLauncher = import ../../packages/darwin-launcher.nix { inherit pkgs; };
|
||||
lorriLauncher = mkLauncher ''
|
||||
source ${config.system.build.setEnvironment}
|
||||
exec ${pkgs.lorri}/bin/lorri daemon
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.services.my-lorri = {
|
||||
enable = mkEnableOption "Enable the lorri agent";
|
||||
};
|
||||
|
||||
config = {
|
||||
launchd.user.agents.lorri = mkIf config.services.my-lorri.enable {
|
||||
serviceConfig = {
|
||||
ProgramArguments = [
|
||||
"${lorriLauncher}"
|
||||
];
|
||||
RunAtLoad = true;
|
||||
KeepAlive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -41,3 +41,5 @@ function disk_usage() {
|
||||
local path=${1:-.}
|
||||
/run/current-system/sw/bin/du --max-depth=1 -h "${path}" 2>/dev/null
|
||||
}
|
||||
|
||||
eval "$(direnv hook zsh)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user