diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/domain/ProvisionWorkplace.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/domain/ProvisionWorkplace.kt index e94bf56..2d832f7 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/domain/ProvisionWorkplace.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/domain/ProvisionWorkplace.kt @@ -34,7 +34,9 @@ fun Prov.provisionWorkplace( throw Exception("Current user ${whoami()} cannot execute sudo without entering a password! This is necessary to execute provisionWorkplace") } - aptInstall("ssh gnupg curl git") + aptInstall(KEY_MANAGEMENT) + aptInstall(VERSION_MANAGEMENT) + aptInstall(NETWORK_TOOLS) provisionKeys(gpg, ssh) provisionGit(gitUserName ?: whoami(), gitEmail, gpg?.let { gpgFingerprint(it.publicKey.plain()) }) @@ -50,24 +52,26 @@ fun Prov.provisionWorkplace( configureNoSwappiness() - installBash() + configureBash() if (workplaceType == WorkplaceType.OFFICE || workplaceType == WorkplaceType.IDE) { - aptInstall("seahorse") + aptInstall(KEY_MANAGEMENT_GUI) aptInstall(BASH_UTILS) aptInstall(OS_ANALYSIS) aptInstall(ZIP_UTILS) - aptInstall("firefox chromium-browser") - aptInstall("thunderbird libreoffice") - aptInstall("xclip") + aptInstall(BROWSER) + aptInstall(EMAIL_CLIENT) + aptInstall(OFFICE_SUITE) + aptInstall(CLIP_TOOLS) installZimWiki() installGopass() aptInstallFromPpa("nextcloud-devs", "client", "nextcloud-client") - aptInstall("inkscape") - aptInstall("dia") + optional() { + aptInstall(DRAWING_TOOLS) + } aptInstall(SPELLCHECKING_DE) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/Bash.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/Bash.kt index 85b448c..2b72118 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/Bash.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/Bash.kt @@ -7,7 +7,7 @@ import org.domaindrivenarchitecture.provs.ubuntu.install.base.aptInstall import java.io.File -fun Prov.installBash() = def { +fun Prov.configureBash() = def { configureBashForUser() } diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/PackageBundles.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/PackageBundles.kt index 77a29f9..be88fcb 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/PackageBundles.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/workplace/infrastructure/PackageBundles.kt @@ -1,5 +1,21 @@ package org.domaindrivenarchitecture.provs.workplace.infrastructure +val KEY_MANAGEMENT = "ssh gnupg" + +val VERSION_MANAGEMENT = "git" + +val NETWORK_TOOLS = "curl wget" + +val KEY_MANAGEMENT_GUI = "seahorse" + +val BROWSER = "firefox chromium-browser" + +val EMAIL_CLIENT = "thunderbird" + +val OFFICE_SUITE = "libreoffice" + +val CLIP_TOOLS = "xclip" + val OS_ANALYSIS = "lsof strace ncdu iptraf htop iotop iftop" val ZIP_UTILS = "p7zip-rar p7zip-full rar unrar zip unzip" @@ -14,4 +30,6 @@ val OPENCONNECT = "openconnect network-manager-openconnect network-manager-openc val VPNC = "vpnc network-manager-vpnc network-manager-vpnc-gnome vpnc-scripts" -val JAVA_JDK = "openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk" \ No newline at end of file +val JAVA_JDK = "openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk" + +val DRAWING_TOOLS = "inkscape dia" \ No newline at end of file