mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-18 23:44:16 +01:00
refactor: development environment
This commit is contained in:
34
flake.lock
generated
34
flake.lock
generated
@@ -187,6 +187,38 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"catppuccin-wezterm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681259790,
|
||||
"narHash": "sha256-McSWoZaJeK+oqdK/0vjiRxZGuLBpEB10Zg4+7p5dIGY=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "wezterm",
|
||||
"rev": "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "wezterm",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cattppuccin-k9s": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1690140445,
|
||||
"narHash": "sha256-PtBJRBNbLkj7D2ko7ebpEjbfK9Ywjs7zbE+Y8FQVEfA=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "k9s",
|
||||
"rev": "516f44dd1a6680357cb30d96f7e656b653aa5059",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "k9s",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -659,6 +691,8 @@
|
||||
"catppuccin-helix": "catppuccin-helix",
|
||||
"catppuccin-hyprland": "catppuccin-hyprland",
|
||||
"catppuccin-starship": "catppuccin-starship",
|
||||
"catppuccin-wezterm": "catppuccin-wezterm",
|
||||
"cattppuccin-k9s": "cattppuccin-k9s",
|
||||
"home-manager": "home-manager_2",
|
||||
"hyprland": "hyprland",
|
||||
"mysecrets": "mysecrets",
|
||||
|
||||
@@ -247,6 +247,10 @@
|
||||
url = "github:catppuccin/alacritty";
|
||||
flake = false;
|
||||
};
|
||||
catppuccin-wezterm = {
|
||||
url = "github:catppuccin/wezterm";
|
||||
flake = false;
|
||||
};
|
||||
catppuccin-helix = {
|
||||
url = "github:catppuccin/helix";
|
||||
flake = false;
|
||||
@@ -263,6 +267,10 @@
|
||||
url = "github:catppuccin/cava";
|
||||
flake = false;
|
||||
};
|
||||
cattppuccin-k9s = {
|
||||
url = "github:catppuccin/k9s";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
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