various updates on nixos,sway,scripts&dockercompose

This commit is contained in:
2025-11-08 17:04:36 +01:00
parent 7e8e812814
commit b6f93f60e4
5 changed files with 154 additions and 73 deletions

View File

@@ -74,13 +74,14 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# needed for later rust packages installations # needed for later rust packages installations
apt install build-essential -y apt install build-essential -y
apt install pkg-config libssl-dev -y
# btop # btop
wget https://github.com/aristocratos/btop/releases/download/v1.3.0/btop-x86_64-linux-musl.tbz # wget https://github.com/aristocratos/btop/releases/download/v1.3.0/btop-x86_64-linux-musl.tbz
tar -xjf btop-x86_64-linux-musl.tbz # tar -xjf btop-x86_64-linux-musl.tbz
cd btop # cd btop
bash install.sh # bash install.sh
cd .. # cd ..
# # assuming that Rust is installed # # assuming that Rust is installed
# echo "installing delta (gitdiff tool)" # echo "installing delta (gitdiff tool)"

View File

@@ -18,7 +18,7 @@
LC_NUMERIC = "es_ES.UTF-8"; LC_NUMERIC = "es_ES.UTF-8";
LC_PAPER = "es_ES.UTF-8"; LC_PAPER = "es_ES.UTF-8";
LC_TELEPHONE = "es_ES.UTF-8"; LC_TELEPHONE = "es_ES.UTF-8";
LC_TIME = "es_ES.UTF-8"; LC_TIME = "en_US.UTF-8";
}; };
# services.displayManager = { # services.displayManager = {
@@ -45,7 +45,8 @@
}; };
# --- sway wm config: # --- sway wm config:
services.xserver.displayManager.gdm.enable=true; services.xserver.displayManager.gdm.enable=true;
services.xserver.displayManager.gdm.wayland=false; #services.displayManager.sessionPackages = [ pkgs.sway ];
#services.xserver.displayManager.gdm.wayland=false;
#services.xserver.displayManager.plasma5.enable=true; #services.xserver.displayManager.plasma5.enable=true;
# Enable the gnome-keyring secrets vault. # Enable the gnome-keyring secrets vault.
# Will be exposed through DBus to programs willing to store secrets. # Will be exposed through DBus to programs willing to store secrets.
@@ -86,6 +87,10 @@
pulseaudio pulseaudio
usbutils usbutils
time time
#impala # nmtui alternative
fastfetch
rpm
pdfgrep # to find strings across pdfs in directories
# code editors # code editors
vim vim
@@ -123,6 +128,9 @@
gimp gimp
calibre calibre
tauon tauon
libsForQt5.kdenlive
libreoffice-qt6
ffmpeg
# browsers # browsers
firefox firefox
@@ -142,11 +150,21 @@
; ;
}) })
gnumake gnumake
#gcc gcc
clang clang
clang-tools clang-tools
openssl
openssl.dev openssl.dev
glib # GLib base library
#gio # GIO library
gdk-pixbuf # GDK Pixbuf library
gtk3 # GTK3 including GDK, relevant for gdk-sys
atk # Accessibility Toolkit
cairo # 2D graphics library
pango # Text layout and rendering
pkg-config # Needed for pkg-config to find .pc files
cmake
stdenv stdenv
rustup rustup
@@ -163,6 +181,7 @@
qmk qmk
meshtastic esptool # meshtastic related meshtastic esptool # meshtastic related
unicodeit unicodeit
setuptools
])) ]))
pipx pipx
nodejs nodejs
@@ -178,9 +197,20 @@
]; ];
environment.variables = { environment.variables = {
LIBCLANG_PATH = "${pkgs.llvmPackages_17.libclang.lib}/lib"; OPENSSL_DEV = "${pkgs.openssl.dev}";
OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib";
OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include";
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
OPENSSL_DIR = "${pkgs.openssl.dev}";
OPENSSL_NO_VENDOR="1";
OPENSSL_STATIC="0";
# for screen sharing in sway
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE="wayland";
WAYLAND_DISPLAY="wayland-1";
XDG_RUNTIME_DIR="/run/user/$(id -u)";
}; };
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
@@ -207,18 +237,33 @@
xdg.mime.defaultApplications = { xdg.mime.defaultApplications = {
"application/pdf" = "zathura"; "application/pdf" = "zathura";
}; };
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
};
# gvfs needed for Thunar to detect external disks # gvfs needed for Thunar to detect external disks
services.gvfs.enable = true; services.gvfs.enable = true;
hardware.graphics.enable = true;
# bluetooth related # bluetooth related
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.blueman.enable = true; services.blueman.enable = true;
#hardware.pulseaudio.enable = true; #hardware.pulseaudio.enable = true;
services.pulseaudio.enable = true; #services.pulseaudio.enable = true;
services.pipewire.enable=false; #services.pipewire.pulse.enable=false;
services.pipewire.pulse.enable=false; #services.pipewire.enable=false;
services.pipewire = {
enable = true; # Enable PipeWire service
alsa.enable = true; # Enable ALSA support (audio hardware)
alsa.support32Bit = true; # Support 32-bit apps on 64-bit systems
pulse.enable = true; # Enable PipeWire PulseAudio replacement
wireplumber.enable = true; # Enable WirePlumber session manager (recommended)
jack.enable = true; # Enable JACK support if needed
};
# udev rules (for Vial) # udev rules (for Vial)
services.udev.extraRules = '' services.udev.extraRules = ''
@@ -231,4 +276,6 @@
via via
vial vial
]; ];
nix.settings.extra-experimental-features = [ "nix-command" "flakes" ];
} }

