From 478daf4833ed7ba0bb84e4af98fee088697c5145 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Fri, 22 Apr 2022 11:51:29 +0300 Subject: [PATCH] fix(scripts): exa not exist in systemctl --- nix/home.nix | 15 +++++++++------ scripts/lock.sh | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/nix/home.nix b/nix/home.nix index e699e76..a29d295 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -101,9 +101,9 @@ in services.screen-locker = { enable = true; - lockCmd = "/bin/bash ~/scripts/lock.sh"; + lockCmd = "/bin/bash -c ${config.home.homeDirectory}/scripts/lock.sh"; - inactiveInterval = 5; + inactiveInterval = 1; }; services.gpg-agent.enable = true; @@ -150,6 +150,12 @@ in source "$HOME/.ghcup/env" fi ''; + + shellAliases = { + ls = "${pkgs.exa}/bin/exa -1"; + ll = "${pkgs.exa}/bin/exa -l"; + lt = "${pkgs.exa}/bin/exa --tree"; + }; }; # enable git VCS @@ -181,10 +187,7 @@ in }; # replacement for 'ls' written in rust - programs.exa = { - enable = true; - enableAliases = true; - }; + programs.exa.enable = true; # a fast cd command that learns your habbits programs.zoxide = { diff --git a/scripts/lock.sh b/scripts/lock.sh index c852c6f..6f0ab2f 100755 --- a/scripts/lock.sh +++ b/scripts/lock.sh @@ -1,2 +1,2 @@ #!/bin/bash -/usr/bin/i3lock -ei $(exa -1 ~/pictures/wallpapers/*.png | awk '{ print $1 }' | sort -R | head -n 1) +/usr/bin/i3lock -ei $(ls $HOME/pictures/wallpapers/*.png | awk '{ print $1 }' | sort -R | head -n 1)