From 7c1ab72e615ca07d7f233037e879eba554b84638 Mon Sep 17 00:00:00 2001 From: Kate Adkins Date: Sat, 3 May 2025 06:46:07 +0200 Subject: [PATCH] updates for hinata --- nixos/configuration.linux.nix | 7 +++++++ nixos/hosts/hinata.nix | 21 ++++++++++++++++++--- packages/default.nix | 10 +++++++--- xonsh/rc.xsh | 5 ++++- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/nixos/configuration.linux.nix b/nixos/configuration.linux.nix index 4523f80..b3f73db 100644 --- a/nixos/configuration.linux.nix +++ b/nixos/configuration.linux.nix @@ -78,6 +78,13 @@ programs.xonsh = { enable = true; package = deprekages.xonsh-with-xontribs; + + # Unfortunately, repeating this here is temporarily necessary due to NixOS module wonk. + extraPackages = [ + deprekages.xontrib-whole-word-jumping + deprekages.xontrib-term-integrations + deprekages.xontrib-sh + ]; }; # diff --git a/nixos/hosts/hinata.nix b/nixos/hosts/hinata.nix index 44e9527..8ce94f9 100644 --- a/nixos/hosts/hinata.nix +++ b/nixos/hosts/hinata.nix @@ -19,15 +19,19 @@ let src = pkgs.fetchFromGitHub { owner = "ericlinagora"; repo = "libfprint-CS9711"; - rev = "c242a40fcc51aec5b57d877bdf3edfe8cb4883fd"; - sha256 = "sha256-WFq8sNitwhOOS3eO8V35EMs+FA73pbILRP0JoW/UR80="; + rev = "03ace5b20146eb01c77fb3ea63e1909984d6d377"; + sha256 = "sha256-gr3UvFB6D04he/9zawvQIuwfv0B7fEZb6BGiNAbLids="; }; nativeBuildInputs = prev.nativeBuildInputs ++ (with pkgs; [ opencv cmake doctest + nss ]); + + installCheckPhase = ""; + }); in { @@ -73,7 +77,18 @@ in # Fingerprint reader support. services.fprintd = { enable = true; - package = pkgs.fprintd.override { libfprint = libfprint-gpd; }; + package = (pkgs.fprintd.override { + libfprint = libfprint-gpd; + }).overrideAttrs (prev: rec { + version = "1.94.4"; + src = pkgs.fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "libfprint"; + repo = "fprintd"; + rev = "refs/tags/v${version}"; + hash = "sha256-B2g2d29jSER30OUqCkdk3+Hv5T3DA4SUKoyiqHb8FeU="; + }; + }); }; diff --git a/packages/default.nix b/packages/default.nix index 10d976e..563e57c 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -118,11 +118,15 @@ flake-utils.lib.eachDefaultSystem ( esp-env = esp-dev.${system}.esp-idf-full; # xonsh and xontribs + xontrib-whole-word-jumping = callPackage ./xontrib-whole-word-jumping.nix {}; + xontrib-term-integrations = callPackage ./xontrib-term-integrations.nix {}; + xontrib-sh = callPackage ./xontrib-sh.nix {}; + xonsh-with-xontribs = pkgs.xonsh.override { extraPackages = pythonPackages: [ - (callPackage ./xontrib-whole-word-jumping.nix { }) - (callPackage ./xontrib-term-integrations.nix { }) - (callPackage ./xontrib-sh.nix { }) + xontrib-whole-word-jumping + xontrib-term-integrations + xontrib-sh ]; }; }; diff --git a/xonsh/rc.xsh b/xonsh/rc.xsh index 49dd44f..bac701c 100644 --- a/xonsh/rc.xsh +++ b/xonsh/rc.xsh @@ -83,8 +83,11 @@ PATH_ADDS = [] try_source(socket.gethostname().split('.')[0]) try_source(sys.platform) +if not 'XONSH_HAS_NIXOS' in ${...}: + $XONSH_HAS_NIXOS = False; + if not $XONSH_HAS_NIXOS: - if $(grep "DISTRIB_ID=nixos" /etc/lsb-release 2>&1).returncode == 0: + if !(grep -q "DISTRIB_ID=nixos" /etc/lsb-release).returncode == 0: if XONSHRC_VERBOSE: print("Found a NixOS machine; automatically loading the NixOS extensions.") try_source("includes/nixos")