Disable openclaw module
This commit is contained in:
parent
3b750b8010
commit
6987ad3f49
4 changed files with 76 additions and 43 deletions
19
flake.nix
19
flake.nix
|
|
@ -15,6 +15,7 @@
|
|||
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, agenix, nix-openclaw, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
enableOpenClaw = false;
|
||||
in {
|
||||
nixosConfigurations.Nixos = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
|
@ -26,6 +27,12 @@
|
|||
nixpkgs.overlays = [
|
||||
nix-openclaw.overlays.default
|
||||
(final: prev: {
|
||||
openclaw = prev.openclaw.overrideAttrs (_: {
|
||||
OPENCLAW_DISABLE_BUNDLED_PLUGIN_POSTINSTALL = "1";
|
||||
});
|
||||
"openclaw-gateway" = prev."openclaw-gateway".overrideAttrs (_: {
|
||||
OPENCLAW_DISABLE_BUNDLED_PLUGIN_POSTINSTALL = "1";
|
||||
});
|
||||
unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config = prev.config;
|
||||
|
|
@ -39,10 +46,14 @@
|
|||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "hm-bak";
|
||||
home-manager.users.ltadeu6 = {
|
||||
imports = [
|
||||
nix-openclaw.homeManagerModules.openclaw
|
||||
./home/ltadeu6.nix
|
||||
];
|
||||
imports =
|
||||
[
|
||||
./home/ltadeu6.nix
|
||||
]
|
||||
++ nixpkgs.lib.optionals enableOpenClaw [
|
||||
nix-openclaw.homeManagerModules.openclaw
|
||||
./home/openclaw.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -361,36 +361,6 @@
|
|||
".config/wofi/menu.css".source = ../configs/wofi/menu.css;
|
||||
};
|
||||
|
||||
programs.openclaw = {
|
||||
enable = true;
|
||||
documents = ../openclaw/documents;
|
||||
instances.default = {
|
||||
enable = true;
|
||||
config = {
|
||||
gateway.mode = "local";
|
||||
gateway.auth.mode = "token";
|
||||
gateway.auth.token = {
|
||||
source = "env";
|
||||
provider = "default";
|
||||
id = "OPENCLAW_GATEWAY_TOKEN";
|
||||
};
|
||||
gateway.remote.token = {
|
||||
source = "env";
|
||||
provider = "default";
|
||||
id = "OPENCLAW_GATEWAY_TOKEN";
|
||||
};
|
||||
|
||||
agents.defaults.model.primary = "ollama/gemma4:e4b";
|
||||
models.providers.ollama = {
|
||||
baseUrl = "http://127.0.0.1:11434";
|
||||
api = "ollama";
|
||||
apiKey = "ollama-local";
|
||||
models = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.activation.openclawGatewayEnv = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
set -euo pipefail
|
||||
token_file="/run/agenix/openclaw_gateway_token"
|
||||
|
|
@ -411,13 +381,5 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.user.services.openclaw-gateway = {
|
||||
Service.EnvironmentFile =
|
||||
"${config.home.homeDirectory}/.config/openclaw/gateway.env";
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
home.file.".openclaw/openclaw.json".force = true;
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
|
|
|||
33
home/openclaw.nix
Normal file
33
home/openclaw.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.openclaw = {
|
||||
enable = true;
|
||||
documents = ../openclaw/documents;
|
||||
instances.default = {
|
||||
enable = true;
|
||||
config = {
|
||||
gateway.mode = "local";
|
||||
gateway.auth.mode = "token";
|
||||
gateway.auth.token = {
|
||||
source = "env";
|
||||
provider = "default";
|
||||
id = "OPENCLAW_GATEWAY_TOKEN";
|
||||
};
|
||||
gateway.remote.token = {
|
||||
source = "env";
|
||||
provider = "default";
|
||||
id = "OPENCLAW_GATEWAY_TOKEN";
|
||||
};
|
||||
|
||||
agents.defaults.model.primary = "ollama/gemma4:e4b";
|
||||
models.providers.ollama = {
|
||||
baseUrl = "http://127.0.0.1:11434";
|
||||
api = "ollama";
|
||||
apiKey = "ollama-local";
|
||||
models = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -479,11 +479,11 @@
|
|||
|
||||
systemd.services."nix-flake-update" = {
|
||||
description = "Update flake.lock and commit";
|
||||
path = [ pkgs.git pkgs.nix pkgs.coreutils ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "ltadeu6";
|
||||
WorkingDirectory = "/home/ltadeu6/nixos-config";
|
||||
Path = [ pkgs.git pkgs.nix pkgs.coreutils ];
|
||||
Environment = [
|
||||
"GIT_AUTHOR_NAME=auto-upgrade"
|
||||
"GIT_AUTHOR_EMAIL=auto-upgrade@localhost"
|
||||
|
|
@ -494,7 +494,34 @@
|
|||
script = ''
|
||||
set -euo pipefail
|
||||
export PATH="${pkgs.git}/bin:${pkgs.nix}/bin:/run/current-system/sw/bin"
|
||||
|
||||
repo_status="$(git status --porcelain=v1 --untracked-files=normal)"
|
||||
relevant_status="$(printf '%s\n' "$repo_status" | ${pkgs.gnugrep}/bin/grep -vE '^[ MARCUD?!]{2} flake\.lock$' || true)"
|
||||
if [ -n "$relevant_status" ]; then
|
||||
echo "Skipping flake update: repository has local changes"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
backup=""
|
||||
cleanup() {
|
||||
if [ -n "$backup" ] && [ -f "$backup" ] && [ ! -f flake.lock ]; then
|
||||
mv "$backup" flake.lock
|
||||
fi
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
if [ -f flake.lock ] && [ ! -w flake.lock ]; then
|
||||
backup="$(mktemp)"
|
||||
cp flake.lock "$backup"
|
||||
rm -f flake.lock
|
||||
fi
|
||||
|
||||
/run/current-system/sw/bin/nix flake update --commit-lock-file
|
||||
|
||||
if [ -n "$backup" ] && [ -f "$backup" ]; then
|
||||
rm -f "$backup"
|
||||
fi
|
||||
trap - EXIT
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue