A collection of scripts

Add initial nix flake

yemou 6938f408 8807ff74

+1
.gitignore
···
··· 1 + result*
+37
.nix/colorgrab.nix
···
··· 1 + { writeScriptBin 2 + , bash 3 + , coreutils 4 + , grim 5 + , imagemagick 6 + , libnotify 7 + , slurp 8 + , wl-clipboard 9 + , xdg-utils 10 + , ... 11 + }: 12 + 13 + writeScriptBin "colorgrab" (builtins.replaceStrings 14 + [ 15 + "#!/bin/sh" 16 + "mkdir" 17 + "printf" 18 + "grim" 19 + "slurp" 20 + "convert" 21 + "wl-copy" 22 + "xdg-open" 23 + "notify-send" 24 + ] 25 + [ 26 + "#!${bash}/bin/sh" 27 + "${coreutils}/bin/mkdir" 28 + "${coreutils}/bin/printf" 29 + "${grim}/bin/grim" 30 + "${slurp}/bin/slurp" 31 + "${imagemagick}/bin/convert" 32 + "${wl-clipboard}/bin/wl-copy" 33 + "${xdg-utils}/bin/xdg-open" 34 + "${libnotify}/bin/notify-send" 35 + ] 36 + (builtins.readFile ../scritps/colorgrab) 37 + )
+22
.nix/prefon.nix
···
··· 1 + { writeScriptBin 2 + , bash 3 + , coreutils 4 + , imagemagick 5 + , ... 6 + }: 7 + 8 + writeScriptBin "prefon" (builtins.replaceStrings 9 + [ 10 + "#!/bin/sh" 11 + "printf" 12 + "convert" 13 + "rm" 14 + ] 15 + [ 16 + "#!${bash}/bin/sh" 17 + "${coreutils}/bin/printf" 18 + "${imagemagick}/bin/convert" 19 + "${coreutils}/bin/rm" 20 + ] 21 + (builtins.readFile ../scritps/prefon) 22 + )
+37
.nix/scr.nix
···
··· 1 + { writeScriptBin 2 + , bash 3 + , coreutils 4 + , ffmpeg 5 + , grim 6 + , pulseaudio 7 + , slurp 8 + , wf-recorder 9 + , wl-clipboard 10 + , ... 11 + }: 12 + 13 + writeScriptBin "scr" (builtins.replaceStrings 14 + [ 15 + "#!/bin/sh" 16 + "printf" 17 + "mkdir" 18 + "ffmpeg" 19 + "grim" 20 + "slurp" 21 + "wl-copy" 22 + "pactl" 23 + "wf-recorder" 24 + ] 25 + [ 26 + "#!${bash}/bin/sh" 27 + "${coreutils}/bin/printf" 28 + "${coreutils}/bin/mkdir" 29 + "${ffmpeg}/bin/ffmpeg" 30 + "${grim}/bin/grim" 31 + "${slurp}/bin/slurp" 32 + "${wl-clipboard}/bin/wl-copy" 33 + "${pulseaudio}/bin/pactl" 34 + "${wf-recorder}/bin/wf-recorder" 35 + ] 36 + (builtins.readFile ../scritps/scr) 37 + )
+24
.nix/thm.nix
···
··· 1 + { writeScriptBin 2 + , bash 3 + , coreutils 4 + , gnused 5 + , ... 6 + }: 7 + 8 + writeScriptBin "thm" (builtins.replaceStrings 9 + [ 10 + "#!/bin/sh" 11 + "printf" 12 + "mkdir" 13 + "mv" 14 + "sed" 15 + ] 16 + [ 17 + "#!${bash}/bin/sh" 18 + "${coreutils}/bin/printf" 19 + "${coreutils}/bin/mkdir" 20 + "${coreutils}/bin/mv" 21 + "${gnused}/bin/sed" 22 + ] 23 + (builtins.readFile ../scritps/thm) 24 + )
+27
flake.lock
···
··· 1 + { 2 + "nodes": { 3 + "nixpkgs": { 4 + "locked": { 5 + "lastModified": 1704194953, 6 + "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", 7 + "owner": "NixOS", 8 + "repo": "nixpkgs", 9 + "rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "NixOS", 14 + "ref": "nixos-unstable", 15 + "repo": "nixpkgs", 16 + "type": "github" 17 + } 18 + }, 19 + "root": { 20 + "inputs": { 21 + "nixpkgs": "nixpkgs" 22 + } 23 + } 24 + }, 25 + "root": "root", 26 + "version": 7 27 + }
+34
flake.nix
···
··· 1 + { 2 + inputs = { 3 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 4 + }; 5 + 6 + outputs = { self, nixpkgs, ... }: { 7 + overlays.default = final: prev: rec { 8 + colorgrab = final.callPackage ./.nix/colorgrab.nix { }; 9 + prefon = final.callPackage ./.nix/prefon.nix { }; 10 + scr = final.callPackage ./.nix/scr.nix { }; 11 + thm = final.callPackage ./.nix/thm.nix { }; 12 + yemou-scripts = final.symlinkJoin { 13 + name = "yemou-scripts"; 14 + paths = [ colorgrab prefon scr thm ]; 15 + }; 16 + }; 17 + 18 + packages."x86_64-linux" = 19 + let 20 + pkgs = import nixpkgs { 21 + system = "x86_64-linux"; 22 + overlays = [ self.overlays.default ]; 23 + }; 24 + in 25 + { 26 + colorgrab = pkgs.colorgrab; 27 + default = pkgs.yemou-scripts; 28 + prefon = pkgs.prefon; 29 + scr = pkgs.scr; 30 + thm = pkgs.thm; 31 + yemou-scripts = pkgs.yemou-scripts; 32 + }; 33 + }; 34 + }