working on ollama + pnxvpn

This commit is contained in:
nx2
2024-03-06 22:22:27 +01:00
parent 9ae85efdcb
commit c4008417df
4 changed files with 62 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, allowed, secrets, ... }:
{ config, pkgs, lib, system, allowed, secrets, ... }:
{
imports = [
@@ -43,14 +43,40 @@
element sssnake pipes
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
(pkgs.writeShellScriptBin "nx_connect_to_pnx" ''
(writeShellScriptBin "nx_connect_to_pnx" ''
cd /home/nx2/PNX/vpn
sudo openvpn /home/nx2/PNX/vpn/firewall_phoenix_1_local_RW_Phoenix.ovpn
sudo openvpn /home/nx2/.ssl/ljk-pnx.ovpn --auth-user-pass ~/.ssl/ljk-pnx-pass.txt #gets put there by home-manager
'')
(writeShellScriptBin "nxrbs-nix" ''
set -e
pushd ~/.nix-dots/
git diff
'')
# only works on spec arch, chage url for others
(stdenv.mkDerivation {
name = "easycommit";
src = pkgs.fetchurl {
url = "https://github.com/blackironj/easycommit/releases/download/v0.0.1/easycommit-v0.0.1-linux-amd64.tar.gz";
sha256 = "sha256-Ip5wfVe/RzCxGGh1YFBllAn84nD7mUXbnMko+ue/C2E=";
};
phases = ["installPhase"];
installPhase = ''
mkdir -p $out/bin
tar xf $src -C $out/
ls -la $out
mv $out/easycommit $out/bin/
chmod +x $out/bin/easycommit
'';
})
];
@@ -70,6 +96,7 @@
# systemd.user.services = {
# ydotoold = {
# Unit = {
@@ -90,6 +117,13 @@
home.file = {
".ssl/ljk-pnx-cert.pem" = secrets.pnxVpn.cert;
".ssl/ljk-pnx-cert.key" = secrets.pnxVpn.certKey;
".ssl/ljk-pnx-ca.pem" = secrets.pnxVpn.ca;
".ssl/ljk-pnx.ovpn" = secrets.pnxVpn.ovpn;
".ssl/ljk-pnx-pass.txt" = secrets.pnxVpn.pass;
# ".config/libinput/gestures".text = ''
# # Swipe threshold (0-100)
# swipe_threshold 0