Store app configs under programs
This commit is contained in:
parent
95d079bcaf
commit
561ac46073
11 changed files with 80 additions and 72 deletions
|
@ -40,13 +40,13 @@ let
|
|||
in {
|
||||
options = {
|
||||
valhalla = {
|
||||
git = gitOption;
|
||||
programs.git = gitOption;
|
||||
|
||||
users = mkOption {
|
||||
type = types.attrsOf (types.submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
git = gitOption;
|
||||
programs.git = gitOption;
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@ in {
|
|||
type = types.attrsOf (types.submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
nextcloud = {
|
||||
programs.nextcloud = {
|
||||
folderSyncs = mkOption {
|
||||
type = types.listOf syncType;
|
||||
description = "The folders to synchronize.";
|
||||
|
|
|
@ -40,7 +40,7 @@ in {
|
|||
type = types.attrsOf (types.submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
oh-my-posh = mkOption {
|
||||
programs.oh-my-posh = mkOption {
|
||||
type = ompType;
|
||||
description = "The Oh My Posh configuration to apply.";
|
||||
default = { };
|
||||
|
|
|
@ -23,7 +23,7 @@ in {
|
|||
type = types.attrsOf (types.submodule (
|
||||
{ ... }: {
|
||||
options = {
|
||||
rclone = {
|
||||
programs.rclone = {
|
||||
configurations = mkOption {
|
||||
type = types.attrsOf syncType;
|
||||
description = "The configurations of the rclone mounts.";
|
||||
|
|
|
@ -45,6 +45,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
git = let defaultBranch = "main";
|
||||
in {
|
||||
inherit defaultBranch;
|
||||
|
@ -86,4 +87,5 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,12 +7,14 @@
|
|||
displayName = "Manuel Thalmann";
|
||||
mailAddress = "m@nuth.ch";
|
||||
|
||||
programs = {
|
||||
oh-my-posh = {
|
||||
theme = {
|
||||
source = ./manuel.omp.json;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
linux.users.manuel = {
|
||||
defaultShell = "fish";
|
||||
|
@ -22,6 +24,7 @@
|
|||
"nix-users"
|
||||
];
|
||||
|
||||
programs = {
|
||||
rclone = {
|
||||
configurations = {
|
||||
nextcloud = {
|
||||
|
@ -35,8 +38,10 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
windows.users.manuel = {
|
||||
programs = {
|
||||
nextcloud = {
|
||||
folderSyncs = let
|
||||
localPath = "C:/tools/RetroArch-Win64";
|
||||
|
@ -56,4 +61,5 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
$configArgs = @("--system");
|
||||
}
|
||||
|
||||
$config = & $getConfig "git";
|
||||
$config = & $getConfig "programs.git";
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
|
|
|
@ -23,7 +23,7 @@ Start-SoftwareInstaller @args `
|
|||
)
|
||||
|
||||
$user = $Arguments.Name;
|
||||
$theme = Get-UserConfig -UserName "$user" "oh-my-posh.theme";
|
||||
$theme = Get-UserConfig -UserName "$user" "programs.oh-my-posh.theme";
|
||||
|
||||
function New-Theme {
|
||||
param($info)
|
||||
|
@ -52,7 +52,7 @@ Start-SoftwareInstaller @args `
|
|||
return $path;
|
||||
}
|
||||
|
||||
foreach ($additionalTheme in (Get-UserConfig -UserName "$user" "oh-my-posh.additionalThemes")) {
|
||||
foreach ($additionalTheme in (Get-UserConfig -UserName "$user" "programs.oh-my-posh.additionalThemes")) {
|
||||
Write-Host "creating theme $additionalTheme";
|
||||
$null = New-Theme $additionalTheme;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ begin
|
|||
|
||||
function userConfig -V dir -a name
|
||||
source "$dir/../../Scripts/config.fish"
|
||||
set -l key "rclone.configurations"
|
||||
set -l key "programs.rclone.configurations"
|
||||
set -l configs (getUserConfig "$name" "$key" --apply "builtins.attrNames" --json)
|
||||
|
||||
if [ (echo "$configs" | jq "length") -gt 0 ]
|
||||
|
|
|
@ -7,7 +7,7 @@ Start-SoftwareInstaller @args `
|
|||
-Inherit "$PSScriptRoot/../../../Common/Software/git/Main.ps1" `
|
||||
-Installer {
|
||||
$params = "/WindowsTerminalProfile";
|
||||
$defaultBranch = Get-OSConfig "git.defaultBranch";
|
||||
$defaultBranch = Get-OSConfig "programs.git.defaultBranch";
|
||||
|
||||
if ($defaultBranch) {
|
||||
$params += " /DefaultBranchName:`"$defaultBranch`"";
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
$user = $Arguments.Name;
|
||||
|
||||
& {
|
||||
$syncs = Get-UserConfig -UserName $user "nextcloud.folderSyncs";
|
||||
$syncs = Get-UserConfig -UserName $user "programs.nextcloud.folderSyncs";
|
||||
$configExists = { (Test-Path (Get-ConfigFile) ) };
|
||||
|
||||
if ($syncs.Count -gt 0) {
|
||||
|
|
Loading…
Reference in a new issue