mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-24 09:48:30 +02:00
refactor: development environment
This commit is contained in:
22
home/base/desktop/cloud/default.nix
Normal file
22
home/base/desktop/cloud/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
# general tools
|
||||
terraform
|
||||
# terraformer # generate terraform configs from existing cloud resources
|
||||
pulumi
|
||||
pulumictl
|
||||
# istioctl
|
||||
|
||||
# aws
|
||||
awscli2
|
||||
aws-iam-authenticator
|
||||
eksctl
|
||||
];
|
||||
|
||||
programs = {
|
||||
};
|
||||
}
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2,12 +2,13 @@
|
||||
imports = [
|
||||
../server
|
||||
|
||||
./cloud
|
||||
./container
|
||||
./neovim
|
||||
./terminal
|
||||
|
||||
./alacritty.nix
|
||||
./development.nix
|
||||
./helix.nix
|
||||
./kitty.nix
|
||||
./media.nix
|
||||
./shell.nix
|
||||
];
|
||||
|
||||
@@ -16,24 +16,6 @@
|
||||
home.packages = with pkgs; [
|
||||
pkgs-unstable.devbox
|
||||
|
||||
# cloud native
|
||||
skopeo
|
||||
docker-compose
|
||||
dive # explore docker layers
|
||||
kubectl
|
||||
kubernetes-helm
|
||||
terraform
|
||||
# terraformer # generate terraform configs from existing cloud resources
|
||||
pulumi
|
||||
pulumictl
|
||||
k9s
|
||||
# istioctl
|
||||
|
||||
# cloud provider
|
||||
awscli2
|
||||
aws-iam-authenticator
|
||||
eksctl
|
||||
|
||||
# DO NOT install build tools for C/C++ and others, set it per project by devShell instead
|
||||
gnumake # used by this repo, to simplify the deployment
|
||||
jdk17 # used to run some java based tools(.jar)
|
||||
|
||||
7
home/base/desktop/terminal/default.nix
Normal file
7
home/base/desktop/terminal/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./kitty.nix
|
||||
./wezterm.nix
|
||||
];
|
||||
}
|
||||
@@ -30,7 +30,10 @@
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
theme = "Catppuccin-Mocha"; # kitty has catppuccin theme built-in
|
||||
# kitty has catppuccin theme built-in,
|
||||
# all the built-in themes are packaged into an extra package named `kitty-themes`
|
||||
# and it's installed by home-manager if `theme` is specified.
|
||||
theme = "Catppuccin-Mocha";
|
||||
font = {
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
# use different font size on macOS
|
||||
52
home/base/desktop/terminal/wezterm.nix
Normal file
52
home/base/desktop/terminal/wezterm.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
catppuccin-wezterm,
|
||||
...
|
||||
}:
|
||||
###########################################################
|
||||
#
|
||||
# Wezterm Configuration
|
||||
#
|
||||
###########################################################
|
||||
{
|
||||
# wezterm has catppuccin theme built-in,
|
||||
# it's not necessary to install it separately.
|
||||
# xdg.configFile."wezterm/colors".source = "${catppuccin-wezterm}/dist";
|
||||
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
|
||||
extraConfig =
|
||||
let
|
||||
fontsize = if pkgs.stdenv.isDarwin then "14.0" else "13.0";
|
||||
in
|
||||
''
|
||||
-- Pull in the wezterm API
|
||||
local wezterm = require 'wezterm'
|
||||
|
||||
-- This table will hold the configuration.
|
||||
local config = {}
|
||||
|
||||
-- In newer versions of wezterm, use the config_builder which will
|
||||
-- help provide clearer error messages
|
||||
if wezterm.config_builder then
|
||||
config = wezterm.config_builder()
|
||||
end
|
||||
|
||||
-- This is where you actually apply your config choices
|
||||
config.color_scheme = "Catppuccin Mocha"
|
||||
config.font = wezterm.font("JetBrains Mono")
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
config.scrollback_lines = 10000
|
||||
config.enable_scroll_bar = true
|
||||
|
||||
config.font_size = ${fontsize}
|
||||
'' + (if pkgs.stdenv.isDarwin then ''
|
||||
-- Spawn a fish shell in login mod
|
||||
config.default_prog = { '/run/current-system/sw/bin/nu', '-l' }
|
||||
'' else "") + ''
|
||||
return config
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
ipcalc # it is a calculator for the IPv4/v6 addresses
|
||||
|
||||
# misc
|
||||
tldr
|
||||
cowsay
|
||||
file
|
||||
which
|
||||
|
||||
Reference in New Issue
Block a user