mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-24 17:58:30 +02:00
refactor: development environment
This commit is contained in:
14
home/base/desktop/container/container.nix
Normal file
14
home/base/desktop/container/container.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
skopeo
|
||||
docker-compose
|
||||
dive # explore docker layers
|
||||
];
|
||||
|
||||
programs = {
|
||||
};
|
||||
}
|
||||
6
home/base/desktop/container/default.nix
Normal file
6
home/base/desktop/container/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./container.nix
|
||||
./kubernetes.nix
|
||||
];
|
||||
}
|
||||
31
home/base/desktop/container/kubernetes.nix
Normal file
31
home/base/desktop/container/kubernetes.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
cattppuccin-k9s,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
kubectl
|
||||
kubernetes-helm
|
||||
];
|
||||
|
||||
programs = {
|
||||
k9s = {
|
||||
enable = true;
|
||||
skin =
|
||||
let
|
||||
skin_file = "${cattppuccin-k9s}/dist/mocha.yml"; # theme - cattppuccin mocha
|
||||
skin_attr = builtins.fromJSON (builtins.readFile
|
||||
# replace 'base: &base "#1e1e2e"' with 'base: &base "default"'
|
||||
# to make fg/bg color transparent
|
||||
(pkgs.runCommandNoCC "get-skin-json" {} ''
|
||||
cat ${skin_file} \
|
||||
| sed -E 's@(base: &base ).+@\1 "default"@g' \
|
||||
| ${pkgs.yj}/bin/yj > $out
|
||||
'')
|
||||
);
|
||||
in
|
||||
skin_attr;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user