Compare commits

..
6 Commits
10 changed files with 107 additions and 3 deletions

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@
i18n-de i18n-de
mount-duke-smb mount-duke-smb
keith-devtools keith-devtools
# (sunshine "weckyy702") (sunshine "weckyy702")
#TODO: moar aspects #TODO: moar aspects
]; ];
@@ -24,6 +24,7 @@
borgmatic borgmatic
prusa-slicer prusa-slicer
syncthing
]; ];
}; };
}; };
@@ -5,6 +5,8 @@
upower upower
libreoffice libreoffice
naps2 naps2
kanata
opencode
]; ];
home-manager.users.weckyy702 = { home-manager.users.weckyy702 = {
+1
View File
@@ -20,6 +20,7 @@
home-manager = { home-manager = {
verbose = true; verbose = true;
useGlobalPkgs = true; useGlobalPkgs = true;
backupFileExtension = "hm-bak";
}; };
}; };
} }
+59
View File
@@ -0,0 +1,59 @@
{ inputs, ... }:
let
secrets = [
"hetzner"
"gwdg"
];
mkPlaceholder = name: "__OPENCODE_PLACEHOLDER_${name}_API_KEY__";
in
{
flake.modules.nixos.opencode =
{
lib,
config,
pkgs,
...
}:
{
home-manager.sharedModules = [
inputs.self.modules.homeManager.opencode
];
age.secrets = lib.attrsets.genAttrs secrets (s: {
file = "${inputs.secrets}/opencode-${s}.age";
});
system.activationScripts = lib.attrsets.genAttrs secrets (s: ''
secret=$(cat "${config.age.secrets."${s}".path}")
configFile="/home/weckyy702/.config/opencode/opencode.json"
${pkgs.gnused}/bin/sed -i "s#${mkPlaceholder s}#$secret#" "$configFile"
'');
};
flake.modules.homeManager.opencode = { pkgs, ... }: {
programs.opencode = {
enable = true;
enableMcpIntegration = true;
web.enable = true;
extraPackages = with pkgs; [
(python314.withPackages (ps: [
ps.pdftotext
]))
];
settings = {
provider.hetzner = {
npm = "@ai-sdk/openai-compatible";
name = "Hetzner";
options.baseURL = "https://inference.hetzner.com/v1";
options.apiKey = mkPlaceholder "hetzner";
};
provider.gwdg = {
npm = "@ai-sdk/openai-compatible";
name = "GWDG";
options.baseURL = "https://saia.gwdg.de/v1";
options.apiKey = mkPlaceholder "gwdg";
};
};
};
};
}
+3 -1
View File
@@ -20,6 +20,9 @@
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
initContent = pkgs.lib.mkBefore '' initContent = pkgs.lib.mkBefore ''
date date
if [[ -e ~/todos.md ]]; then
${pkgs.glow}/bin/glow ~/todos.md
fi
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n] # Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below. # confirmations, etc.) must go above this block; everything else may go below.
@@ -44,7 +47,6 @@
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ plugins = [
"git"
]; ];
theme = "robbyrussell"; theme = "robbyrussell";
}; };
-1
View File
@@ -15,7 +15,6 @@
with self.modules.nixos; with self.modules.nixos;
with self.factory; with self.factory;
[ [
kanata
catppuccin catppuccin
(zsa-moonlander "weckyy702") (zsa-moonlander "weckyy702")
]; ];
+12
View File
@@ -0,0 +1,12 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFNjTWNPZyBXZDl3
SGFpMGtXcDJIeXVRZUNtTmMxWElldEgzR0xsMDJkNHdHOExyQVc0CmN2RENockZz
aTNIaGhrbEZoUCs0aGZ0SFRLZkpnNlByZkhUdC9RRUlhWFkKLT4gc3NoLWVkMjU1
MTkgZkJwNFR3IGtQZ3JwK2w2eHNDdmVxWWFDcVFOS3NxR0VjWnMvOGZDNnFaSWdW
ZHgwVTAKQ3I3NWpTTU1BS3NtenhlWGZycUw0UEdRV3FRcGNaSWdiclo5MmhtYTJJ
cwotPiBzc2gtZWQyNTUxOSBZazBxSWcgZmNJQmYvSTVyRXhhdngrTk5jZVZlcFl4
M0wzRTZHc2dTT1JJbEpZck8xSQpJdnRIay9lYUFVd1p5TEZpa21WS2p0dTlBd3pE
eG9yQ0pNNEN3UG9tNkdNCi0tLSByZk8xU21hNXAvcXRFa1hKam5Vd3VTaWQxNERn
Vm1NNmdiUVBwZ0p3SWV3Cl32UFuGdzpu7QkwDzBLnwojZxldrrZAIAXk9Kzq4LXJ
akzBqGy9YKHwS+CG92kinSfXMJU07i8X1WytY9pKHXUn
-----END AGE ENCRYPTED FILE-----
+12
View File
@@ -0,0 +1,12 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFNjTWNPZyBxUlJi
dFN2bzZ5aVp3b2pTSldCU0hvWnlSS0RlWVBqZVBsOGZmUTQrcVZRCldlWXlLWmpr
V0JyZjFhV0FYZEducjlwUnFZaU1nSXU0OXFHQVhhRE1CK0EKLT4gc3NoLWVkMjU1
MTkgZkJwNFR3IG9kOXVLaEdpU3UxK2VLZ3h6aGtPSnFCdFhqVVVHenhXemJEN1Vu
U0tJQUEKNnU1aFNzUFZvaGRYWTdXRlVnUmJjMG85OEZFTmZUT1lsZUZmTGV5bVZX
QQotPiBzc2gtZWQyNTUxOSBZazBxSWcgcHRWT3pZMnhYOEJidjMrSVkvUlFueDlr
UEJBcFQxRm1Id0ZKWFhyanBDSQp2cDJiSE0vM0hjLzJrK0hYb0piMGZZZGd5YnFY
bFZpUHlKTGQ3d3VEWmNFCi0tLSBFR3dQS2d1T1dKWXdxL1lnTDNoOUcvUUhJT0ps
ekFKU2l5ODJXaEdOTWJvCu4sJ2Y2MkNyCbPAQ/3Z327nO+bVk6cFye3AYZUXKpqm
qSazzcYuEbJ2n7ZFQQXDC9SylvZlXsBt3R5wePUDW+yg
-----END AGE ENCRYPTED FILE-----
+16
View File
@@ -19,4 +19,20 @@ in
publicKeys = systems ++ users; publicKeys = systems ++ users;
armor = true; armor = true;
}; };
"opencode-hetzner.age" = {
publicKeys = systems ++ users;
armor = true;
owner = "weckyy702";
group = "weckyy702";
mode = "600";
};
"opencode-gwdg.age" = {
publicKeys = systems ++ users;
armor = true;
owner = "weckyy702";
group = "weckyy702";
mode = "600";
};
} }