diff options
Diffstat (limited to 'pkgs/os-specific/linux')
4 files changed, 72 insertions, 18 deletions
diff --git a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix index 843ec92b7c6e..d938f361c857 100644 --- a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix +++ b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix @@ -3,14 +3,14 @@ let # These names are how they are designated in https://xanmod.org. ltsVariant = { - version = "6.1.55"; - hash = "sha256-kmiMbzH1hyteicjk1WfCQPYhLsVAbl1t5LJ83rUNZ1k="; + version = "6.1.57"; + hash = "sha256-ZzZj1Ij9L6WtjEJRcOdNtZ18oFRybNPV4uID6umC2Zg="; variant = "lts"; }; mainVariant = { - version = "6.5.5"; - hash = "sha256-XjSuhZ5ooXOVllKc29Pd+PlOK6OtcgVMVFzxOx5nkIw="; + version = "6.5.7"; + hash = "sha256-D4DMyBSaBZXHScmpkC3/fKlDylO1xVSZhar2F5bMjkY="; variant = "main"; }; diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.8 b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.8 index b0ff5b0a672f..d947361b3bc5 100644 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.8 +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.8 @@ -421,6 +421,14 @@ nixpkgs=./my-nixpkgs Additional options to be passed to .Ic ssh on the command line. +.Ed +. +.It Ev NIXOS_SWITCH_USE_DIRTY_ENV +Expose the the current environment variables to post activation scripts. Will +skip usage of +.Ic systemd-run +during system activation. Possibly dangerous, specially in remote environments +(e.g.: via SSH). Will be removed in the future. .El . . diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 2f89642845e2..68e00690652e 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -653,18 +653,48 @@ fi # If we're not just building, then make the new configuration the boot # default and/or activate it now. if [[ "$action" = switch || "$action" = boot || "$action" = test || "$action" = dry-activate ]]; then + # Using systemd-run here to protect against PTY failures/network + # disconnections during rebuild. + # See: https://github.com/NixOS/nixpkgs/issues/39118 + cmd=( + "systemd-run" + "-E" "LOCALE_ARCHIVE" # Will be set to new value early in switch-to-configuration script, but interpreter starts out with old value + "--collect" + "--no-ask-password" + "--pty" + "--quiet" + "--same-dir" + "--service-type=exec" + "--unit=nixos-rebuild-switch-to-configuration" + "--wait" + ) + # Check if we have a working systemd-run. In chroot environments we may have + # a non-working systemd, so we fallback to not using systemd-run. + # You may also want to explicitly set NIXOS_SWITCH_USE_DIRTY_ENV environment + # variable, since systemd-run runs inside an isolated environment and + # this may break some post-switch scripts. However keep in mind that this + # may be dangerous in remote access (e.g. SSH). + if [[ -n "$NIXOS_SWITCH_USE_DIRTY_ENV" ]]; then + log "warning: skipping systemd-run since NIXOS_SWITCH_USE_DIRTY_ENV is set. This environment variable will be ignored in the future" + cmd=() + elif ! targetHostCmd "${cmd[@]}" true &>/dev/null; then + logVerbose "Skipping systemd-run to switch configuration since it is not working in target host." + cmd=("env" "-i" "LOCALE_ARCHIVE=$LOCALE_ARCHIVE") + else + logVerbose "Using systemd-run to switch configuration." + fi if [[ -z "$specialisation" ]]; then - cmd="$pathToConfig/bin/switch-to-configuration" + cmd+=("$pathToConfig/bin/switch-to-configuration") else - cmd="$pathToConfig/specialisation/$specialisation/bin/switch-to-configuration" + cmd+=("$pathToConfig/specialisation/$specialisation/bin/switch-to-configuration") - if [[ ! -f "$cmd" ]]; then + if [[ ! -f "${cmd[-1]}" ]]; then log "error: specialisation not found: $specialisation" exit 1 fi fi - if ! targetHostCmd "$cmd" "$action"; then + if ! targetHostCmd "${cmd[@]}" "$action"; then log "warning: error(s) occurred while switching to the new configuration" exit 1 fi diff --git a/pkgs/os-specific/linux/projecteur/default.nix b/pkgs/os-specific/linux/projecteur/default.nix index ecb0fe535d35..5aa63536ff5d 100644 --- a/pkgs/os-specific/linux/projecteur/default.nix +++ b/pkgs/os-specific/linux/projecteur/default.nix @@ -1,6 +1,13 @@ -{ lib, mkDerivation, fetchFromGitHub, - cmake, pkg-config, - qtbase, qtgraphicaleffects, wrapQtAppsHook }: +{ lib +, mkDerivation +, fetchFromGitHub +, cmake +, pkg-config +, qtbase +, qtgraphicaleffects +, wrapQtAppsHook +}: + mkDerivation rec { pname = "projecteur"; version = "0.9.2"; @@ -10,15 +17,23 @@ mkDerivation rec { repo = "Projecteur"; rev = "v${version}"; fetchSubmodules = false; - sha256 = "sha256-kg6oYtJ4H5A6RNATBg+XvMfCb9FlhEBFjfxamGosMQg="; + hash = "sha256-kg6oYtJ4H5A6RNATBg+XvMfCb9FlhEBFjfxamGosMQg="; }; postPatch = '' sed '1i#include <array>' -i src/device.h # gcc12 ''; - buildInputs = [ qtbase qtgraphicaleffects ]; - nativeBuildInputs = [ wrapQtAppsHook cmake pkg-config ]; + buildInputs = [ + qtbase + qtgraphicaleffects + ]; + + nativeBuildInputs = [ + cmake + pkg-config + wrapQtAppsHook + ]; cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX:PATH=${placeholder "out"}" @@ -26,11 +41,12 @@ mkDerivation rec { "-DCMAKE_INSTALL_UDEVRULESDIR=${placeholder "out"}/lib/udev/rules.d" ]; - meta = with lib; { + meta = { description = "Linux/X11 application for the Logitech Spotlight device (and similar devices)."; homepage = "https://github.com/jahnf/Projecteur"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = with maintainers; [ benneti ]; + license = lib.licenses.mit; + mainProgram = "projecteur"; + maintainers = with lib.maintainers; [ benneti drupol ]; + platforms = lib.platforms.linux; }; } |