kubecolor: clean up the handling of config path
This commit is contained in:
parent
94597e670f
commit
1dc235b2fb
4 changed files with 15 additions and 29 deletions
|
|
@ -1,8 +1,5 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
let
|
||||
configDir = if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
|
||||
in
|
||||
{
|
||||
programs.kubecolor = {
|
||||
enable = true;
|
||||
|
|
@ -13,6 +10,7 @@ in
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists 'home-files/${configDir}/kube/color.yaml'
|
||||
assertPathNotExists 'home-files/.kube/color.yaml'
|
||||
assertPathNotExists 'home-files/.config/kubecolor.yaml'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
let
|
||||
configDir = if pkgs.stdenv.isDarwin then "Library/Application Support/kube" else ".kube";
|
||||
in
|
||||
{
|
||||
programs.kubecolor = {
|
||||
enable = true;
|
||||
|
|
@ -20,8 +17,8 @@ in
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists 'home-files/${configDir}/color.yaml'
|
||||
assertFileContent 'home-files/${configDir}/color.yaml' \
|
||||
assertFileExists 'home-files/.kube/color.yaml'
|
||||
assertFileContent 'home-files/.kube/color.yaml' \
|
||||
${builtins.toFile "expected.yaml" ''
|
||||
kubectl: kubectl
|
||||
objFreshThreshold: 0
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists 'home-files/.config/kube/color.yaml'
|
||||
assertFileContent 'home-files/.config/kube/color.yaml' \
|
||||
assertFileExists 'home-files/.config/kubecolor.yaml'
|
||||
assertFileContent 'home-files/.config/kubecolor.yaml' \
|
||||
${builtins.toFile "expected.yaml" ''
|
||||
kubectl: kubectl
|
||||
objFreshThreshold: 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue