-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug.go
142 lines (125 loc) · 3.98 KB
/
debug.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
* Automated Arch Linux Tools
* Copyright (C) 2022 Anthony Dardano (ShobuPrime)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ShobuArch is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package main
import (
"fmt"
conf "github.com/ShobuPrime/ShobuArch/pkg/config"
// i "github.com/ShobuPrime/ShobuArch/pkg/install"
u "github.com/ShobuPrime/ShobuArch/pkg/util"
)
func debug() {
// Change values as you'd like here, and call relevant functions below
cdb := conf.Config{
Format: "YAML",
Bootloader: "",
Kernel: "linux-zen",
Hostname: "",
Timezone: "",
Modules: []string{``},
User: conf.User{
Username: "shobuprime",
Password: "demo",
Language: conf.Language{
Locale: "en_US.UTF-8",
CharSet: "UTF-8",
Keyboard: "us",
},
},
Storage: conf.Storage{
SystemDisk: "",
SystemDiskID: "",
MirrorInstall: false,
MirrorDisk: "",
MirrorDiskID: "",
Filesystem: "",
EncryptionKey: "",
EncryptionUUID: "",
},
Desktop: conf.Desktop{
Environment: "",
InstallType: "",
},
Pacman: conf.Pacman{
AUR: conf.AURs{
Helper: "",
Packages: []string{``},
},
Packages: []string{
`keepassxc`,
},
},
Flatpak: conf.Flatpaks{
Packages: []string{
`com.brave.Browser`,
`com.microsoft.Edge`,
`com.synology.SynologyDrive`,
},
},
PWA: conf.PWAs{
Sites: []conf.Site{
{
Name: "Messages",
Description: "Simple, helpful messaging by Google",
StartUrl: "https://messages.google.com/web",
Manifest: "manifest.json",
},
{
Name: "YouTube",
Description: "Share your videos with friends, family, and the world.",
StartUrl: "https://www.youtube.com",
Manifest: "manifest.webmanifest",
},
},
},
}
_ = cdb
// Call functions you would like to test
fmt.Println(u.PrettyJson(u.ListUSB()))
// u.BiometricIDs()
// i.SetupBiometrics(&cdb)
// fmt.Println(u.PrettyJson(u.ListPCI()))
// fmt.Println(u.PrettyJson(u.SecureBootStatus()))
// i.UserPWAs(&cdb)
}
/*
--Generate Keyfile: https://wiki.archlinux.org/title/Dm-crypt/Device_encryption#Keyfiles
dd if=/dev/random of=/.luks/.ata-<drive>-part1 bs=32 count=1
cryptsetup luksAddKey /dev/sda1 /.luks/<key_file>.key
--Get UUID of parent partition
lsblk -dno UUID /dev/sda1
--Add entry to /etc/crypttab: https://kifarunix.com/automount-luks-encrypted-device-in-linux/
# <name> <device> <password> <options>
luks_DATA UUID=<uuid> /.luks/ata-<drive>-part1
--Get UUID of encryped partition (Open device if not done so already)
cryptsetup open /dev/disk/by-id/ata-<drive>-part1 luks_DATA --key-file /.luks/ata-<drive>-part1
mount -o rw,noatime,compress=zstd:3,ssd,discard,space_cache=v2,commit=120,subvol=@ /dev/mapper/luks_DATA /mnt/ata-<drive>-part1
lsblk -dno UUID /dev/mapper/luks_DATA
--Print new fstab and verify if it looks ok before saving
genfstab -U /
--Unmount encrypted drive and run the following to verify if done correctly
mount -av
VSCode install extensions from CMD line (online):
code --list-extensions
golang.go
ms-python.python
ms-azuretools.vscode-docker
shardulm94.trailing-spaces
code --install-extension <name>
https://stackoverflow.com/questions/37071388/how-can-i-install-visual-studio-code-extensions-offline#38866913
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/2022.19.13351014/vspackage
*/