home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 7a1b9936dd6eca92370e437d973cc3c735481499
parent 9d19cb4bcd247ad76a37b985e0c8e09c6cd49dd0
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri, 19 Apr 2019 14:59:11 +0200

modules: use pkgs.writeScriptBin instead of links

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Dmodules/profiles/assets/bin/capture | 2--
Mmodules/profiles/desktop.nix | 26++++++++++++--------------
Mmodules/profiles/emacs.nix | 11++++++-----
3 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/modules/profiles/assets/bin/capture b/modules/profiles/assets/bin/capture @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -emacsclient -n -F '((name . "capture") (width . 75) (height . 30))' -e '(org-capture)' diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix @@ -3,6 +3,7 @@ with lib; let cfg = config.profiles.desktop; + dim-screen = pkgs.writeScript "dim-sreen.sh" '' #!${pkgs.stdenv.shell} export PATH=${lib.getBin pkgs.xlibs.xbacklight}/bin:$PATH @@ -12,6 +13,15 @@ xbacklight -time 5000 -steps 400 -set 0 & sleep 2147483647 & wait ''; + + pbpaste = pkgs.writeScriptBin "pbcopy" '' + #!${pkgs.stdenv.shell} + ${pkgs.xsel}/bin/xsel --clipboard --input + ''; + pbcopy = pkgs.writeScriptBin "pbpaste" '' + #!${pkgs.stdenv.shell} + ${pkgs.xsel}/bin/xsel --clipboard --output + ''; in { options = { @@ -111,25 +121,13 @@ in gnome3.gnome_themes_standard keybase mpv + pbcopy + pbpaste peco pass xdg-user-dirs xdg_utils xsel ]; - home.file."bin/pbcopy" = { - text = '' - #!${pkgs.stdenv.shell} - ${pkgs.xsel}/bin/xsel --clipboard --input - ''; - executable = true; - }; - home.file."bin/pbpaste" = { - text = '' - #!${pkgs.stdenv.shell} - ${pkgs.xsel}/bin/xsel --clipboard --output - ''; - executable = true; - }; }; } diff --git a/modules/profiles/emacs.nix b/modules/profiles/emacs.nix @@ -3,6 +3,11 @@ with lib; let cfg = config.profiles.emacs; + + capture = pkgs.writeScriptBin "capture" '' + #!${pkgs.stdenv.shell} + emacsclient -n -F '((name . "capture") (width . 75) (height . 30))' -e '(org-capture)' + ''; in { options = { @@ -195,11 +200,7 @@ in }; } (mkIf config.profiles.desktop.enable { - home.file."bin/capture" = { - source = ./assets/bin/capture; - executable = true; - }; - home.packages = with pkgs; [ wmctrl ]; + home.packages = with pkgs; [ wmctrl capture ]; }) (mkIf config.services.gpg-agent.enable { services.gpg-agent.extraConfig = ''