This repository has been archived by the owner on Dec 25, 2024. It is now read-only.
generated from blue-build/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: AMD Lact + SuperGFXCTL + GreenWithEnvy and modular DRY scripts
- Loading branch information
1 parent
613d308
commit ff35aa9
Showing
15 changed files
with
300 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 15 additions & 4 deletions
19
config/files/shared/libexec/atomic-studio-cli/lib/distrobox.nu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
export const DISTROBOX_DOWNLOAD_URL = "https://raw.githubusercontent.com/89luca89/distrobox/main/install" | ||
use user_interaction.nu [fancy_prompt_message] | ||
|
||
export def gen_export_string [package: string, export_Path: string] { | ||
return $"distrobox-export --app ($package) ; distrobox-export --export-path ($export_Path) --bin /usr/bin/($package)" | ||
export def gen_export_string [packages: list<string>, export_Path: string] { | ||
return ($packages | each {|package| $"distrobox-export --app ($package) ; distrobox-export --export-path ($export_Path) --bin /usr/bin/($package)" } | str join " ; ") | ||
} | ||
|
||
export const distroboxes = [ | ||
export const DISTROBOXES_META = [ | ||
["aliases","name", "image", "description"]; | ||
["ubuntu", "ubuntubox", "ghcr.io/ublue-os/ubuntu-toolbox:latest", "Ubuntu based distrobox"] | ||
["arch", "archbox", "ghcr.io/ublue-os/arch-distrobox:latest", "Arch Linux based distrobox with paru pre-installed"] | ||
["fedora", "fedorabox", "ghcr.io/ublue-os/fedora-toolbox", "Fedora based distrobox"] | ||
] | ||
|
||
export def create_container_optional [yes: bool, container: record<name: string, description: string, image: string>] { | ||
try { distrobox ls | grep $container.name } catch { | ||
fancy_prompt_message $container.description | ||
if not (user_prompt $yes) { | ||
return 0 | ||
} | ||
distrobox create -Y --pull -i $container.image --name $container.name | ||
} | ||
} | ||
|
4 changes: 4 additions & 0 deletions
4
config/files/shared/libexec/atomic-studio-cli/lib/external_programs.nu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export extern "distrobox" [ | ||
create? # Creates distroboxes | ||
|
||
] |
21 changes: 21 additions & 0 deletions
21
config/files/shared/libexec/atomic-studio-cli/lib/generic_install.nu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export const DISTROBOX_DOWNLOAD_URL = "https://raw.githubusercontent.com/89luca89/distrobox/main/install" | ||
|
||
export def generic_script_installation [yes: bool, program_name: string, installation_script: closure] { | ||
let log_file = $"/tmp/($program_name | str trim | str downcase)_install.log" | ||
touch $log_file | ||
echo $"Installing, please wait. You can check logs in ($log_file)" | ||
do $installation_script out> $log_file | ||
echo $"($program_name | str capitalize) installed successfuly! Please reload your shell and run this script again." | ||
} | ||
|
||
export def nix_installer [] { | ||
return { yes | curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install } | ||
} | ||
|
||
export def brew_installer [] { | ||
return { yes | /usr/libexec/brew-install ; echo "PLEASE IGNORE THE INSTRUCTIONS ABOVE. THEY WILL NOT HELP YOU! THE SYSTEM IS ALREADY CONFIGURED TO USE BREW PROPERLY BY DEFAULT :>"} | ||
} | ||
|
||
export def distrobox_installer [] { | ||
return { http get $DISTROBOX_DOWNLOAD_URL | pkexec sh } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.