nix formating, sops secrets migration, vps-init auto update

This commit is contained in:
bogale 2026-10-25 12:57:58 +09:00
commit fcee389f8e
17 changed files with 950 additions and 818 deletions

View file

@ -1,49 +1,48 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ];
{ config, pkgs, ... }: {
home = {
username = "root";
homeDirectory = "/root";
username = "root";
};
imports = [ ./common.nix ];
programs = {
bash = {
shellAliases.dd = "dd bs=1M conv=fsync status=progress";
sessionVariables.SOPS_AGE_KEY_FILE = "/var/lib/sops-nix/key.txt";
initExtra = ''
session() {
systemd-run -tGM bogale@ --user --wait $SHELL
}
awg-gen() {
PRIVATE=$(awg genkey)
echo "private: $PRIVATE"
printf "public: "
echo $PRIVATE | awg pubkey
echo "private: $PRIVATE"
printf "preshared: "
awg genpsk
}
session() {
systemd-run -tGM bogale@ --user --wait $SHELL
}
'';
sessionVariables.SOPS_AGE_KEY_FILE = config.sops.age.keyFile;
shellAliases.dd = "dd bs=1M conv=fsync status=progress";
};
tmux = {
enable = true;
clock24 = true;
enable = true;
escapeTime = 0;
keyMode = "vi";
terminal = "screen-256color";
extraConfig = ''
unbind C-b
set -g mouse on
set -g prefix M-f
bind f send-prefix
bind h select-pane -L
bind i split-window -v
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind i split-window -v
bind u split-window -h
set -g mouse on
set -g prefix M-f
set -s set-clipboard external
set-option -g focus-events on
set-option -a terminal-features "xterm-256color:RGB"
set-option -g focus-events on
unbind C-b
'';
keyMode = "vi";
terminal = "screen-256color";
};
};
}