add tmux daemon

This commit is contained in:
thek4n 2026-08-13 20:29:35 +03:00
parent 14382cd501
commit 4c4c80a704
21 changed files with 41 additions and 107 deletions

View File

@ -1,3 +0,0 @@
#!/bin/sh
beep -f 4000 -l 150 -D 150 -n -f 4000 -l 150

View File

View File

@ -1,3 +0,0 @@
chmod 751 "${HOME}"
mkdir "${HOME}/public"
chmod 1777 "${HOME}/public"

View File

@ -1,5 +0,0 @@
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
@includedir /etc/sudoers.d
Defaults passwd_timeout=0

View File

@ -1 +0,0 @@
%custompower ALL= NOPASSWD: /sbin/reboot,/sbin/shutdown now,/sbin/systemctl suspend

View File

@ -1 +0,0 @@
%wireguard ALL= NOPASSWD: /sbin/systemctl start wg-quick@wg0.service,/sbin/systemctl stop wg-quick@wg0.service

View File

@ -1,10 +0,0 @@
[Unit]
Description=Disable capslock
[Service]
ExecStart=sh -c "dumpkeys | sed s/Caps_Lock/Control/ | loadkeys"
Type=oneshot
[Install]
WantedBy=multi-user.target
After=multi-user.target

View File

@ -1,4 +0,0 @@
[Service]
Type=simple
ExecStart=
ExecStart=-/sbin/agetty --noreset --noclear --autologin thek4n - ${TERM}

View File

@ -1,3 +0,0 @@
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -- %%USER%%' --noclear --skip-login - $TERM

View File

@ -1,11 +0,0 @@
[Unit]
Description=Wake-on-LAN for enp3s0
Requires=network.target
After=network.target
[Service]
ExecStart=/usr/bin/ethtool -s enp3s0 wol g
Type=oneshot
[Install]
WantedBy=multi-user.target

View File

@ -1,4 +0,0 @@
#!/bin/sh
echo
figlet -ct -f banner "welcome mr.kan"
echo

View File

@ -1,10 +0,0 @@
#!/bin/sh
echo "wg0 status: $(systemctl is-active wg-quick@wg0.service)"
if ! systemctl is-active wg-quick@wg0.service 1>/dev/null; then
#shellcheck disable=SC2016
echo 'Executing this command may fix wireguard: "sudo apt update && sudo apt install linux-headers-$(uname -r) && sudo reboot"'
fi
echo

View File

@ -37,8 +37,20 @@
".config/nvim".source = ../../configs/.config/nvim; ".config/nvim".source = ../../configs/.config/nvim;
".config/zsh".source = ../../configs/.config/zsh; ".config/zsh".source = ../../configs/.config/zsh;
".config/git".source = ../../configs/.config/git; ".config/git".source = ../../configs/.config/git;
".config/mimeapps.list".source = ../../configs/.config/mimeapps.list;
".config/terminal-colors.d".source = ../../configs/.config/terminal-colors.d;
".zshenv".source = ../../configs/.zshenv; ".zshenv".source = ../../configs/.zshenv;
".editorconfig".source = ../../configs/.editorconfig; ".editorconfig".source = ../../configs/.editorconfig;
".editrc".source = ../../configs/.editrc;
".gnupg".source = ../../configs/.gnupg;
".infokey".source = ../../configs/.infokey;
".inputrc".source = ../../configs/.inputrc;
".lesskey".source = ../../configs/.lesskey;
".local/bin".source = ../../configs/.local/bin;
".docker".source = ../../configs/.docker;
".mozilla".source = ../../configs/.mozilla;
".tmux/landing".source = ../../configs/.tmux/landing;
".tmux/ssh".source = ../../configs/.tmux/ssh;
}; };
imports = [ imports = [

View File

@ -1,28 +0,0 @@
#!/bin/sh
sudo useradd -M -s /opt/bin/sandbox sandbox
sudo usermod -aG docker sandbox
echo "/opt/bin/sandbox" | sudo tee -a /etc/shells # for pam
set -eu
cd "$(mktemp -d)"
cat > Dockerfile << EOF
FROM debian:bookworm-slim
RUN apt update -y && apt upgrade -y && apt install -y neovim zsh git wget && \
useradd -Um -s /bin/zsh sandbox
WORKDIR /home/sandbox
USER sandbox
RUN git clone https://github.com/thek4n/dotfiles && cd dotfiles && ./install zsh && zsh -i
ENTRYPOINT ["zsh"]
EOF
docker build -t sandbox .

View File

@ -1,3 +0,0 @@
#!/bin/sh
cat "${SUB}/.ssh/config" >> "${HOME}/.ssh/config"

View File

@ -1,18 +0,0 @@
#!/bin/sh
set -eu
prefix="${HOME}/Games"
mkdir "${prefix}" || true
cd "${prefix}"
wget -c -O "${prefix}/starsector.zip" "https://f005.backblazeb2.com/file/fractalsoftworks/release/starsector_linux-0.98a-RC8.zip"
unzip "${prefix}/starsector.zip"
wget -c -O "${prefix}/starsector-rusificator.zip" "https://paste.thek4n.ru/lvsaHLOAmFfqnv/"
unzip -o "${prefix}/starsector-rusificator.zip"
cd "${prefix}/starsector/mods/"
wget -c -O "${prefix}/starsector/mods/Unthemed Weapons Collection.zip" "https://paste.thek4n.ru/pGbkhFFgGcSysm/"
unzip "${prefix}/starsector/mods/Unthemed Weapons Collection.zip"

View File

@ -1,3 +0,0 @@
#!/bin/sh
ya pkg install

View File

@ -0,0 +1,29 @@
{ config, pkgs, inputs, lib, hostname, username, ... }:
{
systemd.user.services.tmux = {
enable = true;
description = "User tmux daemon;";
wantedBy = [ "default.target" ];
after = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.tmux}/bin/tmux -D -L %u";
ExecStop = "${pkgs.tmux}/bin/tmux -L %u kill-server";
ExecReload = "${pkgs.tmux}/bin/tmux -L %u source-file %h/.config/tmux/tmux.conf";
ExecStartPost = "${pkgs.tmux}/bin/tmux -L %u new-session -d -s landing 'sh -c \"${pkgs.tmux}/bin/tmux rename-window -t 1 landing; ${pkgs.tmux}/bin/tmux set-option remain-on-exit on; ${pkgs.figlet}/bin/figlet -w 200 -c -f big Landing; ${pkgs.coreutils}/bin/trap : INT; while true; do ${pkgs.coreutils}/bin/sleep 3600; done\"'";
Restart = "on-failure";
RestartSec = "5";
StandardOutput = "journal";
StandardError = "journal";
PrivateTmp = false;
ProtectSystem = "strict";
ProtectHome = "read-only";
NoNewPrivileges = true;
};
};
}