From 7ea4717eb06831d640340d3170aba831ee579734 Mon Sep 17 00:00:00 2001 From: John Axel Eriksson Date: Mon, 25 Nov 2024 22:13:48 +0100 Subject: [PATCH] fix: move rbw-atomic-unlock out from scripts --- darwin/aarch64-darwin/VW2WRF4694.nix | 1 + flake/helper-packages.nix | 12 ------------ flake/packages.nix | 10 ++++++++++ profiles/defaults.nix | 1 + 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/darwin/aarch64-darwin/VW2WRF4694.nix b/darwin/aarch64-darwin/VW2WRF4694.nix index ce450af5..e8c60726 100644 --- a/darwin/aarch64-darwin/VW2WRF4694.nix +++ b/darwin/aarch64-darwin/VW2WRF4694.nix @@ -70,6 +70,7 @@ pkgs.vim pkgs.zip pkgs.devenv + pkgs.rbw-atomic-unlock ]; fonts.packages = with pkgs; [ diff --git a/flake/helper-packages.nix b/flake/helper-packages.nix index 2123e7fb..6e0fc546 100644 --- a/flake/helper-packages.nix +++ b/flake/helper-packages.nix @@ -46,17 +46,6 @@ ''; }; - rbw-atomic-unlock = writeShellApplication { - name = "rbw-atomic-unlock"; - runtimeInputs = [rbw util-linux]; - text = '' - rbw_lock="/tmp/rbw-unlock.lock" - exec 200>"$rbw_lock" - flock -w 15 200 - rbw unlocked || rbw unlock - ''; - }; - sk-sk = writeShellApplication { name = "sk-sk"; runtimeInputs = [skim]; @@ -211,7 +200,6 @@ launch project-select rbw-git-creds - rbw-atomic-unlock rofi-rbw fuzzel-rbw update-wifi-networks diff --git a/flake/packages.nix b/flake/packages.nix index 1f160fc5..82fe4e73 100644 --- a/flake/packages.nix +++ b/flake/packages.nix @@ -77,6 +77,16 @@ }} -d "$(pwd)" "$@" ''; }; + rbw-atomic-unlock = pkgs.writeShellApplication { + name = "rbw-atomic-unlock"; + runtimeInputs = [pkgs.rbw pkgs.util-linux]; + text = '' + rbw_lock="/tmp/rbw-unlock.lock" + exec 200>"$rbw_lock" + flock -w 15 200 + rbw unlocked || rbw unlock + ''; + }; tofuWithPlugins = pkgs.opentofu.withPlugins ( p: map tofuProvider [p.null p.external p.hcloud p.cloudflare p.random p.tailscale] diff --git a/profiles/defaults.nix b/profiles/defaults.nix index ae5ae706..001ffb26 100644 --- a/profiles/defaults.nix +++ b/profiles/defaults.nix @@ -63,6 +63,7 @@ in { pkgs.powertop pkgs.procs pkgs.psmisc + pkgs.rbw-atomic-unlock pkgs.ripgrep pkgs.sd pkgs.socat