Compare commits
16 commits
b4d7b076da
...
d0973ffcec
Author | SHA1 | Date | |
---|---|---|---|
Manuel Thalmann | d0973ffcec | ||
Manuel Thalmann | 661fbabfc0 | ||
Manuel Thalmann | 9be6b3622c | ||
Manuel Thalmann | 7dc9c2d8f0 | ||
Manuel Thalmann | 2260800e55 | ||
Manuel Thalmann | d86d7dba01 | ||
Manuel Thalmann | 82d741811f | ||
Manuel Thalmann | 1620173ae1 | ||
Manuel Thalmann | fa8dc4e5ef | ||
Manuel Thalmann | b8db73185c | ||
Manuel Thalmann | c9d6811353 | ||
Manuel Thalmann | 5c866d2ae6 | ||
Manuel Thalmann | f1a04a0a62 | ||
Manuel Thalmann | c69019b63c | ||
Manuel Thalmann | a60bdebb41 | ||
Manuel Thalmann | a2da56e72d |
44
lib/modules/packages/nextcloud.nix
Normal file
44
lib/modules/packages/nextcloud.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
|
||||
syncType = types.submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
remotePath = mkOption {
|
||||
type = types.str;
|
||||
description = "The path to the folder on the cloud to sync.";
|
||||
};
|
||||
|
||||
localPath = mkOption {
|
||||
type = types.str;
|
||||
description = "The path to sync the cloud content to.";
|
||||
};
|
||||
|
||||
virtualFiles = (mkEnableOption "virtual file support") // {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
});
|
||||
in {
|
||||
options = {
|
||||
valhalla.windows.users = mkOption {
|
||||
type = types.attrsOf (types.submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
nextcloud = {
|
||||
folderSyncs = mkOption {
|
||||
type = types.listOf syncType;
|
||||
description = "The folders to synchronize.";
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +1,10 @@
|
|||
{ config, lib, ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
|
||||
cfg = config.valhalla;
|
||||
capitalize = (import ../text.nix { inherit lib; }).capitalize;
|
||||
|
||||
userType = types.submodule (
|
||||
|
@ -65,18 +64,30 @@
|
|||
type = types.attrsOf linuxUserType;
|
||||
};
|
||||
|
||||
windows.users = mkOption {
|
||||
type = types.attrsOf winUserType;
|
||||
windows = mkOption {
|
||||
type = types.submoduleWith {
|
||||
modules = [
|
||||
({ config, options, ... }: {
|
||||
options = {
|
||||
users = mkOption {
|
||||
type = types.attrsOf winUserType;
|
||||
};
|
||||
|
||||
winUsers = mkOption {
|
||||
type = options.users.type;
|
||||
description = "Blablabla";
|
||||
default = (lib.attrsets.concatMapAttrs (
|
||||
name: options: {
|
||||
${capitalize name} = options // {
|
||||
groups = [];
|
||||
};
|
||||
}) config.users);
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
valhalla.windows.users = lib.mkForce (lib.attrsets.concatMapAttrs (
|
||||
name: options: {
|
||||
${capitalize name} = options // {
|
||||
groups = [];
|
||||
};
|
||||
}) cfg.users);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
in {
|
||||
imports = [
|
||||
./packages/git.nix
|
||||
./packages/nextcloud.nix
|
||||
./packages/oh-my-posh.nix
|
||||
./packages/rclone.nix
|
||||
./hardware.nix
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
linuxPercentage = 30;
|
||||
};
|
||||
|
||||
users.Manuel = {
|
||||
users.manuel = {
|
||||
microsoftAccount = true;
|
||||
groups = ["Administrators"];
|
||||
};
|
||||
|
|
|
@ -63,6 +63,26 @@
|
|||
};
|
||||
};
|
||||
|
||||
windows.users.manuel = {
|
||||
nextcloud = {
|
||||
folderSyncs =
|
||||
let
|
||||
localPath = "C:/tools/RetroArch-Win64";
|
||||
remotePath = "/Saved Games/RetroArch";
|
||||
in [
|
||||
{
|
||||
remotePath = "${remotePath}/Saves";
|
||||
localPath = "${localPath}/saves";
|
||||
virtualFiles = false;
|
||||
}
|
||||
{
|
||||
remotePath = "${remotePath}/System";
|
||||
localPath = "${localPath}/system";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
timeZone = "Europe/Zurich";
|
||||
keyMap = "de_CH-latin1";
|
||||
keyboardLayout = "ch";
|
||||
|
|
|
@ -164,6 +164,14 @@ $null = New-Module {
|
|||
return "valhalla.$($IsWindows ? "windows" : "linux")";
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets the name of the user root.
|
||||
#>
|
||||
function Get-UserRootName {
|
||||
return "$(Get-ConfigRootName).$($IsWindows ? "winUsers" : "users")";
|
||||
};
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets a user configuration.
|
||||
|
@ -182,7 +190,7 @@ $null = New-Module {
|
|||
)
|
||||
|
||||
if ((Get-Users) -contains $UserName) {
|
||||
Get-Config "$(Get-ConfigRootName).users.$UserName.$Name";
|
||||
Get-Config "$(Get-UserRootName).$UserName.$Name";
|
||||
} else {
|
||||
return $null;
|
||||
}
|
||||
|
@ -210,7 +218,7 @@ $null = New-Module {
|
|||
function Get-Users {
|
||||
[OutputType([string[]])]
|
||||
param()
|
||||
Get-Attributes "$(Get-ConfigRootName).users";
|
||||
Get-Attributes "$(Get-UserRootName)";
|
||||
}
|
||||
|
||||
<#
|
||||
|
|
|
@ -244,7 +244,7 @@ $null = New-Module {
|
|||
|
||||
& $installHandler @argumentList -Action ([InstallerAction]::Configure);
|
||||
|
||||
if (-not (Test-SetupUser)) {
|
||||
if ($UserConfigurator -and (-not (Test-SetupUser))) {
|
||||
& $installHandler @argumentList -Action ([InstallerAction]::ConfigureUser);
|
||||
}
|
||||
# ToDo: Automatically configure after installation
|
||||
|
|
|
@ -30,6 +30,27 @@ function Remove-DesktopIcon {
|
|||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Adds a new shortcut to the start menu.
|
||||
|
||||
.PARAMETER Name
|
||||
The name of the icon to create.
|
||||
|
||||
.PARAMETER Target
|
||||
The file to link to.
|
||||
#>
|
||||
function Add-StartMenuIcon {
|
||||
param(
|
||||
[string] $Name,
|
||||
[string] $Target
|
||||
)
|
||||
|
||||
Import-Module KnownFolders;
|
||||
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1";
|
||||
Install-ChocolateyShortcut -ShortcutFilePath "$((Get-KnownFolder "Common Programs").Path)/$Name.lnk" -TargetPath ((Get-Item $Target).FullName);
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Removes icons from the task bar.
|
||||
|
|
|
@ -34,7 +34,7 @@ Start-SoftwareInstaller @PSBoundParameters `
|
|||
$root = "$($IsWindows ? $env:AppData : "~/.config")/oh-my-posh";
|
||||
$path = Join-Path $root "$($theme.name).omp.json";
|
||||
$null = New-Item -Force -ItemType Directory $root;
|
||||
Copy-Item $theme.source $path;
|
||||
Set-Content $path (wsl cat $theme.source);
|
||||
$theme = [string] $path;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ $null = New-Module {
|
|||
Name = "$Name";
|
||||
Value = "$Value";
|
||||
} `
|
||||
".alias |= . + [{ name: env.Name, value: env.Value }]" `
|
||||
".alias |= [((. // [])[] | select(.name != env.Name))] + [{ name: env.Name, value: env.Value }]" `
|
||||
-User $User;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ $null = New-Module {
|
|||
Name = "$Name";
|
||||
Value = "$Value";
|
||||
} `
|
||||
".env |= . + [{ name: env.Name, value: env.Value }]" `
|
||||
".env |= [((. // [])[] | select(.name != env.Name))] + [{ name: env.Name, value: env.Value }]" `
|
||||
-User $User;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,28 +10,35 @@ begin
|
|||
function configureSW -V dir
|
||||
source "$dir/../bash/profile.fish"
|
||||
source "$dir/../fish/profile.fish"
|
||||
set -l file /etc/aliae/aliae.yml
|
||||
echo "export ALIAE_CONFIG=$(string escape "$file")" | sudo tee /etc/profile.d/aliae.sh > /dev/null
|
||||
set -l file (pwsh -CommandWithArgs '. $args[0]; Get-GlobalConfigPath' "$dir/Constants.ps1");
|
||||
sudo install -Dm644 "$dir/aliae.yml" "$file"
|
||||
|
||||
begin
|
||||
printf %s\n \
|
||||
"# aliae" \
|
||||
'eval "$(aliae init bash)"' \
|
||||
"if [ -f $(string escape $file) ]" \
|
||||
'then' \
|
||||
" eval \"\$(aliae init bash --config $(string escape $file))\"" \
|
||||
'fi' \
|
||||
'' \
|
||||
'if [ -n "$ALIAE_CONFIG" ] && [ -f "$ALIAE_CONFIG" ] || [ -f ~/.aliae.yaml ]' \
|
||||
'then' \
|
||||
' eval "$(aliae init bash)"' \
|
||||
'fi' \
|
||||
'' \
|
||||
'eval "$(aliae completion bash)"'
|
||||
end | installBashProfile "aliae" "aliae"
|
||||
|
||||
begin
|
||||
printf %s\n "" \
|
||||
"# aliae" \
|
||||
'eval "$(aliae init bash)"' \
|
||||
'eval "$(aliae completion bash)"'
|
||||
end | sudo tee /etc/skel/.bashrc > /dev/null
|
||||
|
||||
if type -q fish
|
||||
begin
|
||||
printf %s\n \
|
||||
"aliae init fish | source" \
|
||||
"if [ -f $(string escape $file) ]" \
|
||||
" eval \"\$(aliae init bash --config $(string escape $file))\"" \
|
||||
'end' \
|
||||
'' \
|
||||
'if [ -n "$ALIAE_CONFIG" ] && [ -f "$ALIAE_CONFIG" ] || [ -f ~/.aliae.yaml ]' \
|
||||
' aliae init fish | source' \
|
||||
'end' \
|
||||
'' \
|
||||
"aliae completion fish | source"
|
||||
end | installFishProfile "aliae" "aliae"
|
||||
end
|
||||
|
|
26
scripts/Common/Software/vscode/Main.ps1
Normal file
26
scripts/Common/Software/vscode/Main.ps1
Normal file
|
@ -0,0 +1,26 @@
|
|||
param(
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Scripts/SoftwareManagement.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-UserConfigurator {
|
||||
param(
|
||||
$Arguments
|
||||
)
|
||||
|
||||
$bins = @("codium", "codium-insiders", "code", "code-insiders");
|
||||
$extensions = @("zokugun.sync-settings", "zokugun.vsix-manager");
|
||||
$user = $Arguments.Name;
|
||||
|
||||
foreach ($bin in $bins) {
|
||||
if (Test-Command "$bin") {
|
||||
foreach ($extension in $extensions) {
|
||||
sudo -u "$user" "$bin" --install-extension "$extension";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
|
@ -2,19 +2,9 @@
|
|||
begin
|
||||
set -l dir (status dirname)
|
||||
source "$dir/../../Scripts/software.fish"
|
||||
source "$dir/../../../Common/Software/aliae/main.fish"
|
||||
|
||||
function userConfig -a name
|
||||
set -l bins codium codium-insiders code code-insiders
|
||||
set -l extensions zokugun.{sync-settings,vsix-manager}
|
||||
|
||||
for bin in $bins
|
||||
if type -q "$bin"
|
||||
for extension in $extensions
|
||||
sudo -u "$name" "$bin" --install-extension "$extension"
|
||||
end
|
||||
end
|
||||
end
|
||||
function userConfig -V dir -a name
|
||||
pwsh "$dir/Main.ps1" ConfigureUser;
|
||||
end
|
||||
|
||||
runInstaller $argv
|
||||
|
|
|
@ -181,6 +181,7 @@ $null = New-Module {
|
|||
Install-ChocoPackage selenium-gecko-driver firefox;
|
||||
|
||||
Invoke-Hook "Install-PSModules" -Fallback {
|
||||
Install-Module -Scope AllUsers -AcceptLicense -Force KnownFolders;
|
||||
Install-Module -Scope AllUsers -AcceptLicense -Force PSWindowsUpdate;
|
||||
Install-Module -Scope AllUsers -AcceptLicense -Force PSScriptAnalyzer;
|
||||
Install-Module -Scope AllUsers -AcceptLicense -AllowPrerelease -AllowClobber -Force LocalAccounts;
|
||||
|
@ -326,6 +327,10 @@ $null = New-Module {
|
|||
& "$commonSoftware/Terminal-Icons/Manage.ps1" @arguments;
|
||||
& "$softwarePath/Oh My Posh/Manage.ps1" @arguments;
|
||||
|
||||
if (Get-Config "valhalla.windows.dualboot") {
|
||||
& "$softwarePath/Ext4Fsd/Manage.ps1" @arguments;
|
||||
}
|
||||
|
||||
if ($install) {
|
||||
Install-ChocoPackage `
|
||||
procexp `
|
||||
|
@ -416,7 +421,7 @@ $null = New-Module {
|
|||
& "$softwarePath/MSEdgeRedirect/Manage.ps1" @arguments;
|
||||
|
||||
if (Test-Collection "fileSync") {
|
||||
& "$softwarePath/Nextcloud/Manage.ps1" @arguments;
|
||||
& "$softwarePath/Nextcloud/Main.ps1" @arguments;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -454,8 +459,7 @@ $null = New-Module {
|
|||
|
||||
if (Test-Collection "coding") {
|
||||
if ($install) {
|
||||
Install-ChocoPackage vscode -ArgumentList "--params","/NoDesktopIcon";
|
||||
Install-ChocoPackage vscodium -ArgumentList "--params","/NoDesktopIcon /AssociateWithFiles";
|
||||
& "$softwarePath/vscode/Main.ps1" @arguments;
|
||||
|
||||
Install-ChocoPackage `
|
||||
gh `
|
||||
|
|
12
scripts/Windows/Software/Ext4Fsd/Main.ps1
Normal file
12
scripts/Windows/Software/Ext4Fsd/Main.ps1
Normal file
|
@ -0,0 +1,12 @@
|
|||
param (
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Installer {
|
||||
Install-SetupPackage "https://github.com/bobranten/Ext4Fsd/releases/download/v0.71/Ext2Fsd-0.71-setup.exe";
|
||||
};
|
125
scripts/Windows/Software/Nextcloud/Main.ps1
Normal file
125
scripts/Windows/Software/Nextcloud/Main.ps1
Normal file
|
@ -0,0 +1,125 @@
|
|||
param(
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../Scripts/PowerManagement.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
|
||||
& {
|
||||
param($Parameters)
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets the path to the Nextcloud configuration file.
|
||||
#>
|
||||
function Get-ConfigFile {
|
||||
return "$env:APPDATA/Nextcloud/nextcloud.cfg";
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Adds a new nextcloud sync to the current user.
|
||||
#>
|
||||
function Add-NextcloudSync {
|
||||
param(
|
||||
[string] $RemotePath,
|
||||
[string] $LocalPath,
|
||||
[switch] $VirtualFiles
|
||||
)
|
||||
|
||||
Write-Host "Adding a Nextcloud sync";
|
||||
Write-Host "$RemotePath <=> $LocalPath";
|
||||
$configName = "Folders";
|
||||
$virtualName = "WithPlaceholders";
|
||||
$LocalPath = $LocalPath.Replace("\", "/");
|
||||
$RemotePath = $RemotePath.Replace("\", "/");
|
||||
$oldContent = Get-Content (Get-ConfigFile);
|
||||
$additionalSettings = @();
|
||||
$pattern = "^\d+\\$configName(?:$virtualName)?\\(\d+)";
|
||||
|
||||
$folderID = (
|
||||
$oldContent | `
|
||||
Where-Object { $_ -match "$pattern" } | `
|
||||
ForEach-Object { $_ -replace "$pattern.*$","`$1" } | `
|
||||
Sort-Object -Unique | `
|
||||
Measure-Object -Maximum).Maximum + 1;
|
||||
|
||||
if ($VirtualFiles.IsPresent) {
|
||||
$configName += $virtualName;
|
||||
$additionalSettings = @("0\$configName\$folderID\virtualFilesMode=wincfapi");
|
||||
}
|
||||
|
||||
$newSettings = (
|
||||
@(
|
||||
"0\$configName\$folderID\localPath=$LocalPath",
|
||||
"0\$configName\$folderID\targetPath=$RemotePath"
|
||||
) + $additionalSettings
|
||||
) -join "`n";
|
||||
|
||||
& {
|
||||
$accountSectionEntered = $false;
|
||||
$accountSectionLeft = $false;
|
||||
|
||||
for ($i = 0; $i -lt $oldContent.Count; $i++) {
|
||||
$line = $oldContent[$i];
|
||||
|
||||
if ($line -eq "[Accounts]") {
|
||||
$accountSectionEntered = $true;
|
||||
}
|
||||
|
||||
if ($line -eq "" -and $accountSectionEntered) {
|
||||
$accountSectionLeft = $true;
|
||||
$newSettings;
|
||||
}
|
||||
|
||||
$line;
|
||||
|
||||
if (
|
||||
(-not $accountSectionLeft) -and
|
||||
($i -eq ($oldContent.Count - 1))) {
|
||||
$newSettings;
|
||||
}
|
||||
}
|
||||
} | Set-Content (Get-ConfigFile);
|
||||
}
|
||||
|
||||
|
||||
Start-SoftwareInstaller @Parameters `
|
||||
-Installer {
|
||||
Install-ChocoPackage nextcloud-client -ArgumentList "-y","--params='/KeepUpdateCheck'";
|
||||
} `
|
||||
-UserConfigurator {
|
||||
param($Arguments)
|
||||
$user = $Arguments.Name;
|
||||
|
||||
& {
|
||||
$syncs = Get-UserConfig -UserName $user "nextcloud.folderSyncs";
|
||||
$configExists = { (Test-Path (Get-ConfigFile) ) };
|
||||
|
||||
if ($syncs.Count -gt 0) {
|
||||
if (-not (& $configExists)) {
|
||||
while (-not (& $configExists)) {
|
||||
Read-Host "Please log in to the Nextcloud app and hit enter to continue";
|
||||
|
||||
if (-not (& $configExists)) {
|
||||
Write-Error -ErrorAction Continue "The login seems to have failed. Please try again.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Stopping Nextcloud process";
|
||||
$nextcloudProcess = Get-Process nextcloud;
|
||||
$nextcloudPath = [string]$nextcloudProcess[0].Path;
|
||||
$nextcloudProcess | Stop-Process -Force;
|
||||
|
||||
foreach ($sync in $syncs) {
|
||||
Add-NextcloudSync -LocalPath $sync.localPath -RemotePath $sync.remotePath -VirtualFiles:$sync.virtualFiles;
|
||||
}
|
||||
|
||||
Write-Host "Restarting Nextcloud";
|
||||
Start-Process $nextcloudPath;
|
||||
}
|
||||
};
|
||||
};
|
||||
} $PSBoundParameters;
|
|
@ -1,32 +0,0 @@
|
|||
param(
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Installer {
|
||||
Install-ChocoPackage nextcloud-client -ArgumentList "-y","--params='/KeepUpdateCheck'";
|
||||
} `
|
||||
-UserConfigurator {
|
||||
if (-not (Test-Path $context.GetNextcloudConfigFile())) {
|
||||
Write-Information "Setting up Nextcloud configuration";
|
||||
|
||||
Write-Information "Ensuring all Let's Encrypt certificates are cached";
|
||||
$null = Invoke-WebRequest https://valid-isrgrootx1.letsencrypt.org/;
|
||||
|
||||
while (-not (Test-Path $context.GetNextcloudConfigFile())) {
|
||||
Write-Host "Nextcloud has been installed!";
|
||||
Read-Host "Please log in in the Nextcloud app and hit enter to continue";
|
||||
|
||||
if (-not (Test-Path $context.GetNextcloudConfigFile())) {
|
||||
Write-Error "The login seems to have failed. Please try again.";
|
||||
}
|
||||
}
|
||||
|
||||
$context.Reboot();
|
||||
exit;
|
||||
}
|
||||
};
|
||||
|
|
@ -4,12 +4,14 @@ param(
|
|||
)
|
||||
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Installer {
|
||||
Install-ChocoPackage retroarch;
|
||||
# ToDo: Add start menu shortcut
|
||||
# ToDo: Add function for this purpose
|
||||
} `
|
||||
-Configurator {
|
||||
Add-StartMenuIcon "RetroArch" "C:\tools\RetroArch-Win64\retroarch.exe";
|
||||
};
|
||||
|
||||
# ToDo: Add restoration
|
||||
|
|
|
@ -12,10 +12,10 @@ Start-SoftwareInstaller @PSBoundParameters `
|
|||
Write-Information "Enabling the ``$feature`` feature…";
|
||||
choco install --source windowsFeatures -y $feature;
|
||||
}
|
||||
|
||||
Install-WingetPackage Nadeo.TrackManiaNationsForever;
|
||||
Remove-DesktopIcon "*TmNationsForever*";
|
||||
}
|
||||
|
||||
Install-WingetPackage Nadeo.TrackManiaNationsForever;
|
||||
Remove-DesktopIcon "*TmNationsForever*";
|
||||
};
|
||||
|
||||
# ToDo: Add restoration
|
||||
|
|
|
@ -11,10 +11,6 @@ param(
|
|||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
-Installer {
|
||||
param(
|
||||
[scriptblock] $Installer
|
||||
)
|
||||
|
||||
Install-ChocoPackage winscp;
|
||||
} `
|
||||
-Configurator {
|
||||
|
|
|
@ -7,9 +7,10 @@ param (
|
|||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
|
||||
& {
|
||||
param($Parameters)
|
||||
$base = "$PSScriptRoot/../../../Common/Software/aliae/Manage.ps1";
|
||||
|
||||
Start-SoftwareInstaller @PSBoundParameters `
|
||||
Start-SoftwareInstaller @Parameters `
|
||||
-Installer {
|
||||
Install-WingetPackage JanDeDobbeleer.Aliae;
|
||||
} `
|
||||
|
@ -19,4 +20,4 @@ param (
|
|||
-UserConfigurator {
|
||||
. $base -Action ([InstallerAction]::ConfigureUser);
|
||||
};
|
||||
};
|
||||
} $PSBoundParameters;
|
||||
|
|
|
@ -17,10 +17,6 @@ param (
|
|||
|
||||
Start-SoftwareInstaller @Parameters `
|
||||
-Installer {
|
||||
param(
|
||||
[scriptblock] $Installer
|
||||
)
|
||||
|
||||
$params = "/WindowsTerminalProfile";
|
||||
$defaultBranch = Get-Config "valhalla.git.defaultBranch";
|
||||
|
||||
|
|
28
scripts/Windows/Software/vscode/Main.ps1
Normal file
28
scripts/Windows/Software/vscode/Main.ps1
Normal file
|
@ -0,0 +1,28 @@
|
|||
param(
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
& {
|
||||
param (
|
||||
[hashtable] $Parameters
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
$base = "$PSScriptRoot/../../../Common/Software/vscode/Main.ps1";
|
||||
|
||||
Start-SoftwareInstaller @Parameters `
|
||||
-Installer {
|
||||
Install-ChocoPackage vscode -ArgumentList "--params","/NoDesktopIcon";
|
||||
Install-ChocoPackage vscodium -ArgumentList "--params","/NoDesktopIcon /AssociateWithFiles";
|
||||
refreshenv;
|
||||
} `
|
||||
-UserConfigurator {
|
||||
param(
|
||||
$Arguments
|
||||
)
|
||||
|
||||
& $base ([InstallerAction]::ConfigureUser) @PSBoundParameters;
|
||||
};
|
||||
} $PSBoundParameters;
|
Loading…
Reference in a new issue