diff --git a/lib/modules/packages/git.nix b/lib/modules/packages/git.nix index 576fbece..ac18d1e7 100644 --- a/lib/modules/packages/git.nix +++ b/lib/modules/packages/git.nix @@ -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; }; })); }; diff --git a/lib/modules/packages/nextcloud.nix b/lib/modules/packages/nextcloud.nix index dce0e09f..7e9bac14 100644 --- a/lib/modules/packages/nextcloud.nix +++ b/lib/modules/packages/nextcloud.nix @@ -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."; diff --git a/lib/modules/packages/oh-my-posh.nix b/lib/modules/packages/oh-my-posh.nix index eb9f7ab0..713c4b93 100644 --- a/lib/modules/packages/oh-my-posh.nix +++ b/lib/modules/packages/oh-my-posh.nix @@ -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 = { }; diff --git a/lib/modules/packages/rclone.nix b/lib/modules/packages/rclone.nix index 90c56d6a..375effd4 100644 --- a/lib/modules/packages/rclone.nix +++ b/lib/modules/packages/rclone.nix @@ -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."; diff --git a/profiles/machines/manuel/Generic/config.nix b/profiles/machines/manuel/Generic/config.nix index 54f3c882..b67a6b07 100644 --- a/profiles/machines/manuel/Generic/config.nix +++ b/profiles/machines/manuel/Generic/config.nix @@ -45,43 +45,45 @@ in { }; }; - git = let defaultBranch = "main"; - in { - inherit defaultBranch; + programs = { + git = let defaultBranch = "main"; + in { + inherit defaultBranch; - flow = { - mainBranch = defaultBranch; - devBranch = "dev"; - }; + flow = { + mainBranch = defaultBranch; + devBranch = "dev"; + }; - aliases = { - ahfange = "init"; - tuedezue = "add"; - beschuldig = "blame"; - zieh = "pull"; - druck = "push"; - machnah = "clone"; - hol = "fetch"; - zwiigab = "branch"; - buechiih = "commit"; - eich = "rebase"; - erd = "rebase"; - gahufwiifelde = "rebase"; - vergliich = "diff"; - tuezemme = "merge"; - versorg = "stash"; - markier = "tag"; - pflueckoepfel = "cherry-pick"; - pflueckhimbeeri = "cherry-pick"; - buechuus = "checkout"; - quaetsch = "merge --squash"; - pfudle = "push --force"; - beschuldigung = "blame"; - zwiigli = "branch"; - tagebuech = "log"; - versteck = "stash"; - zuestand = "status"; - markierig = "tag"; + aliases = { + ahfange = "init"; + tuedezue = "add"; + beschuldig = "blame"; + zieh = "pull"; + druck = "push"; + machnah = "clone"; + hol = "fetch"; + zwiigab = "branch"; + buechiih = "commit"; + eich = "rebase"; + erd = "rebase"; + gahufwiifelde = "rebase"; + vergliich = "diff"; + tuezemme = "merge"; + versorg = "stash"; + markier = "tag"; + pflueckoepfel = "cherry-pick"; + pflueckhimbeeri = "cherry-pick"; + buechuus = "checkout"; + quaetsch = "merge --squash"; + pfudle = "push --force"; + beschuldigung = "blame"; + zwiigli = "branch"; + tagebuech = "log"; + versteck = "stash"; + zuestand = "status"; + markierig = "tag"; + }; }; }; }; diff --git a/profiles/users/manuel/config.nix b/profiles/users/manuel/config.nix index 7388f443..3a3d2276 100644 --- a/profiles/users/manuel/config.nix +++ b/profiles/users/manuel/config.nix @@ -7,9 +7,11 @@ displayName = "Manuel Thalmann"; mailAddress = "m@nuth.ch"; - oh-my-posh = { - theme = { - source = ./manuel.omp.json; + programs = { + oh-my-posh = { + theme = { + source = ./manuel.omp.json; + }; }; }; }; @@ -22,36 +24,40 @@ "nix-users" ]; - rclone = { - configurations = { - nextcloud = { - dirName = "Nextcloud"; - }; + programs = { + rclone = { + configurations = { + nextcloud = { + dirName = "Nextcloud"; + }; - proton = { - dirName = "Proton"; - cacheDuration = "2w"; + proton = { + dirName = "Proton"; + cacheDuration = "2w"; + }; }; }; }; }; 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"; - } - ]; + programs = { + 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"; + } + ]; + }; }; }; }; diff --git a/scripts/Common/Software/git/Main.ps1 b/scripts/Common/Software/git/Main.ps1 index 57bbce37..048913f5 100644 --- a/scripts/Common/Software/git/Main.ps1 +++ b/scripts/Common/Software/git/Main.ps1 @@ -21,7 +21,7 @@ $configArgs = @("--system"); } - $config = & $getConfig "git"; + $config = & $getConfig "programs.git"; <# .SYNOPSIS diff --git a/scripts/Common/Software/oh-my-posh/Main.ps1 b/scripts/Common/Software/oh-my-posh/Main.ps1 index b00797e8..397be6a1 100644 --- a/scripts/Common/Software/oh-my-posh/Main.ps1 +++ b/scripts/Common/Software/oh-my-posh/Main.ps1 @@ -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; } diff --git a/scripts/Common/Software/rclone/main.fish b/scripts/Common/Software/rclone/main.fish index 01a292d6..75afceb6 100755 --- a/scripts/Common/Software/rclone/main.fish +++ b/scripts/Common/Software/rclone/main.fish @@ -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 ] diff --git a/scripts/Windows/Software/git/Main.ps1 b/scripts/Windows/Software/git/Main.ps1 index 338e454b..109dc777 100644 --- a/scripts/Windows/Software/git/Main.ps1 +++ b/scripts/Windows/Software/git/Main.ps1 @@ -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`""; diff --git a/scripts/Windows/Software/nextcloud/Main.ps1 b/scripts/Windows/Software/nextcloud/Main.ps1 index 8be965cf..afe002db 100644 --- a/scripts/Windows/Software/nextcloud/Main.ps1 +++ b/scripts/Windows/Software/nextcloud/Main.ps1 @@ -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) {