From cc8480f754039d416fac22a38e8218a2cb107b50 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 15 Mar 2023 18:49:24 +0100 Subject: tv ru: replace zfs by btrfs --- tv/1systems/ru/config.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tv/1systems/ru/config.nix b/tv/1systems/ru/config.nix index e66cdde..0fc6216 100644 --- a/tv/1systems/ru/config.nix +++ b/tv/1systems/ru/config.nix @@ -12,20 +12,23 @@ with import ./lib; boot.loader.systemd-boot.enable = true; fileSystems."/" = { - device = "main/root"; - fsType = "zfs"; + device = "/dev/mapper/ruvg0-root"; + fsType = "btrfs"; + options = ["defaults" "noatime" "compress=zstd"]; }; fileSystems."/boot" = { device = "/dev/nvme0n1p1"; fsType = "vfat"; }; fileSystems."/home" = { - device = "main/home"; - fsType = "zfs"; + device = "/dev/mapper/ruvg0-home"; + fsType = "btrfs"; + options = ["defaults" "noatime" "compress=zstd"]; }; fileSystems."/bku" = { - device = "main/bku"; - fsType = "zfs"; + device = "/dev/mapper/ruvg0-bku"; + fsType = "btrfs"; + options = ["defaults" "noatime" "compress=zstd"]; }; krebs.build.host = config.krebs.hosts.ru; -- cgit v1.2.3 From 2186f0dc3a35400e9bd529c707ba74741b4a923f Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 22 Mar 2023 18:04:21 +0100 Subject: tv fzmenu: admit symlinks --- tv/5pkgs/simple/fzmenu/bin/otpmenu | 11 +++++++---- tv/5pkgs/simple/fzmenu/bin/passmenu | 12 ++++++++---- tv/5pkgs/simple/fzmenu/default.nix | 6 ++++-- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/tv/5pkgs/simple/fzmenu/bin/otpmenu b/tv/5pkgs/simple/fzmenu/bin/otpmenu index 12bd60a..273a408 100755 --- a/tv/5pkgs/simple/fzmenu/bin/otpmenu +++ b/tv/5pkgs/simple/fzmenu/bin/otpmenu @@ -10,14 +10,17 @@ case ${FZMENU_PHASE-0} in ;; 1) if result=$( + PASSWORD_STORE_DIR=${PASSWORD_STORE_DIR-$HOME/.password-store} FZF_DEFAULT_OPTS=${FZMENU_FZF_DEFAULT_OPTS-} if test -n "$FZF_DEFAULT_OPTS"; then export FZF_DEFAULT_OPTS fi - pass git ls-files '*/otp.gpg' | \ - sed ' - - s/\/otp\.gpg$// + find -L "$PASSWORD_STORE_DIR" -type f -name 'otp.gpg' | + awk -F / -v PASSWORD_STORE_DIR="$PASSWORD_STORE_DIR" ' + { n = length(PASSWORD_STORE_DIR "/") } + $NF == "otp.gpg" { + print substr($0, 1 + n, length($0)-length("/otp.gpg")-n) + } ' | exec fzf \ --history=/dev/null \ diff --git a/tv/5pkgs/simple/fzmenu/bin/passmenu b/tv/5pkgs/simple/fzmenu/bin/passmenu index da8e739..76153f5 100755 --- a/tv/5pkgs/simple/fzmenu/bin/passmenu +++ b/tv/5pkgs/simple/fzmenu/bin/passmenu @@ -10,14 +10,18 @@ case ${FZMENU_PHASE-0} in ;; 1) if result=$( + PASSWORD_STORE_DIR=${PASSWORD_STORE_DIR-$HOME/.password-store} FZF_DEFAULT_OPTS=${FZMENU_FZF_DEFAULT_OPTS-} if test -n "$FZF_DEFAULT_OPTS"; then export FZF_DEFAULT_OPTS fi - pass git ls-files '*/*.gpg' | \ - sed ' - /\/otp\.gpg$:/d - s/\.gpg$// + find -L "$PASSWORD_STORE_DIR" -type f -name '*.gpg' | + awk -F / -v PASSWORD_STORE_DIR="$PASSWORD_STORE_DIR" ' + { n = length(PASSWORD_STORE_DIR "/") } + $NF == "otp.gpg" { next } + /.*\.gpg$/ { + print substr($0, 1 + n, length($0)-length(".gpg")-n) + } ' | exec fzf \ --history=/dev/null \ diff --git a/tv/5pkgs/simple/fzmenu/default.nix b/tv/5pkgs/simple/fzmenu/default.nix index 7e19505..1a285ee 100644 --- a/tv/5pkgs/simple/fzmenu/default.nix +++ b/tv/5pkgs/simple/fzmenu/default.nix @@ -21,8 +21,9 @@ pkgs.runCommand "fzmenu" { --replace '#PATH=' PATH=${lib.makeBinPath [ pkgs.coreutils pkgs.dash + pkgs.findutils pkgs.fzf - pkgs.gnused + pkgs.gawk (pkgs.pass.withExtensions (ext: [ ext.pass-otp ])) @@ -36,8 +37,9 @@ pkgs.runCommand "fzmenu" { --replace '#PATH=' PATH=${lib.makeBinPath [ pkgs.coreutils pkgs.dash + pkgs.findutils pkgs.fzf - pkgs.gnused + pkgs.gawk (pkgs.pass.withExtensions (ext: [ ext.pass-otp ])) -- cgit v1.2.3