Compare commits
14 Commits
9bf0cabd8d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3251639b39 | |||
| 1b21f2c962 | |||
| 04509ceade | |||
| 8c2143c3b2 | |||
| 5a3a8e053d | |||
| 5fb34c7188 | |||
| 75d1bcf15f | |||
| a62d07ca6c | |||
| 3f5c9b24a4 | |||
| 4f26431fcb | |||
| d9083651c2 | |||
| 5fc9da84d3 | |||
| 0ca2ab2401 | |||
| d24a905516 |
29
.gitea/workflows/minecraft.yml
Normal file
29
.gitea/workflows/minecraft.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
name: deploy minecraft
|
||||||
|
on: [workflow_dispatch]
|
||||||
|
jobs:
|
||||||
|
minecraft:
|
||||||
|
runs-on: home-server
|
||||||
|
env:
|
||||||
|
KUBECONFIG: /home/gitea-runner/.kube/config
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: /home/gitea-runner/infrastructure
|
||||||
|
steps:
|
||||||
|
- name: checkout repo
|
||||||
|
working-directory: /home/gitea-runner
|
||||||
|
run: |
|
||||||
|
if [ -d "infrastructure" ]; then
|
||||||
|
cd infrastructure
|
||||||
|
echo "Infrastructure folder exists. Resetting to the most recent commit."
|
||||||
|
git reset --hard HEAD
|
||||||
|
git pull https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.alexmickelson.guru/${{ gitea.repository }} $(git rev-parse --abbrev-ref HEAD)
|
||||||
|
else
|
||||||
|
git clone https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.alexmickelson.guru/${{ gitea.repository }}.git
|
||||||
|
fi
|
||||||
|
- name: deploy minecraft
|
||||||
|
env:
|
||||||
|
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||||
|
run: |
|
||||||
|
for file in kubernetes/minecraft/*.yml; do
|
||||||
|
cat "$file" | envsubst | kubectl apply -f -
|
||||||
|
done
|
||||||
@@ -66,6 +66,43 @@ spec:
|
|||||||
memory: "6Gi"
|
memory: "6Gi"
|
||||||
limits:
|
limits:
|
||||||
memory: "8Gi"
|
memory: "8Gi"
|
||||||
|
- name: minecraft-cobblemon
|
||||||
|
image: itzg/minecraft-server:java21
|
||||||
|
stdin: true
|
||||||
|
tty: true
|
||||||
|
env:
|
||||||
|
- name: EULA
|
||||||
|
value: "true"
|
||||||
|
- name: TYPE
|
||||||
|
value: "AUTO_CURSEFORGE"
|
||||||
|
- name: CF_SLUG
|
||||||
|
value: "cobbleverse-cobblemon"
|
||||||
|
- name: CF_MODPACK_ZIP
|
||||||
|
value: "/modpacks/COBBLEVERSE-1.7.30-CF.zip"
|
||||||
|
- name: CF_API_KEY
|
||||||
|
value: "$CF_API_KEY"
|
||||||
|
- name: MEMORY
|
||||||
|
value: "4G"
|
||||||
|
- name: SERVER_PORT
|
||||||
|
value: "2222"
|
||||||
|
- name: RCON_PORT
|
||||||
|
value: "25576"
|
||||||
|
- name: CF_OVERRIDES_EXCLUSIONS
|
||||||
|
value: |
|
||||||
|
# Not applicable for server side
|
||||||
|
shaderpacks/**
|
||||||
|
resourcepacks/**
|
||||||
|
volumeMounts:
|
||||||
|
- name: cobblemon-data
|
||||||
|
mountPath: /data
|
||||||
|
- name: modpacks
|
||||||
|
mountPath: /modpacks
|
||||||
|
readOnly: true
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "4Gi"
|
||||||
|
limits:
|
||||||
|
memory: "6Gi"
|
||||||
volumes:
|
volumes:
|
||||||
- name: minecraft-data
|
- name: minecraft-data
|
||||||
hostPath:
|
hostPath:
|
||||||
@@ -83,18 +120,7 @@ spec:
|
|||||||
hostPath:
|
hostPath:
|
||||||
path: /dev/net/tun
|
path: /dev/net/tun
|
||||||
type: CharDevice
|
type: CharDevice
|
||||||
---
|
- name: cobblemon-data
|
||||||
# apiVersion: v1
|
hostPath:
|
||||||
# kind: Service
|
path: /data/minecraft/cobblemon-data
|
||||||
# metadata:
|
type: DirectoryOrCreate
|
||||||
# name: minecraft
|
|
||||||
# namespace: minecraft
|
|
||||||
# spec:
|
|
||||||
# selector:
|
|
||||||
# app: minecraft
|
|
||||||
# ports:
|
|
||||||
# - name: minecraft
|
|
||||||
# protocol: TCP
|
|
||||||
# port: 25565
|
|
||||||
# targetPort: 25565
|
|
||||||
# type: ClusterIP
|
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ ./fish.home.nix ];
|
||||||
|
|
||||||
|
customFish = {
|
||||||
|
dotnetPackage = pkgs.dotnetCorePackages.sdk_8_0;
|
||||||
|
bitwardenSshAgent = true;
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
vscode-fhs
|
vscode-fhs
|
||||||
gnome-software
|
gnome-software
|
||||||
@@ -43,37 +50,7 @@
|
|||||||
package = pkgs.gnome-themes-extra;
|
package = pkgs.gnome-themes-extra;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellInit = ''
|
|
||||||
function commit
|
|
||||||
git add --all
|
|
||||||
git commit -m "$argv"
|
|
||||||
git push
|
|
||||||
end
|
|
||||||
|
|
||||||
# have ctrl+backspace delete previous word
|
|
||||||
bind \e\[3\;5~ kill-word
|
|
||||||
# have ctrl+delete delete following word
|
|
||||||
bind \b backward-kill-word
|
|
||||||
|
|
||||||
set -U fish_user_paths ~/.local/bin $fish_user_paths
|
|
||||||
#set -U fish_user_paths ~/.dotnet $fish_user_paths
|
|
||||||
#set -U fish_user_paths ~/.dotnet/tools $fish_user_paths
|
|
||||||
|
|
||||||
export VISUAL=vim
|
|
||||||
export EDITOR="$VISUAL"
|
|
||||||
export DOTNET_WATCH_RESTART_ON_RUDE_EDIT=1
|
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
||||||
export DOTNET_ROOT=${pkgs.dotnetCorePackages.sdk_8_0}
|
|
||||||
|
|
||||||
set -x LIBVIRT_DEFAULT_URI qemu:///system
|
|
||||||
|
|
||||||
set -x TERM xterm-256color # ghostty
|
|
||||||
export SSH_AUTH_SOCK=/home/alex/.bitwarden-ssh-agent.sock # ssh agent
|
|
||||||
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/lazydocker/config.yml".text = ''
|
".config/lazydocker/config.yml".text = ''
|
||||||
gui:
|
gui:
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ ./fish.home.nix ];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
vscode-fhs
|
vscode-fhs
|
||||||
gnome-software
|
gnome-software
|
||||||
@@ -38,31 +40,7 @@
|
|||||||
package = pkgs.gnome-themes-extra;
|
package = pkgs.gnome-themes-extra;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellInit = ''
|
|
||||||
function commit
|
|
||||||
git add --all
|
|
||||||
git commit -m "$argv"
|
|
||||||
git push
|
|
||||||
end
|
|
||||||
|
|
||||||
# have ctrl+backspace delete previous word
|
|
||||||
bind \e\[3\;5~ kill-word
|
|
||||||
# have ctrl+delete delete following word
|
|
||||||
bind \b backward-kill-word
|
|
||||||
|
|
||||||
set -U fish_user_paths ~/.local/bin $fish_user_paths
|
|
||||||
#set -U fish_user_paths ~/.dotnet $fish_user_paths
|
|
||||||
#set -U fish_user_paths ~/.dotnet/tools $fish_user_paths
|
|
||||||
|
|
||||||
export VISUAL=vim
|
|
||||||
export EDITOR="$VISUAL"
|
|
||||||
export DOTNET_WATCH_RESTART_ON_RUDE_EDIT=1
|
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
||||||
set -x LIBVIRT_DEFAULT_URI qemu:///system
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/lazydocker/config.yml".text = ''
|
".config/lazydocker/config.yml".text = ''
|
||||||
gui:
|
gui:
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ ./fish.home.nix ];
|
||||||
|
|
||||||
|
customFish = {
|
||||||
|
bluetuiAliases = true;
|
||||||
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
k9s
|
k9s
|
||||||
jwt-cli
|
jwt-cli
|
||||||
@@ -36,37 +41,7 @@
|
|||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "vim";
|
EDITOR = "vim";
|
||||||
};
|
};
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellInit = ''
|
|
||||||
alias blue="bluetui"
|
|
||||||
|
|
||||||
function commit
|
|
||||||
git add --all
|
|
||||||
git commit -m "$argv"
|
|
||||||
git pull
|
|
||||||
git push
|
|
||||||
end
|
|
||||||
|
|
||||||
# have ctrl+backspace delete previous word
|
|
||||||
bind \e\[3\;5~ kill-word
|
|
||||||
# have ctrl+delete delete following word
|
|
||||||
bind \b backward-kill-word
|
|
||||||
|
|
||||||
set -U fish_user_paths ~/.local/bin $fish_user_paths
|
|
||||||
#set -U fish_user_paths ~/.dotnet $fish_user_paths
|
|
||||||
#set -U fish_user_paths ~/.dotnet/tools $fish_user_paths
|
|
||||||
|
|
||||||
export VISUAL=vim
|
|
||||||
export EDITOR="$VISUAL"
|
|
||||||
export DOTNET_WATCH_RESTART_ON_RUDE_EDIT=1
|
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
||||||
set -x LIBVIRT_DEFAULT_URI qemu:///system
|
|
||||||
|
|
||||||
alias blue="bluetui"
|
|
||||||
alias jelly="jellyfin-tui"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/lazydocker/config.yml".text = ''
|
".config/lazydocker/config.yml".text = ''
|
||||||
gui:
|
gui:
|
||||||
|
|||||||
@@ -4,16 +4,11 @@
|
|||||||
vscode-fhs
|
vscode-fhs
|
||||||
gnome-software
|
gnome-software
|
||||||
gnome-tweaks
|
gnome-tweaks
|
||||||
# nvtopPackages.nvidia
|
|
||||||
nerd-fonts.fira-code
|
nerd-fonts.fira-code
|
||||||
nerd-fonts.droid-sans-mono
|
nerd-fonts.droid-sans-mono
|
||||||
# fira-code
|
|
||||||
# (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
|
||||||
kubernetes-helm
|
kubernetes-helm
|
||||||
busybox
|
busybox
|
||||||
ghostty
|
ghostty
|
||||||
elixir_1_18
|
|
||||||
inotify-tools # needed for elixir hot-reloading
|
|
||||||
nodejs_24
|
nodejs_24
|
||||||
pnpm
|
pnpm
|
||||||
legcord
|
legcord
|
||||||
@@ -28,6 +23,8 @@
|
|||||||
|
|
||||||
elixir
|
elixir
|
||||||
elixir-ls
|
elixir-ls
|
||||||
|
inotify-tools
|
||||||
|
watchman
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
|
|||||||
75
nix/home-manager/fish.home.nix
Normal file
75
nix/home-manager/fish.home.nix
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.customFish;
|
||||||
|
in {
|
||||||
|
options.customFish = {
|
||||||
|
# Opt-in: only enable if the relevant tools are installed on this machine
|
||||||
|
|
||||||
|
bluetuiAliases = lib.mkEnableOption "bluetui/jellyfin-tui shell aliases";
|
||||||
|
|
||||||
|
dotnetPackage = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.package;
|
||||||
|
default = null;
|
||||||
|
description = "Enable dotnet env vars and PATH entries. Set to the desired SDK package (e.g. pkgs.dotnetCorePackages.sdk_8_0).";
|
||||||
|
};
|
||||||
|
|
||||||
|
bitwardenSshAgent = lib.mkEnableOption "Bitwarden SSH agent (sets SSH_AUTH_SOCK)";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
shellInit = lib.concatStringsSep "\n" (lib.filter (s: s != "") [
|
||||||
|
|
||||||
|
# https://gist.github.com/thomd/7667642
|
||||||
|
''
|
||||||
|
export LS_COLORS=':di=95'
|
||||||
|
|
||||||
|
function commit
|
||||||
|
git add --all
|
||||||
|
git commit -m "$argv"
|
||||||
|
for remote in (git remote)
|
||||||
|
git pull $remote
|
||||||
|
git push $remote
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# have ctrl+backspace delete previous word
|
||||||
|
bind \e\[3\;5~ kill-word
|
||||||
|
# have ctrl+delete delete following word
|
||||||
|
bind \b backward-kill-word
|
||||||
|
set -U fish_user_paths ~/.local/bin ~/bin ~/.dotnet ~/.dotnet/tools $fish_user_paths
|
||||||
|
set fish_pager_color_selected_background --background='00399c'
|
||||||
|
|
||||||
|
export VISUAL=vim
|
||||||
|
export EDITOR="$VISUAL"
|
||||||
|
|
||||||
|
set -x LIBVIRT_DEFAULT_URI qemu:///system
|
||||||
|
set -x TERM xterm-256color
|
||||||
|
|
||||||
|
if test -f "$HOME/.cargo/env.fish"
|
||||||
|
source "$HOME/.cargo/env.fish"
|
||||||
|
end
|
||||||
|
''
|
||||||
|
|
||||||
|
(lib.optionalString cfg.bluetuiAliases ''
|
||||||
|
alias blue="bluetui"
|
||||||
|
alias jelly="jellyfin-tui"
|
||||||
|
'')
|
||||||
|
|
||||||
|
|
||||||
|
(lib.optionalString (cfg.dotnetPackage != null) ''
|
||||||
|
export DOTNET_WATCH_RESTART_ON_RUDE_EDIT=1
|
||||||
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
export DOTNET_ROOT=${cfg.dotnetPackage}
|
||||||
|
'')
|
||||||
|
|
||||||
|
(lib.optionalString cfg.bitwardenSshAgent ''
|
||||||
|
export SSH_AUTH_SOCK=$HOME/.bitwarden-ssh-agent.sock
|
||||||
|
'')
|
||||||
|
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -8,6 +8,14 @@ let
|
|||||||
(fetchTarball "https://github.com/nix-community/nixGL/archive/main.tar.gz")
|
(fetchTarball "https://github.com/nix-community/nixGL/archive/main.tar.gz")
|
||||||
{ };
|
{ };
|
||||||
in {
|
in {
|
||||||
|
imports = [ ./fish.home.nix ];
|
||||||
|
|
||||||
|
customFish = {
|
||||||
|
bluetuiAliases = true;
|
||||||
|
dotnetPackage = pkgs.dotnetCorePackages.sdk_8_0;
|
||||||
|
bitwardenSshAgent = true;
|
||||||
|
};
|
||||||
|
|
||||||
home.username = "alexm";
|
home.username = "alexm";
|
||||||
home.homeDirectory = "/home/alexm";
|
home.homeDirectory = "/home/alexm";
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
@@ -16,16 +24,16 @@ in {
|
|||||||
jwt-cli
|
jwt-cli
|
||||||
fish
|
fish
|
||||||
kubectl
|
kubectl
|
||||||
(lazydocker.overrideAttrs (oldAttrs: rec {
|
# (lazydocker.overrideAttrs (oldAttrs: rec {
|
||||||
version = "0.24.1";
|
# version = "0.24.4";
|
||||||
src = pkgs.fetchFromGitHub {
|
# src = pkgs.fetchFromGitHub {
|
||||||
owner = "jesseduffield";
|
# owner = "jesseduffield";
|
||||||
repo = "lazydocker";
|
# repo = "lazydocker";
|
||||||
rev = "v${version}";
|
# rev = "v${version}";
|
||||||
hash = "sha256-cVjDdrxmGt+hj/WWP9B3BT739k9SSr4ryye5qWb3XNM=";
|
# hash = "sha256-cW90/yblSLBkcR4ZdtcSI9MXFjOUxyEectjRn9vZwvg=";
|
||||||
};
|
# };
|
||||||
}))
|
# }))
|
||||||
# lazydocker
|
lazydocker
|
||||||
traceroute
|
traceroute
|
||||||
(with dotnetCorePackages; combinePackages [ sdk_8_0 sdk_9_0 ])
|
(with dotnetCorePackages; combinePackages [ sdk_8_0 sdk_9_0 ])
|
||||||
nodejs_22
|
nodejs_22
|
||||||
@@ -90,47 +98,7 @@ in {
|
|||||||
window-width = "120";
|
window-width = "120";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellInit = ''
|
|
||||||
# https://gist.github.com/thomd/7667642
|
|
||||||
export LS_COLORS=':di=95'
|
|
||||||
|
|
||||||
function commit
|
|
||||||
git add --all
|
|
||||||
git commit -m "$argv"
|
|
||||||
git pull
|
|
||||||
git push
|
|
||||||
end
|
|
||||||
|
|
||||||
# have ctrl+backspace delete previous word
|
|
||||||
bind \e\[3\;5~ kill-word
|
|
||||||
# have ctrl+delete delete following word
|
|
||||||
bind \b backward-kill-word
|
|
||||||
|
|
||||||
alias blue="bluetui"
|
|
||||||
alias jelly="jellyfin-tui"
|
|
||||||
|
|
||||||
set -U fish_user_paths ~/.local/bin $fish_user_paths
|
|
||||||
set -U fish_user_paths ~/bin $fish_user_paths
|
|
||||||
set -U fish_user_paths ~/.dotnet $fish_user_paths
|
|
||||||
set -U fish_user_paths ~/.dotnet/tools $fish_user_paths
|
|
||||||
set fish_pager_color_selected_background --background='00399c'
|
|
||||||
|
|
||||||
export VISUAL=vim
|
|
||||||
export EDITOR="$VISUAL"
|
|
||||||
export DOTNET_WATCH_RESTART_ON_RUDE_EDIT=1
|
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
||||||
export DOTNET_ROOT=${pkgs.dotnetCorePackages.sdk_8_0}
|
|
||||||
|
|
||||||
set -x LIBVIRT_DEFAULT_URI qemu:///system
|
|
||||||
set -x TERM xterm-256color # ghostty
|
|
||||||
|
|
||||||
source "$HOME/.cargo/env.fish"
|
|
||||||
|
|
||||||
export SSH_AUTH_SOCK=/home/alexm/.bitwarden-ssh-agent.sock # ssh agent
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/lazydocker/config.yml".text = ''
|
".config/lazydocker/config.yml".text = ''
|
||||||
gui:
|
gui:
|
||||||
|
|||||||
Reference in New Issue
Block a user