fix(system): enable uwsm and fix session detection to allow VM login
- Enable programs.uwsm for session management. - Improve SDDM theme session detection logic to be case-insensitive and more robust. - Perform a global cleanup of 'Nnomarchy' and 'org.nnomarchy' typos across all scripts and configurations.
This commit is contained in:
@@ -11,7 +11,7 @@ SWAPSIZE=$(( 1024 * ${SWAPSIZE_KB:-0} ))
|
||||
|
||||
HIBERNATION_IMAGE_SIZE=$(cat /sys/power/image_size)
|
||||
|
||||
if (( SWAPSIZE > HIBERNATION_IMAGE_SIZE )) && [[ -f /etc/mkinitcpio.conf.d/nnomarchy_resume.conf ]]; then
|
||||
if (( SWAPSIZE > HIBERNATION_IMAGE_SIZE )) && [[ -f /etc/mkinitcpio.conf.d/nomarchy_resume.conf ]]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Removes hibernation setup: disables swap, removes swapfile, removes fstab entry,
|
||||
# removes resume hook, and removes suspend-then-hibernate configuration.
|
||||
|
||||
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/nnomarchy_resume.conf"
|
||||
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/nomarchy_resume.conf"
|
||||
|
||||
# Check if hibernation is configured
|
||||
if [[ ! -f $MKINITCPIO_CONF ]] || ! grep -q "^HOOKS+=(resume)$" "$MKINITCPIO_CONF"; then
|
||||
|
||||
@@ -13,7 +13,7 @@ if ! command -v limine-mkinitcpio &>/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/nnomarchy_resume.conf"
|
||||
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/nomarchy_resume.conf"
|
||||
|
||||
# Check if hibernation is already configured
|
||||
if [[ -f $MKINITCPIO_CONF ]] && grep -q "^HOOKS+=(resume)$" "$MKINITCPIO_CONF"; then
|
||||
@@ -95,5 +95,5 @@ sudo limine-update
|
||||
echo
|
||||
|
||||
if [[ $1 != "--force" ]] && gum confirm "Reboot to enable hibernation?"; then
|
||||
nnomarchy-system-reboot
|
||||
nomarchy-system-reboot
|
||||
fi
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PKG_NAME="$1"
|
||||
|
||||
if [ -z "$PKG_NAME" ]; then
|
||||
echo "Usage: nnomarchy-pkg-add <package-name>"
|
||||
echo "Usage: nomarchy-pkg-add <package-name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
PKG_NAME="$1"
|
||||
|
||||
if [ -z "$PKG_NAME" ]; then
|
||||
echo "Usage: nnomarchy-pkg-remove <package-name>"
|
||||
echo "Usage: nomarchy-pkg-remove <package-name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
STATE_FILE="$HOME/.config/home-manager/user-packages.json"
|
||||
|
||||
if [ ! -f "$STATE_FILE" ]; then
|
||||
echo "No packages managed by nnomarchy-pkg yet."
|
||||
echo "No packages managed by nomarchy-pkg yet."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
# Restart the XCompose input method service (fcitx5) to apply new compose key settings.
|
||||
|
||||
nnomarchy-restart-app fcitx5 --disable notificationitem
|
||||
nomarchy-restart-app fcitx5 --disable notificationitem
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Configure DNS declaratively for Nnomarchy NixOS.
|
||||
# Configure DNS declaratively for Nomarchy NixOS.
|
||||
# Hybrid: updates /etc/nixos/state.json and runs sys-update.
|
||||
|
||||
STATE_FILE="/etc/nixos/state.json"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Configure FIDO2 support declaratively for Nnomarchy NixOS.
|
||||
# Configure FIDO2 support declaratively for Nomarchy NixOS.
|
||||
|
||||
STATE_FILE="/etc/nixos/state.json"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Configure fingerprint support declaratively for Nnomarchy NixOS.
|
||||
# Configure fingerprint support declaratively for Nomarchy NixOS.
|
||||
|
||||
STATE_FILE="/etc/nixos/state.json"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Prompt for sudo once and keep the credential alive in the background.
|
||||
# Source this script so the trap applies to the calling shell:
|
||||
# source nnomarchy-sudo-keepalive
|
||||
# source nomarchy-sudo-keepalive
|
||||
|
||||
sudo -v
|
||||
while true; do sudo -n true; sleep 60; done 2>/dev/null &
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
# First run: enables passwordless sudo for 15 minutes (after confirmation).
|
||||
# Second run: disables it early.
|
||||
|
||||
NOPASSWD_FILE="/etc/sudoers.d/99-nnomarchy-nopasswd-${USER}"
|
||||
TIMER_NAME="nnomarchy-nopasswd-expire-${USER}"
|
||||
NOPASSWD_FILE="/etc/sudoers.d/99-nomarchy-nopasswd-${USER}"
|
||||
TIMER_NAME="nomarchy-nopasswd-expire-${USER}"
|
||||
|
||||
# Safety: if the file exists but the timer doesn't (e.g. after reboot), clean up
|
||||
if sudo test -f "$NOPASSWD_FILE" && ! systemctl is-active "${TIMER_NAME}.timer" &>/dev/null; then
|
||||
@@ -36,7 +36,7 @@ else
|
||||
sudo systemd-run --on-active=15m --timer-property=AccuracySec=1s --unit="$TIMER_NAME" \
|
||||
rm "$NOPASSWD_FILE"
|
||||
echo "Passwordless sudo has been ENABLED. It will automatically disable in 15 minutes."
|
||||
echo "Note: if you restart before then, run nnomarchy-sudo-passwordless-toggle again to disable it."
|
||||
echo "Note: if you restart before then, run nomarchy-sudo-passwordless-toggle again to disable it."
|
||||
else
|
||||
echo "Aborted. No changes made."
|
||||
fi
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
nohup bash -c "sleep 2 && uwsm stop" >/dev/null 2>&1 &
|
||||
|
||||
# Now close all windows
|
||||
nnomarchy-hyprland-window-close-all
|
||||
nomarchy-hyprland-window-close-all
|
||||
sleep 1 # Allow apps like Chrome to shutdown correctly
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
# Reboot command that first closes all application windows (thus giving them a chance to save state).
|
||||
# This is particularly helpful for applications like Chromium that otherwise won't shutdown cleanly.
|
||||
|
||||
nnomarchy-state clear re*-required
|
||||
nomarchy-state clear re*-required
|
||||
|
||||
# Schedule the reboot to happen after closing windows (detached from terminal)
|
||||
nohup bash -c "sleep 2 && systemctl reboot --no-wall" >/dev/null 2>&1 &
|
||||
|
||||
# Now close all windows
|
||||
nnomarchy-hyprland-window-close-all
|
||||
nomarchy-hyprland-window-close-all
|
||||
sleep 1 # Allow apps like Chrome to shutdown correctly
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
# Shutdown command that first closes all application windows (thus giving them a chance to save state).
|
||||
# This is particularly helpful for applications like Chromium that otherwise won't shutdown cleanly.
|
||||
|
||||
nnomarchy-state clear re*-required
|
||||
nomarchy-state clear re*-required
|
||||
|
||||
# Schedule the shutdown to happen after closing windows (detached from terminal)
|
||||
nohup bash -c "sleep 2 && systemctl poweroff --no-wall" >/dev/null 2>&1 &
|
||||
|
||||
# Now close all windows
|
||||
nnomarchy-hyprland-window-close-all
|
||||
nomarchy-hyprland-window-close-all
|
||||
sleep 1 # Allow apps like Chrome to shutdown correctly
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Select system timezone declaratively for Nnomarchy NixOS.
|
||||
# Select system timezone declaratively for Nomarchy NixOS.
|
||||
|
||||
STATE_FILE="/etc/nixos/state.json"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Nnomarchy Update Script
|
||||
# Nomarchy Update Script
|
||||
# 1. Updates the flake inputs in /etc/nixos
|
||||
# 2. Applies system-wide NixOS changes
|
||||
# 3. Applies user-level Home Manager changes
|
||||
@@ -10,11 +10,11 @@ set -e
|
||||
REPO_DIR="/etc/nixos"
|
||||
|
||||
if [ ! -d "$REPO_DIR" ]; then
|
||||
echo "Error: $REPO_DIR not found. Are you running on a Nnomarchy system?"
|
||||
echo "Error: $REPO_DIR not found. Are you running on a Nomarchy system?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "--- Starting Nnomarchy Update ---"
|
||||
echo "--- Starting Nomarchy Update ---"
|
||||
|
||||
# 1. Update Flake Lock
|
||||
echo "Updating flake inputs..."
|
||||
@@ -35,4 +35,4 @@ if [ -d "$REPO_DIR/.git" ]; then
|
||||
sudo git -C "$REPO_DIR" commit -m "chore: update system (flake.lock)" || echo "No lockfile changes to commit."
|
||||
fi
|
||||
|
||||
echo "--- Nnomarchy Update Complete ---"
|
||||
echo "--- Nomarchy Update Complete ---"
|
||||
|
||||
Reference in New Issue
Block a user