View File

@@ -66,18 +66,18 @@ services:
- SYMFONY__ENV__DOMAIN_NAME=http://192.168.1.155:8098 - SYMFONY__ENV__DOMAIN_NAME=http://192.168.1.155:8098
restart: unless-stopped restart: unless-stopped
# slskd: slskd:
# image: slskd/slskd image: slskd/slskd
# container_name: slskd container_name: slskd
# ports: ports:
# - "8099:5030" - "8099:5030"
# - "50300:50300" - "50300:50300"
# volumes: volumes:
# - /mnt/usb/configurations/slkskd:/app - /mnt/usb/configurations/slskd:/app
# - /mnt/usb/audio/slskd-downloads:/downloads - /mnt/usb/audio/slskd-downloads:/downloads # isolate it in a subdir, since slskd removes arbitrary files on that dir
# environment: environment:
# - SLSKD_REMOTE_CONFIGURATION=true - SLSKD_REMOTE_CONFIGURATION=true
# restart: unless-stopped restart: unless-stopped
metube: metube:
image: ghcr.io/alexta69/metube image: ghcr.io/alexta69/metube
@@ -117,48 +117,48 @@ services:
restart: unless-stopped restart: unless-stopped
# metrics related: # metrics related:
prometheus: # prometheus:
image: prom/prometheus:latest # image: prom/prometheus:latest
container_name: prometheus # container_name: prometheus
ports: # ports:
- "9090:9090" # - "9090:9090"
volumes: # volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml # - ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus # - prometheus_data:/prometheus
networks: # networks:
- monitoring # - monitoring
restart: unless-stopped # restart: unless-stopped
#
node-exporter: # node-exporter:
image: prom/node-exporter:latest # image: prom/node-exporter:latest
container_name: node-exporter # container_name: node-exporter
ports: # ports:
- "9100:9100" # - "9100:9100"
networks: # networks:
- monitoring # - monitoring
restart: unless-stopped # restart: unless-stopped
#
grafana: # grafana:
image: grafana/grafana:latest # image: grafana/grafana:latest
container_name: grafana # container_name: grafana
ports: # ports:
- "3000:3000" # - "3000:3000"
environment: # environment:
- GF_SECURITY_ADMIN_PASSWORD=admin # - GF_SECURITY_ADMIN_PASSWORD=admin
volumes: # volumes:
- grafana_data:/var/lib/grafana # - grafana_data:/var/lib/grafana
networks: # networks:
- monitoring # - monitoring
depends_on: # depends_on:
- prometheus # - prometheus
restart: unless-stopped # restart: unless-stopped
networks: networks:
monitoring: monitoring:
driver: bridge driver: bridge
volumes: #volumes:
prometheus_data: # prometheus_data:
driver: local # driver: local
grafana_data: # grafana_data:
driver: local # driver: local

