machineconfig 5.27__py3-none-any.whl → 5.28__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +1 -0
- machineconfig/jobs/installer/linux_scripts/brave.sh +4 -14
- machineconfig/jobs/installer/linux_scripts/docker.sh +5 -17
- machineconfig/jobs/installer/linux_scripts/docker_start.sh +6 -14
- machineconfig/jobs/installer/linux_scripts/edge.sh +3 -11
- machineconfig/jobs/installer/linux_scripts/nerdfont.sh +5 -17
- machineconfig/jobs/installer/linux_scripts/pgsql.sh +3 -11
- machineconfig/jobs/installer/linux_scripts/redis.sh +5 -17
- machineconfig/jobs/installer/linux_scripts/timescaledb.sh +6 -20
- machineconfig/jobs/installer/linux_scripts/vscode.sh +5 -17
- machineconfig/jobs/installer/linux_scripts/warp-cli.sh +5 -17
- machineconfig/jobs/installer/linux_scripts/wezterm.sh +3 -11
- machineconfig/jobs/linux/msc/lid.sh +2 -8
- machineconfig/jobs/linux/msc/network.sh +2 -8
- machineconfig/scripts/cloud/init.sh +6 -20
- machineconfig/scripts/linux/share_cloud.sh +11 -25
- machineconfig/scripts/python/agents.py +22 -31
- machineconfig/scripts/python/cloud_repo_sync.py +14 -29
- machineconfig/scripts/python/devops.py +7 -10
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +1 -1
- machineconfig/scripts/python/helpers_fire/fire_agents_help_launch.py +30 -48
- machineconfig/scripts/python/helpers_fire/fire_agents_helper_types.py +24 -6
- machineconfig/scripts/python/helpers_fire/fire_crush.json +14 -0
- machineconfig/scripts/python/helpers_fire/fire_crush.py +37 -0
- machineconfig/scripts/python/helpers_fire/fire_cursor_agents.py +23 -0
- machineconfig/scripts/python/helpers_fire/fire_gemini.py +41 -0
- machineconfig/scripts/python/helpers_fire/fire_q.py +19 -0
- machineconfig/scripts/python/helpers_fire/prompt.txt +2 -0
- machineconfig/scripts/python/helpers_fire/template.ps1 +0 -0
- machineconfig/scripts/python/helpers_fire/template.sh +31 -0
- machineconfig/scripts/python/interactive.py +21 -19
- machineconfig/scripts/python/repos.py +4 -1
- machineconfig/scripts/python/secure_repo.py +15 -0
- machineconfig/settings/broot/br.sh +0 -4
- machineconfig/setup_linux/__init__.py +2 -2
- machineconfig/setup_linux/apps.sh +7 -9
- machineconfig/setup_linux/apps_desktop.sh +11 -35
- machineconfig/setup_linux/apps_gui.sh +4 -14
- machineconfig/setup_linux/nix/cli_installation.sh +9 -29
- machineconfig/setup_linux/web_shortcuts/interactive.sh +1 -1
- machineconfig/setup_windows/__init__.py +2 -2
- machineconfig/utils/code.py +3 -3
- machineconfig/utils/files/read.py +1 -1
- machineconfig/utils/installer.py +15 -21
- machineconfig/utils/installer_utils/installer.py +3 -4
- machineconfig/utils/installer_utils/installer_abc.py +4 -4
- machineconfig/utils/installer_utils/installer_class.py +11 -46
- machineconfig/utils/io.py +0 -1
- {machineconfig-5.27.dist-info → machineconfig-5.28.dist-info}/METADATA +3 -3
- {machineconfig-5.27.dist-info → machineconfig-5.28.dist-info}/RECORD +57 -50
- {machineconfig-5.27.dist-info → machineconfig-5.28.dist-info}/entry_points.txt +0 -1
- machineconfig/scripts/linux/cloud_repo_sync +0 -2
- machineconfig/scripts/windows/cloud_repo_sync.ps1 +0 -1
- /machineconfig/setup_linux/{repos.sh → machineconfig.sh} +0 -0
- /machineconfig/setup_linux/{ve.sh → uv.sh} +0 -0
- /machineconfig/setup_windows/{repos.ps1 → machineconfig.ps1} +0 -0
- /machineconfig/setup_windows/{ve.ps1 → uv.ps1} +0 -0
- {machineconfig-5.27.dist-info → machineconfig-5.28.dist-info}/WHEEL +0 -0
- {machineconfig-5.27.dist-info → machineconfig-5.28.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
# import shlex
|
|
5
|
+
from machineconfig.scripts.python.helpers_fire.fire_agents_helper_types import MATCHINE
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
def fire_cursor(api_key: Optional[str], prompt_path: Path, machine: MATCHINE) -> str:
|
|
9
|
+
match machine:
|
|
10
|
+
case "local":
|
|
11
|
+
# Export the environment variable so it's available to subshells
|
|
12
|
+
cmd = f"""
|
|
13
|
+
|
|
14
|
+
cursor-agent --print --output-format text {prompt_path}
|
|
15
|
+
|
|
16
|
+
"""
|
|
17
|
+
case "docker":
|
|
18
|
+
cmd = f"""
|
|
19
|
+
|
|
20
|
+
cursor-agent --print --output-format text {prompt_path}
|
|
21
|
+
|
|
22
|
+
"""
|
|
23
|
+
return cmd
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import shlex
|
|
4
|
+
from machineconfig.scripts.python.helpers_fire.fire_agents_helper_types import MATCHINE
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def fire_gemini(api_key: Optional[str], prompt_path: Path, machine: MATCHINE) -> str:
|
|
9
|
+
model = "gemini-2.5-pro"
|
|
10
|
+
# model = "gemini-2.5-flash-lite"
|
|
11
|
+
# model = None # auto-select
|
|
12
|
+
# if model is None:
|
|
13
|
+
# model_arg = ""
|
|
14
|
+
# else:
|
|
15
|
+
model_arg = f"--model {shlex.quote(model)}"
|
|
16
|
+
# Need a real shell for the pipeline; otherwise '| gemini ...' is passed as args to 'cat'
|
|
17
|
+
safe_path = shlex.quote(str(prompt_path))
|
|
18
|
+
|
|
19
|
+
match machine:
|
|
20
|
+
case "local":
|
|
21
|
+
# Export the environment variable so it's available to subshells
|
|
22
|
+
if api_key is not None:
|
|
23
|
+
define_api_key = f"""export GEMINI_API_KEY="{shlex.quote(api_key)}" """
|
|
24
|
+
else:
|
|
25
|
+
define_api_key = "echo 'Warning: No GEMINI_API_KEY provided, hoping it is set in the environment.'"
|
|
26
|
+
cmd = f"""
|
|
27
|
+
{define_api_key}
|
|
28
|
+
echo "Using Gemini API key $GEMINI_API_KEY"
|
|
29
|
+
gemini {model_arg} --yolo --prompt {safe_path}
|
|
30
|
+
"""
|
|
31
|
+
case "docker":
|
|
32
|
+
cmd = """
|
|
33
|
+
docker run -it --rm \
|
|
34
|
+
-e GEMINI_API_KEY="$GEMINI_API_KEY" \
|
|
35
|
+
-v "/home/alex/code/machineconfig:/workspace/machineconfig" \
|
|
36
|
+
-w "/workspace/machineconfig" \
|
|
37
|
+
gemini-cli:latest \
|
|
38
|
+
gemini --prompt "$PATH_PROMPT"
|
|
39
|
+
"""
|
|
40
|
+
return cmd
|
|
41
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import shlex
|
|
4
|
+
from machineconfig.scripts.python.helpers_fire.fire_agents_helper_types import MATCHINE
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def fire_q(api_key: str, prompt_path: Path, machine: MATCHINE) -> str:
|
|
8
|
+
safe_path = shlex.quote(str(prompt_path))
|
|
9
|
+
|
|
10
|
+
match machine:
|
|
11
|
+
case "local":
|
|
12
|
+
cmd = f"""
|
|
13
|
+
q chat --no-interactive --trust-all-tools {safe_path}
|
|
14
|
+
"""
|
|
15
|
+
case "docker":
|
|
16
|
+
cmd = f"""
|
|
17
|
+
q chat --no-interactive --trust-all-tools {safe_path}
|
|
18
|
+
"""
|
|
19
|
+
return cmd
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
#!/bin/bash
|
|
3
|
+
# set -e # Exit immediately if a command exits with a non-zero status.
|
|
4
|
+
|
|
5
|
+
JOB_NAME="outpatient_mapping"
|
|
6
|
+
REPO_ROOT="$HOME/code/machineconfig"
|
|
7
|
+
CONTEXT_PATH="$REPO_ROOT/src/machineconfig/scripts/python/fire_jobs.py"
|
|
8
|
+
PROMPT_PATH="$REPO_ROOT/src/machineconfig/scripts/python/helpers_fire/prompt.txt"
|
|
9
|
+
|
|
10
|
+
AGENTS_DIR="$REPO_ROOT/.ai/agents/$JOB_NAME"
|
|
11
|
+
LAYOUT_PATH_UNBALANCED="$REPO_ROOT/.ai/agents/$JOB_NAME/layout_unbalanced.json"
|
|
12
|
+
|
|
13
|
+
agents create \
|
|
14
|
+
--context-path "$CONTEXT_PATH" \
|
|
15
|
+
--tasks-per-prompt 1 \
|
|
16
|
+
--machine docker \
|
|
17
|
+
--agent crush \
|
|
18
|
+
--model "zai/glm-4.6" \
|
|
19
|
+
--provider openrouter \
|
|
20
|
+
--separator 'def ' \
|
|
21
|
+
--prompt-path "$PROMPT_PATH" \
|
|
22
|
+
--output-path "$LAYOUT_PATH_UNBALANCED" \
|
|
23
|
+
--agents-dir "$AGENTS_DIR"
|
|
24
|
+
|
|
25
|
+
# LAYOUT_BALANCED_PATH="$REPO_ROOT/.ai/agents/$JOB_NAME/layout_balanced.json"
|
|
26
|
+
# sessions balance-load $LAYOUT_PATH --max-thresh 6 --breaking-method moreLayouts --thresh-type number --output-path $LAYOUT_BALANCED_PATH
|
|
27
|
+
# sessions run $LAYOUT_BALANCED_PATH --kill-upon-completion
|
|
28
|
+
|
|
29
|
+
sessions run $LAYOUT_PATH_UNBALANCED
|
|
30
|
+
|
|
31
|
+
# agents collect $AGENTS_DIR "$REPO_ROOT/.ai/agents/$JOB_NAME/collected.txt"
|
|
@@ -95,17 +95,22 @@ def display_dotfiles_instructions() -> None:
|
|
|
95
95
|
|
|
96
96
|
def get_installation_choices() -> list[str]:
|
|
97
97
|
"""Get user choices for installation options."""
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
Choice(value="
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
Choice(value="
|
|
106
|
-
Choice(value="
|
|
107
|
-
Choice(value="
|
|
108
|
-
Choice(value="
|
|
98
|
+
if platform.system() == "Windows":
|
|
99
|
+
choices = []
|
|
100
|
+
else:
|
|
101
|
+
choices = [
|
|
102
|
+
Choice(value="upgrade_system", title="🔄 Upgrade System Package Manager", checked=False),
|
|
103
|
+
]
|
|
104
|
+
choices += [
|
|
105
|
+
Choice(value="install_repos", title="🐍 Install machineconfig.", checked=False),
|
|
106
|
+
Choice(value="ESSENTIAL_SYSTEM", title="📥 Install Essential System Packages.", checked=False),
|
|
107
|
+
Choice(value="ESSENTIAL", title="⚡ Install CLI apps essentials", checked=False),
|
|
108
|
+
Choice(value="DEV_SYSTEM", title="🛠️ Install CLI apps development.", checked=False),
|
|
109
|
+
Choice(value="TerminalEyeCandy", title="🎨 Install CLI apps terminal eye candy.", checked=False),
|
|
110
|
+
Choice(value="install_ssh_server", title="🔒 Install SSH Server", checked=False),
|
|
111
|
+
Choice(value="install_shell_profile", title="🐚 Configure Shell Profile.", checked=False),
|
|
112
|
+
Choice(value="retrieve_repositories", title="📚 Retrieve Repositories", checked=False),
|
|
113
|
+
Choice(value="retrieve_data", title="💾 Retrieve Data.", checked=False),
|
|
109
114
|
]
|
|
110
115
|
# Add Windows-specific options
|
|
111
116
|
if platform.system() == "Windows":
|
|
@@ -117,12 +122,10 @@ def get_installation_choices() -> list[str]:
|
|
|
117
122
|
def execute_installations(selected_options: list[str]) -> None:
|
|
118
123
|
if platform.system() == "Windows":
|
|
119
124
|
from machineconfig import setup_windows as module
|
|
120
|
-
|
|
121
|
-
run_shell_script(script_path.read_text(encoding="utf-8"))
|
|
125
|
+
run_shell_script(module.UV.read_text(encoding="utf-8"))
|
|
122
126
|
else:
|
|
123
127
|
from machineconfig import setup_linux as module
|
|
124
|
-
|
|
125
|
-
run_shell_script(script_path.read_text(encoding="utf-8"))
|
|
128
|
+
run_shell_script(module.UV.read_text(encoding="utf-8"))
|
|
126
129
|
|
|
127
130
|
for maybe_a_group in selected_options:
|
|
128
131
|
if maybe_a_group in ("ESSENTIAL", "DEV", "ESSENTIAL_SYSTEM", "DEV_SYSTEM", "TerminalEyeCandy"):
|
|
@@ -147,10 +150,10 @@ def execute_installations(selected_options: list[str]) -> None:
|
|
|
147
150
|
if "install_repos" in selected_options:
|
|
148
151
|
console.print(Panel("🐍 [bold green]PYTHON ENVIRONMENT[/bold green]\n[italic]Virtual environment setup[/italic]", border_style="green"))
|
|
149
152
|
if platform.system() == "Windows":
|
|
150
|
-
from machineconfig.setup_windows import
|
|
153
|
+
from machineconfig.setup_windows import MACHINECONFIG
|
|
151
154
|
else:
|
|
152
|
-
from machineconfig.setup_linux import
|
|
153
|
-
run_shell_script(
|
|
155
|
+
from machineconfig.setup_linux import MACHINECONFIG
|
|
156
|
+
run_shell_script(MACHINECONFIG.read_text(encoding="utf-8"))
|
|
154
157
|
|
|
155
158
|
if "install_ssh_server" in selected_options:
|
|
156
159
|
console.print(Panel("🔒 [bold red]SSH SERVER[/bold red]\n[italic]Remote access setup[/italic]", border_style="red"))
|
|
@@ -207,7 +210,6 @@ def main() -> None:
|
|
|
207
210
|
console.print("❌ Installation cancelled.", style="bold red")
|
|
208
211
|
sys.exit(0)
|
|
209
212
|
execute_installations(selected_options)
|
|
210
|
-
display_dotfiles_instructions()
|
|
211
213
|
display_completion_message()
|
|
212
214
|
|
|
213
215
|
|
|
@@ -8,13 +8,13 @@ in the event that username@github.com is not mentioned in the remote url.
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from typing import Annotated, Optional
|
|
10
10
|
import typer
|
|
11
|
+
from machineconfig.scripts.python.secure_repo import main as secure_repo_main
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
app = typer.Typer(help="� Manage development repositories", no_args_is_help=True)
|
|
14
15
|
sync_app = typer.Typer(help="� Manage repository specifications and syncing", no_args_is_help=True)
|
|
15
16
|
app.add_typer(sync_app, name="sync", help="� Sync repositories using saved specs")
|
|
16
17
|
|
|
17
|
-
|
|
18
18
|
DirectoryArgument = Annotated[Optional[str], typer.Argument(help="📁 Folder containing repos or the specs JSON file to use.")]
|
|
19
19
|
RecursiveOption = Annotated[bool, typer.Option("--recursive", "-r", help="🔍 Recurse into nested repositories.")]
|
|
20
20
|
NoSyncOption = Annotated[bool, typer.Option("--no-sync", help="🚫 Disable automatic uv sync after pulls.")]
|
|
@@ -101,6 +101,9 @@ def analyze(directory: DirectoryArgument = None) -> None:
|
|
|
101
101
|
analyze_repo_development(repo_path=repo_path)
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
app.command(name="secure", no_args_is_help=True, help="🔐 Securely sync git repository to/from cloud with encryption")(secure_repo_main)
|
|
105
|
+
|
|
106
|
+
|
|
104
107
|
@app.command(no_args_is_help=True)
|
|
105
108
|
def viz(
|
|
106
109
|
repo: str = typer.Option(Path.cwd().__str__(), "--repo", "-r", help="Path to git repository to visualize"),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import typer
|
|
3
|
+
from typing import Optional, Literal
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main(
|
|
8
|
+
cloud: Optional[str] = typer.Option(None, "--cloud", "-c", help="Cloud storage profile name. If not provided, uses default from config."),
|
|
9
|
+
repo: Optional[str] = typer.Option(None, "--repo", "-r", help="Path to the local repository. Defaults to current working directory."),
|
|
10
|
+
message: Optional[str] = typer.Option(None, "--message", "-m", help="Commit message for local changes."),
|
|
11
|
+
on_conflict: Literal["ask", "pushLocalMerge", "overwriteLocal", "InspectRepos", "RemoveLocalRclone"] = typer.Option("ask", "--on-conflict", "-oc", help="Action to take on merge conflict. Default is 'ask'."),
|
|
12
|
+
pwd: Optional[str] = typer.Option(None, "--password", help="Password for encryption/decryption of the remote repository."),
|
|
13
|
+
):
|
|
14
|
+
from machineconfig.scripts.python.cloud_repo_sync import main as program_content
|
|
15
|
+
program_content(cloud=cloud, repo=repo, message=message, on_conflict=on_conflict, pwd=pwd)
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#=======================================================================
|
|
3
2
|
# 🌳 BROOT SHELL INTEGRATION 🌳
|
|
4
|
-
#=======================================================================
|
|
5
3
|
# This script was automatically generated by the broot program
|
|
6
4
|
# More information can be found in https://github.com/Canop/broot
|
|
7
5
|
#
|
|
@@ -40,7 +38,6 @@ function br {
|
|
|
40
38
|
fi
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
#=======================================================================
|
|
44
41
|
# ℹ️ USAGE:
|
|
45
42
|
# br [options]
|
|
46
43
|
#
|
|
@@ -48,4 +45,3 @@ function br {
|
|
|
48
45
|
# br # Open broot in the current directory
|
|
49
46
|
# br /path/to/dir # Open broot in the specified directory
|
|
50
47
|
# br -h # Show broot help
|
|
51
|
-
#=======================================================================
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
|
|
4
4
|
APPS = Path(__file__).parent.joinpath("apps.sh")
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
MACHINECONFIG = Path(__file__).parent.joinpath("machineconfig.sh")
|
|
6
|
+
UV = Path(__file__).parent.joinpath("uv.sh")
|
|
7
7
|
|
|
8
8
|
APPS_DESKTOP = Path(__file__).parent.joinpath("apps_desktop.sh")
|
|
9
9
|
APPS_GUI = Path(__file__).parent.joinpath("apps_gui.sh")
|
|
@@ -17,6 +17,12 @@ export NVM_DIR="$HOME/.nvm"
|
|
|
17
17
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
|
18
18
|
echo "📥 Installing latest Node.js..."
|
|
19
19
|
nvm install node || true
|
|
20
|
+
echo "📥 Installing SQLite - lightweight SQL database..."
|
|
21
|
+
echo "📥 Installing PostgreSQL client..."
|
|
22
|
+
echo "📥 Installing Redis command-line tools..."
|
|
23
|
+
sudo nala install sqlite3 -y || true
|
|
24
|
+
sudo nala install postgresql-client -y || true # # same for pgsq, when the server runs, we will need the client to talk to it.
|
|
25
|
+
sudo nala install redis-tools -y || true # this gives redis-cli, which is needed to talk to the redis-server that is running in the docker container.
|
|
20
26
|
|
|
21
27
|
# --GROUP:TerminalEyeCandy:fortune,toilet,sl,aafire,cmatrix,hollywood,chafa
|
|
22
28
|
echo "📥 Installing fortune - random wisdom generator..."
|
|
@@ -48,6 +54,7 @@ sudo nala install samba
|
|
|
48
54
|
sudo nala install fuse3 -y || true
|
|
49
55
|
sudo nala install nfs-common -y || true
|
|
50
56
|
|
|
57
|
+
|
|
51
58
|
# --GROUP:DEV_SYSTEM: graphviz,make,rust,libssl-dev,sqlite3,postgresql-client,redis-tools
|
|
52
59
|
echo "📥 Installing Graphviz - graph visualization software..."
|
|
53
60
|
echo "📥 Installing make - build automation tool..."
|
|
@@ -58,12 +65,3 @@ sudo nala install ffmpeg -y || true # Required by some dev tools
|
|
|
58
65
|
sudo nala install make -y || true # Required by LunarVim and SpaceVim
|
|
59
66
|
(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) || true
|
|
60
67
|
sudo nala install libssl-dev -y
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
# --GROUP:DATABASES: sqlite3,postgresql-client,redis-tools
|
|
64
|
-
echo "📥 Installing SQLite - lightweight SQL database..."
|
|
65
|
-
echo "📥 Installing PostgreSQL client..."
|
|
66
|
-
echo "📥 Installing Redis command-line tools..."
|
|
67
|
-
sudo nala install sqlite3 -y || true
|
|
68
|
-
sudo nala install postgresql-client -y || true
|
|
69
|
-
sudo nala install redis-tools -y || true
|
|
@@ -1,58 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/bash
|
|
2
|
-
#=======================================================================
|
|
3
2
|
# 🖥️ DESKTOP APPLICATIONS INSTALLATION SCRIPT
|
|
4
|
-
#=======================================================================
|
|
5
3
|
# This script installs desktop applications for a Linux workstation
|
|
6
4
|
|
|
7
|
-
echo """
|
|
8
|
-
🌐 WEB BROWSERS | Installing browser applications
|
|
9
|
-
#=======================================================================
|
|
5
|
+
echo """🌐 WEB BROWSERS | Installing browser applications
|
|
10
6
|
"""
|
|
11
7
|
# Google Chrome installation (commented reference)
|
|
12
8
|
# echo "📥 Installing Google Chrome..."
|
|
13
9
|
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
14
10
|
# sudo dpkg -i google-chrome-stable_current_amd64.deb
|
|
15
11
|
|
|
16
|
-
echo """
|
|
17
|
-
📝 TEXT EDITORS | Installing Neovim editor
|
|
18
|
-
#=======================================================================
|
|
12
|
+
echo """📝 TEXT EDITORS | Installing Neovim editor
|
|
19
13
|
"""
|
|
20
14
|
echo "📥 Installing Neovim via Homebrew..."
|
|
21
15
|
/home/linuxbrew/.linuxbrew/bin/brew install neovim
|
|
22
16
|
|
|
23
|
-
echo """
|
|
24
|
-
📧 EMAIL CLIENT | Installing Thunderbird
|
|
25
|
-
#=======================================================================
|
|
17
|
+
echo """📧 EMAIL CLIENT | Installing Thunderbird
|
|
26
18
|
"""
|
|
27
19
|
echo "📥 Installing Thunderbird via Flatpak..."
|
|
28
20
|
flatpak install flathub org.mozilla.Thunderbird
|
|
29
21
|
|
|
30
|
-
echo """
|
|
31
|
-
🖲️ TERMINAL EMULATOR | Installing WezTerm
|
|
32
|
-
#=======================================================================
|
|
22
|
+
echo """🖲️ TERMINAL EMULATOR | Installing WezTerm
|
|
33
23
|
"""
|
|
34
24
|
echo "📥 Installing WezTerm via Flatpak..."
|
|
35
25
|
flatpak install flathub org.wezfurlong.wezterm
|
|
36
26
|
echo "🚀 Launching WezTerm..."
|
|
37
27
|
flatpak run org.wezfurlong.wezterm
|
|
38
28
|
|
|
39
|
-
echo """
|
|
40
|
-
✏️ SCREEN ANNOTATION | Installing Gromit-MPX
|
|
41
|
-
#=======================================================================
|
|
29
|
+
echo """✏️ SCREEN ANNOTATION | Installing Gromit-MPX
|
|
42
30
|
"""
|
|
43
31
|
echo "📥 Installing Gromit-MPX via Flatpak..."
|
|
44
32
|
flatpak install net.christianbeier.Gromit-MPX
|
|
45
33
|
|
|
46
|
-
echo """
|
|
47
|
-
📋 CLIPBOARD MANAGERS | Installing CopyQ
|
|
48
|
-
#=======================================================================
|
|
34
|
+
echo """📋 CLIPBOARD MANAGERS | Installing CopyQ
|
|
49
35
|
"""
|
|
50
36
|
echo "📥 Installing CopyQ via Flatpak..."
|
|
51
37
|
flatpak install flathub com.github.hluk.copyq --noninteractive
|
|
52
38
|
|
|
53
|
-
echo """
|
|
54
|
-
🔗 REMOTE DESKTOP | Installing Remmina
|
|
55
|
-
#=======================================================================
|
|
39
|
+
echo """🔗 REMOTE DESKTOP | Installing Remmina
|
|
56
40
|
"""
|
|
57
41
|
echo "📥 Installing Remmina and RDP plugin..."
|
|
58
42
|
sudo nala install remmina remmina-plugin-rdp -y
|
|
@@ -65,16 +49,12 @@ sudo nala install remmina remmina-plugin-rdp -y
|
|
|
65
49
|
# flatpak install --user flathub org.remmina.Remmina
|
|
66
50
|
# flatpak run --user org.remmina.Remmina
|
|
67
51
|
|
|
68
|
-
echo """
|
|
69
|
-
🚀 APPLICATION LAUNCHER | Installing Rofi
|
|
70
|
-
#=======================================================================
|
|
52
|
+
echo """🚀 APPLICATION LAUNCHER | Installing Rofi
|
|
71
53
|
"""
|
|
72
54
|
echo "📥 Installing Rofi application launcher..."
|
|
73
55
|
sudo nala install rofi -y
|
|
74
56
|
|
|
75
|
-
echo """
|
|
76
|
-
📎 CLIPBOARD HISTORY | Installing Greenclip
|
|
77
|
-
#=======================================================================
|
|
57
|
+
echo """📎 CLIPBOARD HISTORY | Installing Greenclip
|
|
78
58
|
"""
|
|
79
59
|
# Session type detection (reference)
|
|
80
60
|
# session_type=$(echo $XDG_SESSION_TYPE)
|
|
@@ -100,14 +80,10 @@ echo "- With Rofi: rofi -modi \"clipboard:greenclip print\" -show clipboard -run
|
|
|
100
80
|
echo "- For emoji picker: rofi -modi \"emoji:rofimoji\" -show emoji"
|
|
101
81
|
echo "- Application launcher: rofi -show drun"
|
|
102
82
|
|
|
103
|
-
echo """
|
|
104
|
-
🔄 APPLICATION LINKING | Linking applications to user space
|
|
105
|
-
#=======================================================================
|
|
83
|
+
echo """🔄 APPLICATION LINKING | Linking applications to user space
|
|
106
84
|
"""
|
|
107
85
|
echo "🔗 Creating application symlinks..."
|
|
108
86
|
ln -s /home/$USER/.nix-profile/share/applications/* /home/$USER/.local/share/applications/
|
|
109
87
|
|
|
110
|
-
echo """
|
|
111
|
-
✅ INSTALLATION COMPLETE | Desktop applications have been installed
|
|
112
|
-
#=======================================================================
|
|
88
|
+
echo """✅ INSTALLATION COMPLETE | Desktop applications have been installed
|
|
113
89
|
"""
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#=======================================================================
|
|
3
2
|
# 🖥️ GUI APPLICATIONS AND DESKTOP ENVIRONMENT SETUP SCRIPT
|
|
4
|
-
#=======================================================================
|
|
5
3
|
# This script installs graphical user interfaces and desktop environments
|
|
6
4
|
|
|
7
|
-
echo """
|
|
8
|
-
📦 INSTALLING GUI COMPONENTS | Setting up desktop environment
|
|
9
|
-
#=======================================================================
|
|
5
|
+
echo """📦 INSTALLING GUI COMPONENTS | Setting up desktop environment
|
|
10
6
|
"""
|
|
11
7
|
|
|
12
8
|
# echo "📥 Installing Nautilus file manager..."
|
|
@@ -27,9 +23,7 @@ sudo nala install xfce4 -y # 🏠 xfce4 desktop environment
|
|
|
27
23
|
echo "📥 Installing XFCE4 additional components..."
|
|
28
24
|
sudo nala install xfce4-goodies -y # ✨ xfce4 desktop environment extras
|
|
29
25
|
|
|
30
|
-
echo """
|
|
31
|
-
🔧 CONFIGURING XRDP | Setting up Remote Desktop service
|
|
32
|
-
#=======================================================================
|
|
26
|
+
echo """🔧 CONFIGURING XRDP | Setting up Remote Desktop service
|
|
33
27
|
"""
|
|
34
28
|
|
|
35
29
|
# Back up original configuration
|
|
@@ -55,17 +49,13 @@ sudo sed -i 's/test/#test/g' /etc/xrdp/startwm.sh
|
|
|
55
49
|
sudo sed -i 's/exec/#exec/g' /etc/xrdp/startwm.sh
|
|
56
50
|
echo "startxfce4" | sudo tee -a /etc/xrdp/startwm.sh
|
|
57
51
|
|
|
58
|
-
echo """
|
|
59
|
-
🚀 STARTING SERVICES | Initializing XRDP service
|
|
60
|
-
#=======================================================================
|
|
52
|
+
echo """🚀 STARTING SERVICES | Initializing XRDP service
|
|
61
53
|
"""
|
|
62
54
|
|
|
63
55
|
echo "🔄 Starting XRDP service..."
|
|
64
56
|
sudo /etc/init.d/xrdp start
|
|
65
57
|
|
|
66
|
-
echo """
|
|
67
|
-
✅ SETUP COMPLETE | GUI environment has been configured
|
|
68
|
-
#=======================================================================
|
|
58
|
+
echo """✅ SETUP COMPLETE | GUI environment has been configured
|
|
69
59
|
"""
|
|
70
60
|
echo "ℹ️ Connect to this machine via Remote Desktop using port 3391"
|
|
71
61
|
# Alternative commands:
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#=======================================================================
|
|
3
2
|
# 📦 NIX CLI TOOLS INSTALLATION SCRIPT
|
|
4
|
-
#=======================================================================
|
|
5
3
|
# This script installs various command-line utilities using the Nix package manager
|
|
6
4
|
|
|
7
|
-
echo """
|
|
8
|
-
🔄 SYSTEM UTILITIES | Installing system management tools
|
|
9
|
-
#=======================================================================
|
|
5
|
+
echo """🔄 SYSTEM UTILITIES | Installing system management tools
|
|
10
6
|
"""
|
|
11
7
|
|
|
12
8
|
# System upgrade tool
|
|
@@ -21,9 +17,7 @@ nix-env -iA nixpkgs.procs || true
|
|
|
21
17
|
echo "📥 Installing watchexec - executes commands when files change..."
|
|
22
18
|
nix-env -iA nixpkgs.watchexec || true
|
|
23
19
|
|
|
24
|
-
echo """
|
|
25
|
-
📂 FILE MANAGEMENT | Installing file browsers and utilities
|
|
26
|
-
#=======================================================================
|
|
20
|
+
echo """📂 FILE MANAGEMENT | Installing file browsers and utilities
|
|
27
21
|
"""
|
|
28
22
|
|
|
29
23
|
# Terminal file managers
|
|
@@ -56,9 +50,7 @@ nix-env -iA nixpkgs.diskonaut || true
|
|
|
56
50
|
echo "📥 Installing kondo - cleanup tool for dev projects..."
|
|
57
51
|
nix-env -iA nixpkgs.kondo || true
|
|
58
52
|
|
|
59
|
-
echo """
|
|
60
|
-
🖼️ VISUAL TOOLS | Installing terminal visualization tools
|
|
61
|
-
#=======================================================================
|
|
53
|
+
echo """🖼️ VISUAL TOOLS | Installing terminal visualization tools
|
|
62
54
|
"""
|
|
63
55
|
|
|
64
56
|
# Terminal visualization
|
|
@@ -71,9 +63,7 @@ nix-env -iA nixpkgs.bottom || true
|
|
|
71
63
|
echo "📥 Installing delta - syntax-highlighting pager for git..."
|
|
72
64
|
nix-env -iA nixpkgs.delta || true
|
|
73
65
|
|
|
74
|
-
echo """
|
|
75
|
-
🔧 DEVELOPMENT TOOLS | Installing programming utilities
|
|
76
|
-
#=======================================================================
|
|
66
|
+
echo """🔧 DEVELOPMENT TOOLS | Installing programming utilities
|
|
77
67
|
"""
|
|
78
68
|
|
|
79
69
|
# Code editors
|
|
@@ -95,9 +85,7 @@ nix-env -iA nixpkgs.tokei || true
|
|
|
95
85
|
echo "📥 Installing gitui - terminal UI for git..."
|
|
96
86
|
nix-env -iA nixpkgs.gitui || true
|
|
97
87
|
|
|
98
|
-
echo """
|
|
99
|
-
🔎 SEARCH TOOLS | Installing fuzzy finders and search utilities
|
|
100
|
-
#=======================================================================
|
|
88
|
+
echo """🔎 SEARCH TOOLS | Installing fuzzy finders and search utilities
|
|
101
89
|
"""
|
|
102
90
|
|
|
103
91
|
# Search history
|
|
@@ -108,9 +96,7 @@ nix-env -iA nixpkgs.mcfly || true
|
|
|
108
96
|
echo "📥 Installing skim - fuzzy finder in Rust..."
|
|
109
97
|
nix-env -iA nixpkgs.skim || true
|
|
110
98
|
|
|
111
|
-
echo """
|
|
112
|
-
🌐 NETWORK & CLOUD TOOLS | Installing file transfer and cloud utilities
|
|
113
|
-
#=======================================================================
|
|
99
|
+
echo """🌐 NETWORK & CLOUD TOOLS | Installing file transfer and cloud utilities
|
|
114
100
|
"""
|
|
115
101
|
|
|
116
102
|
# File transfer
|
|
@@ -121,18 +107,14 @@ nix-env -iA nixpkgs.termscp || true
|
|
|
121
107
|
echo "📥 Installing rclone - rsync for cloud storage..."
|
|
122
108
|
nix-env -iA nixpkgs.rclone || true
|
|
123
109
|
|
|
124
|
-
echo """
|
|
125
|
-
🛡️ SECURITY TOOLS | Installing password management utilities
|
|
126
|
-
#=======================================================================
|
|
110
|
+
echo """🛡️ SECURITY TOOLS | Installing password management utilities
|
|
127
111
|
"""
|
|
128
112
|
|
|
129
113
|
# Password management
|
|
130
114
|
echo "📥 Installing gopass - team password manager with git..."
|
|
131
115
|
nix-env -iA nixpkgs.gopass || true
|
|
132
116
|
|
|
133
|
-
echo """
|
|
134
|
-
📚 DOCUMENTATION | Installing help and reference tools
|
|
135
|
-
#=======================================================================
|
|
117
|
+
echo """📚 DOCUMENTATION | Installing help and reference tools
|
|
136
118
|
"""
|
|
137
119
|
|
|
138
120
|
# Command reference
|
|
@@ -143,9 +125,7 @@ nix-env -iA nixpkgs.tldr || true
|
|
|
143
125
|
echo "📥 Installing nushell - modern shell alternative..."
|
|
144
126
|
nix-env -iA nixpkgs.nushell || true
|
|
145
127
|
|
|
146
|
-
echo """
|
|
147
|
-
✅ INSTALLATION COMPLETE | All Nix CLI tools have been installed
|
|
148
|
-
#=======================================================================
|
|
128
|
+
echo """✅ INSTALLATION COMPLETE | All Nix CLI tools have been installed
|
|
149
129
|
"""
|
|
150
130
|
|
|
151
131
|
# Commented out tools
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
-
. <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/
|
|
3
|
+
. <( curl -sSL "https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/uv.sh")
|
|
4
4
|
$HOME/.local/bin/uv run --python 3.13 --with machineconfig devops self interactive
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
|
|
4
4
|
APPS = Path(__file__).parent.joinpath("apps.ps1")
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
MACHINECONFIG = Path(__file__).parent.joinpath("machineconfig.ps1")
|
|
6
|
+
UV = Path(__file__).parent.joinpath("uv.ps1")
|
|
7
7
|
|
|
8
8
|
DOCKER = Path(__file__).parent.joinpath("others/docker.ps1")
|
|
9
9
|
OBS = Path(__file__).parent.joinpath("others/obs.ps1")
|
machineconfig/utils/code.py
CHANGED
|
@@ -98,7 +98,7 @@ def print_code(code: str, lexer: str, desc: str, subtitle: str = ""):
|
|
|
98
98
|
console.print(Panel(Syntax(code=code, lexer=lexer), title=f"📄 {desc}", subtitle=subtitle), style="bold red")
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
def run_shell_script(
|
|
101
|
+
def run_shell_script(script: str, display_script: bool = True):
|
|
102
102
|
import tempfile
|
|
103
103
|
if platform.system() == "Windows":
|
|
104
104
|
suffix = ".ps1"
|
|
@@ -107,12 +107,12 @@ def run_shell_script(program: str, display_script: bool = True):
|
|
|
107
107
|
suffix = ".sh"
|
|
108
108
|
lexer = "bash"
|
|
109
109
|
with tempfile.NamedTemporaryFile(mode='w', suffix=suffix, delete=False, encoding='utf-8') as temp_file:
|
|
110
|
-
temp_file.write(
|
|
110
|
+
temp_file.write(script)
|
|
111
111
|
temp_script_path = PathExtended(temp_file.name)
|
|
112
112
|
console = Console()
|
|
113
113
|
if display_script:
|
|
114
114
|
from rich.syntax import Syntax
|
|
115
|
-
console.print(Panel(Syntax(code=
|
|
115
|
+
console.print(Panel(Syntax(code=script, lexer=lexer), title=f"📄 shell script @ {temp_script_path}", subtitle="shell script being executed"), style="bold red")
|
|
116
116
|
|
|
117
117
|
if platform.system() == "Windows":
|
|
118
118
|
import subprocess
|
|
@@ -21,7 +21,7 @@ class Read:
|
|
|
21
21
|
if "type object 'Read' has no attribute" not in str(err): raise AttributeError(err) from err
|
|
22
22
|
if suffix in ('eps', 'jpg', 'jpeg', 'pdf', 'pgf', 'png', 'ps', 'raw', 'rgba', 'svg', 'svgz', 'tif', 'tiff'):
|
|
23
23
|
import matplotlib.pyplot as pyplot
|
|
24
|
-
return pyplot.imread(path, **kwargs) # from: plt.gcf().canvas.get_supported_filetypes().keys():
|
|
24
|
+
return pyplot.imread(str(path), **kwargs) # from: plt.gcf().canvas.get_supported_filetypes().keys():
|
|
25
25
|
if suffix == "parquet":
|
|
26
26
|
import polars as pl
|
|
27
27
|
return pl.read_parquet(path, **kwargs)
|