fork/home-manager
git clone https://git.julia.blue/fork/home-manager
af715ed8
master
1{ pkgs , ...} : 2 3let 4 5tasksFilePath = if pkgs . stdenv . hostPlatform . isDarwin then 6"Library/Application Support/Code/User/tasks.json" 7else 8".config/Code/User/tasks.json" ; 9 10tasks = { 11version = "2.0.0" ; 12tasks = [{ 13type = "shell" ; 14label = "Hello task" ; 15command = "hello" ; 16}]; 17}; 18 19expectedTasks = pkgs . writeText "tasks-expected.json" '' 20{ 21"tasks": [ 22{ 23"command": "hello", 24"label": "Hello task", 25"type": "shell" 26} 27], 28"version": "2.0.0" 29} 30'' ; 31 32in { 33programs . vscode = { 34enable = true ; 35package = pkgs . writeScriptBin "vscode" "" // { pname = "vscode" ; }; 36userTasks = tasks ; 37}; 38 39nmt . script = '' 40assertFileExists "home-files/ ${ tasksFilePath } " 41assertFileContent " home-files/ ${ tasksFilePath } " " ${ expectedTasks } " 42'' ; 43}