View File

@@ -1,6 +1,4 @@
# Default config for sway # Sway config file, placed at ~/.config/sway/config
#
# Copy this to ~/.config/sway/config and edit it to your liking.
# #
# Read `man 5 sway` for a complete reference. # Read `man 5 sway` for a complete reference.
@@ -29,9 +27,18 @@ output * bg ~/Sync-tablet/wallpapers/geometry02_croped1920x1080.png fill
# output HDMI-A-1 resolution 1920x1080 position 1920,0 # output HDMI-A-1 resolution 1920x1080 position 1920,0
# #
# You can get the names of your outputs by running: swaymsg -t get_outputs # You can get the names of your outputs by running: swaymsg -t get_outputs
# home setup:
output HDMI-A-1 resolution 3840x2160 position 1920 0 output HDMI-A-1 resolution 3840x2160 position 1920 0
output eDP-1 resolution 1920x1200 position 0 0 output eDP-1 resolution 1920x1200 position 0 0
# portable external monitor setup:
# output DP-1 resolution 3840x2160 position 1920 0
# output eDP-1 resolution 1920x1200 position 0 0
# output DP-1 {
# transform 270
# }
### Idle configuration ### Idle configuration
# #
# Example configuration: # Example configuration:
@@ -242,7 +249,22 @@ bindsym $mod+Control+Shift+b exec sed -i 's/\"Bold\"#tag_for_shortcut/\"Regular\
# move current workspace to another display # move current workspace to another display
bindsym $mod+Control+k move workspace to output HDMI-A-1 bindsym $mod+Control+k move workspace to output HDMI-A-1
# bindsym $mod+Control+k move workspace to output DP-1
bindsym $mod+Control+j move workspace to output eDP-1 bindsym $mod+Control+j move workspace to output eDP-1
# bindsym $mod+Control+j move workspace to output DP-1
# bindsym $mod+Control+k move workspace to output eDP-1
# bindsym $mod+Control+k move workspace to output DP-1
# remap capslock to control
input * {
xkb_options ctrl:nocaps
}
# for screen sharing
exec systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP
exec dbus-update-activation-environment WAYLAND_DISPLAY
# systemctl --user daemon-reexec
# systemctl --user restart pipewire
# systemctl --user restart xdg-desktop-portal
# systemctl --user restart xdg-desktop-portal-wlr
include /etc/sway/config.d/* include /etc/sway/config.d/*

View File

@@ -5,8 +5,8 @@
uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5) uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)
# date and time format: Tue 2025-08-19 22:37 temp_raw=$(cat /sys/class/thermal/thermal_zone0/temp)
date_formatted=$(date "+%a %F %H:%M") temp=$(($temp_raw / 1000))
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}') volume=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}')
muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
@@ -19,5 +19,16 @@ muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
battery_status=$(cat /sys/class/power_supply/BAT0/status) # "Full", "Discharging", or "Charging" battery_status=$(cat /sys/class/power_supply/BAT0/status) # "Full", "Discharging", or "Charging"
battery_capacity=$(cat /sys/class/power_supply/BAT0/capacity) # % battery_capacity=$(cat /sys/class/power_supply/BAT0/capacity) # %
# 💎 💻 💡 🔌 ⚡ 📁 \| 🐧 # date and time format: Tue 2025-08-19 22:37
echo $uptime_formatted$volume $muted 🔊 $battery_status $battery_capacity% 🔋 $date_formatted datetime=$(date "+%a %F %H:%M:%S")
interface=$(ip route get 8.8.8.8 | awk -F'dev ' 'NR==1{split($2,a," ");print a[1]}')
ip=$(ip addr show dev $interface | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)
avail_space=$(df -h / | awk 'NR==2 {print $4}')
# 💎 💻 💡 🔌 ⚡ 📁 \| 🐧 🔊 🔋
echo $avail_space \| $temp°C \| $uptime_formatted \| vol: $volume $muted \| $battery_status $battery_capacity% \| $interface $ip \| $datetime