Restructure flake.nix for a simpler config for building different images off the same NixOS config.
This commit is contained in:
@@ -56,38 +56,34 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.kubernetes.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
kubectl
|
||||
kubeswitch
|
||||
stern
|
||||
alias_kx
|
||||
alias_ks
|
||||
alias_k
|
||||
alias_ka
|
||||
alias_kdel
|
||||
alias_kd
|
||||
alias_klog
|
||||
decrypt_k8s_secret
|
||||
ingress2gateway # Convert ingress yaml to gateway yaml
|
||||
];
|
||||
config = lib.mkIf config.me.kubernetes.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
kubectl
|
||||
kubeswitch
|
||||
stern
|
||||
alias_kx
|
||||
alias_ks
|
||||
alias_k
|
||||
alias_ka
|
||||
alias_kdel
|
||||
alias_kd
|
||||
alias_klog
|
||||
decrypt_k8s_secret
|
||||
ingress2gateway # Convert ingress yaml to gateway yaml
|
||||
];
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".kube";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0750";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".kube";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0750";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user