Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30281ef1a6 | ||
|
|
1f3976a77f |
No files matched your search
@@ -40,7 +40,10 @@
|
|||||||
gitea.enable = true;
|
gitea.enable = true;
|
||||||
github.enable = true;
|
github.enable = true;
|
||||||
};
|
};
|
||||||
|
k8s.enable = true;
|
||||||
k8s.k9s.enable = true;
|
k8s.k9s.enable = true;
|
||||||
|
k8s.talos.enable = true;
|
||||||
|
keyboard.vortexCore.enable = true;
|
||||||
keepassxc.enable = true;
|
keepassxc.enable = true;
|
||||||
music.enable = true;
|
music.enable = true;
|
||||||
newsboat.enable = true;
|
newsboat.enable = true;
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.k8s.crossplane.enable {
|
||||||
|
home.packages = [ pkgs.upbound ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -18,11 +18,25 @@ in
|
|||||||
k9s = {
|
k9s = {
|
||||||
enable = lib.mkEnableOption "k9s";
|
enable = lib.mkEnableOption "k9s";
|
||||||
};
|
};
|
||||||
|
crossplane = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
talos = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
./crossplane.nix
|
||||||
./helm.nix
|
./helm.nix
|
||||||
./k9s.nix
|
./k9s.nix
|
||||||
|
./talos.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
@@ -36,7 +50,6 @@ in
|
|||||||
kubectl
|
kubectl
|
||||||
kustomize
|
kustomize
|
||||||
opentofu
|
opentofu
|
||||||
upbound
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.kubecolor = {
|
programs.kubecolor = {
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.k8s.talos.enable {
|
||||||
|
home.packages = [ pkgs.talosctl ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -55,6 +55,7 @@ in
|
|||||||
};
|
};
|
||||||
desktop.ly.enable = true;
|
desktop.ly.enable = true;
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
|
k8s.enable = true;
|
||||||
hcloud.enable = true;
|
hcloud.enable = true;
|
||||||
networking = {
|
networking = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.k8s.crossplane.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.k8s.crossplane.enable {
|
||||||
|
nixpkgs.allowedUnfree = [ "upbound" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./crossplane.nix
|
||||||
|
./talos.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
options.k8s.enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.k8s.enable {
|
||||||
|
k8s.talos.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (config.host) username;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.k8s.talos = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
platform = lib.mkOption {
|
||||||
|
default = "qemu";
|
||||||
|
type = lib.types.enum [
|
||||||
|
"docker"
|
||||||
|
"qemu"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.k8s.talos.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
(lib.mkIf (config.k8s.talos.platform == "docker") {
|
||||||
|
docker.enable = true;
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = !config.docker.rootless;
|
||||||
|
message = "talos in docker needs 'docker.rootless = false;'";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
})
|
||||||
|
(lib.mkIf (config.k8s.talos.platform == "qemu") {
|
||||||
|
users.users.${username}.extraGroups = [ "kvm" ];
|
||||||
|
environment.systemPackages = [ pkgs.qemu ];
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user