@hurshb50/setup-ubuntu 2.0.5 → 3.0.1
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.
- package/README.md +30 -1
- package/distribution/assets/zed/settings.json +4 -0
- package/distribution/setup-ubuntu.mjs +41 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,8 +18,37 @@ Vite+ defaults to pnpm, which can hold back freshly published releases. The setu
|
|
|
18
18
|
Open a new terminal, then:
|
|
19
19
|
|
|
20
20
|
- Log out and back in to use Docker without `sudo`.
|
|
21
|
-
- Sign in to Zed, 1Password, and
|
|
21
|
+
- Sign in to Zed, 1Password, and Brave.
|
|
22
22
|
- Run `gh auth login` to authenticate the GitHub CLI.
|
|
23
23
|
- Pick a wallpaper in HydraPaper.
|
|
24
24
|
- Put personal shell config in `~/.custom.bashrc`, not `~/.bashrc`.
|
|
25
25
|
- Update `/.gitconfig` if you are on work machine
|
|
26
|
+
|
|
27
|
+
## Removing Chrome
|
|
28
|
+
|
|
29
|
+
The setup installs Brave and leaves Chrome untouched. To remove Chrome completely, run:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
dpkg-query -W -f='${Package}\n' 'google-chrome-*' | xargs -r sudo apt-get purge -y
|
|
33
|
+
|
|
34
|
+
sudo rm -rf \
|
|
35
|
+
/etc/apt/sources.list.d/google-chrome.list \
|
|
36
|
+
/etc/apt/sources.list.d/google-chrome.sources \
|
|
37
|
+
/etc/apt/trusted.gpg.d/google-chrome.gpg \
|
|
38
|
+
/usr/share/keyrings/google-chrome.gpg \
|
|
39
|
+
/etc/opt/chrome \
|
|
40
|
+
/opt/google/chrome \
|
|
41
|
+
/usr/share/applications/google-chrome.desktop \
|
|
42
|
+
/usr/share/applications/google-chrome-beta.desktop \
|
|
43
|
+
/usr/share/applications/google-chrome-unstable.desktop
|
|
44
|
+
|
|
45
|
+
rm -rf \
|
|
46
|
+
~/.config/google-chrome \
|
|
47
|
+
~/.cache/google-chrome \
|
|
48
|
+
~/.config/google-chrome-beta \
|
|
49
|
+
~/.cache/google-chrome-beta \
|
|
50
|
+
~/.config/google-chrome-unstable \
|
|
51
|
+
~/.cache/google-chrome-unstable
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This deletes Chrome profiles and caches. Back them up first if needed.
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
"model": "deepseek-flash",
|
|
8
8
|
"provider": "deepseek"
|
|
9
9
|
},
|
|
10
|
+
"dock": "right",
|
|
10
11
|
"enable_feedback": false,
|
|
11
12
|
"notify_when_agent_waiting": "never",
|
|
12
13
|
"sandbox_permissions": { "allow_unsandboxed": true, "allow_all_hosts": true, "allow_fs_write_all": true },
|
|
13
14
|
"thinking_display": "always_collapsed",
|
|
15
|
+
"threads_sidebar": { "position": "right" },
|
|
14
16
|
"tool_permissions": { "default": "allow" }
|
|
15
17
|
},
|
|
16
18
|
"agent_buffer_font_family": "Comic Code Ligatures",
|
|
@@ -51,6 +53,7 @@
|
|
|
51
53
|
}
|
|
52
54
|
},
|
|
53
55
|
"git_panel": {
|
|
56
|
+
"dock": "left",
|
|
54
57
|
"tree_view": true
|
|
55
58
|
},
|
|
56
59
|
"gutter": {
|
|
@@ -73,6 +76,7 @@
|
|
|
73
76
|
"project_panel": {
|
|
74
77
|
"auto_fold_dirs": false,
|
|
75
78
|
"bold_folder_labels": false,
|
|
79
|
+
"dock": "left",
|
|
76
80
|
"folder_indicator": "icon",
|
|
77
81
|
"git_status": false,
|
|
78
82
|
"hide_gitignore": false,
|
|
@@ -11,7 +11,7 @@ import util from "util";
|
|
|
11
11
|
import childProcess from "child_process";
|
|
12
12
|
//#region package.json
|
|
13
13
|
var name = "@hurshb50/setup-ubuntu";
|
|
14
|
-
var version = "
|
|
14
|
+
var version = "3.0.0";
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region source/modules/logger/logger.ts
|
|
17
17
|
var Logger = class Logger {
|
|
@@ -367,28 +367,48 @@ var Browser = class {
|
|
|
367
367
|
const task = new Task("Browser");
|
|
368
368
|
context.logger.add(task);
|
|
369
369
|
task.start();
|
|
370
|
-
const dependencies = ["
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
370
|
+
const dependencies = ["brave-browser"];
|
|
371
|
+
const isInstalled = await context.dependencyManager.isInstalled(dependencies);
|
|
372
|
+
const keyringFilePath = path.join("/", "usr", "share", "keyrings", "brave-browser-archive-keyring.gpg");
|
|
373
|
+
const sourceFilePath = path.join("/", "etc", "apt", "sources.list.d", "brave-browser-release.sources");
|
|
374
|
+
const sourceFilePaths = [keyringFilePath, sourceFilePath];
|
|
375
|
+
const sourceFilesExist = (await Promise.all(sourceFilePaths.map(async (filePath) => {
|
|
376
|
+
const statistics = await fs.stat(filePath, { throwIfNoEntry: false });
|
|
377
|
+
return statistics !== void 0 && statistics.size > 0;
|
|
378
|
+
}))).every(Boolean);
|
|
379
|
+
if (!isInstalled || !sourceFilesExist) {
|
|
380
|
+
task.continue("Update package manager");
|
|
381
|
+
await context.dependencyManager.update(task);
|
|
382
|
+
const systemDependencies = ["curl", "unattended-upgrades"];
|
|
383
|
+
task.continue(`Installing dependencies: ${systemDependencies.join(", ")}`);
|
|
384
|
+
await context.dependencyManager.install(systemDependencies, task);
|
|
385
|
+
task.continue("Set up Brave sources");
|
|
386
|
+
const exec = util.promisify(childProcess.exec);
|
|
387
|
+
await exec(`sudo curl -fsSLo ${keyringFilePath} https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg`);
|
|
388
|
+
await exec(`sudo curl -fsSLo ${sourceFilePath} https://brave-browser-apt-release.s3.brave.com/brave-browser.sources`);
|
|
389
|
+
await exec(`sudo rm -f /etc/apt/sources.list.d/brave-browser-*.list`);
|
|
390
|
+
task.continue("Update package manager");
|
|
391
|
+
await context.dependencyManager.update(task);
|
|
392
|
+
if (!isInstalled) {
|
|
393
|
+
task.continue(`Installing dependencies: ${dependencies.join(", ")}`);
|
|
394
|
+
await context.dependencyManager.install(dependencies, task);
|
|
395
|
+
}
|
|
374
396
|
}
|
|
375
|
-
|
|
376
|
-
await context.dependencyManager.update(task);
|
|
377
|
-
const systemDependencies = ["gnupg"];
|
|
378
|
-
task.continue(`Installing dependencies: ${systemDependencies.join(", ")}`);
|
|
379
|
-
await context.dependencyManager.install(systemDependencies, task);
|
|
380
|
-
const keyringFilePath = path.join("/", "usr", "share", "keyrings", "google-chrome.gpg");
|
|
381
|
-
const sourceFilePath = path.join("/", "etc", "apt", "sources.list.d", "google-chrome.list");
|
|
382
|
-
task.continue("Set up google chrome sources");
|
|
383
|
-
const exec = util.promisify(childProcess.exec);
|
|
384
|
-
await exec(`curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor --yes -o ${keyringFilePath}`);
|
|
385
|
-
await exec(`echo 'deb [arch=amd64 signed-by=${keyringFilePath}] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee ${sourceFilePath} > /dev/null`);
|
|
386
|
-
task.continue("Update package manager");
|
|
387
|
-
await context.dependencyManager.update(task);
|
|
388
|
-
task.continue(`Installing dependencies: ${dependencies.join(", ")}`);
|
|
389
|
-
await context.dependencyManager.install(dependencies, task);
|
|
397
|
+
await this.configureAutomaticUpdates(context, task);
|
|
390
398
|
task.finish();
|
|
391
399
|
}
|
|
400
|
+
async configureAutomaticUpdates(context, task) {
|
|
401
|
+
const dependencies = ["unattended-upgrades"];
|
|
402
|
+
if (!await context.dependencyManager.isInstalled(dependencies)) {
|
|
403
|
+
task.continue("Update package manager");
|
|
404
|
+
await context.dependencyManager.update(task);
|
|
405
|
+
task.continue(`Installing dependencies: ${dependencies.join(", ")}`);
|
|
406
|
+
await context.dependencyManager.install(dependencies, task);
|
|
407
|
+
}
|
|
408
|
+
const configurationFilePath = path.join("/", "etc", "apt", "apt.conf.d", "51unattended-upgrades-brave");
|
|
409
|
+
task.continue("Configure automatic updates");
|
|
410
|
+
await util.promisify(childProcess.exec)(`printf '%s\\n' 'Unattended-Upgrade::Allowed-Origins {' ' "Brave Software:stable";' '};' | sudo tee ${configurationFilePath} > /dev/null`);
|
|
411
|
+
}
|
|
392
412
|
};
|
|
393
413
|
//#endregion
|
|
394
414
|
//#region source/modules/clipboard/clipboard.ts
|
|
@@ -744,7 +764,7 @@ program.name(name).version(version).description("Sets up a fresh Ubuntu machine
|
|
|
744
764
|
assets: path.join(import.meta.dirname, "assets"),
|
|
745
765
|
home: os.homedir()
|
|
746
766
|
};
|
|
747
|
-
const installations = packages.map((
|
|
767
|
+
const installations = packages.map((entry) => entry.install({
|
|
748
768
|
dependencyManager,
|
|
749
769
|
directories,
|
|
750
770
|
logger
|