mirror of
https://github.com/itme-brain/nixos.git
synced 2026-05-08 06:50:11 -04:00
Compare commits
4 commits
9f4e6c6a65
...
42c9fbc6e1
| Author | SHA1 | Date | |
|---|---|---|---|
| 42c9fbc6e1 | |||
| a184bd35ee | |||
| 9aa7b21828 | |||
| 1ca2e5a512 |
10 changed files with 77 additions and 2 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -14,3 +14,6 @@
|
|||
path = user/modules/bash/bash
|
||||
url = https://github.com/itme-brain/bash.git
|
||||
branch = master
|
||||
[submodule "user/modules/pi/agent"]
|
||||
path = user/modules/pi/agent
|
||||
url = git@github.com:itme-brain/pi.git
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
../../keys
|
||||
../../modules/sops
|
||||
../../modules/docker
|
||||
../../modules/nix-ld
|
||||
./hardware.nix
|
||||
./system.nix
|
||||
];
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@
|
|||
writing.enable = true;
|
||||
};
|
||||
|
||||
pi.enable = true;
|
||||
|
||||
gui = {
|
||||
wm.hyprland.enable = true;
|
||||
browser.firefox.enable = true;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
../../../user
|
||||
../../keys
|
||||
../../modules/sops
|
||||
../../modules/nix-ld
|
||||
./hardware.nix
|
||||
./system.nix
|
||||
];
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
../../../user
|
||||
../../keys
|
||||
../../modules/sops
|
||||
../../modules/nix-ld
|
||||
./system.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
39
system/modules/nix-ld/default.nix
Normal file
39
system/modules/nix-ld/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.nix-ld;
|
||||
|
||||
in
|
||||
{
|
||||
options.modules.system.nix-ld = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = any
|
||||
(user: user.modules.user.neovim.enable or false)
|
||||
(attrValues config.home-manager.users);
|
||||
description = "Enable nix-ld so Mason-installed Neovim tools can run on NixOS.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
curl
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
glib
|
||||
icu
|
||||
libgcc
|
||||
libGL
|
||||
libxkbcommon
|
||||
openssl
|
||||
stdenv.cc.cc
|
||||
zlib
|
||||
zstd
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit da6106c77470b336783951ff2bce795688e9663d
|
||||
Subproject commit f11e6a02db5cd8e4c8c1bdec0d34557ff995c32c
|
||||
1
user/modules/pi/agent
Submodule
1
user/modules/pi/agent
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4f129c83b945e8847df798f83a29e554570c6142
|
||||
28
user/modules/pi/default.nix
Normal file
28
user/modules/pi/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.pi;
|
||||
npmGlobal = "${config.home.homeDirectory}/.npm-global";
|
||||
in
|
||||
{ options.modules.user.pi = { enable = mkEnableOption "user.pi"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ nodejs_20 ];
|
||||
|
||||
home.sessionVariables = {
|
||||
LLAMACPP_BASE_URL = "https://ai.ramos.codes/v1";
|
||||
NPM_CONFIG_PREFIX = npmGlobal;
|
||||
};
|
||||
|
||||
home.sessionPath = [ "${npmGlobal}/bin" ];
|
||||
|
||||
home.file.".pi/agent" = {
|
||||
source = ./agent;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
programs.bash.initExtra = ''
|
||||
export LLAMACPP_API_KEY=$(cat /run/secrets/LLAMA_API_KEY)
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -9,7 +9,6 @@ in
|
|||
home.packages = with pkgs; [
|
||||
unstable.claude-code
|
||||
unstable.codex
|
||||
unstable.opencode
|
||||
|
||||
bubblewrap
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue