From 1405bb6d3ff1c95c9e5d247a5e3263b3be7bdbe7 Mon Sep 17 00:00:00 2001 From: Jake Ginesin Date: Sat, 25 Jan 2025 23:28:25 -0500 Subject: [PATCH] 306 current 2025-01-25 22:09:05 25.05.20241217.d3c42f1 6.6.66 * --- flake.nix | 36 +++++++++++++++++++++++++++++++----- scripts/tb.nix | 22 ++++++++-------------- scripts/termbin/tb.nix | 16 ---------------- 3 files changed, 39 insertions(+), 35 deletions(-) delete mode 100644 scripts/termbin/tb.nix diff --git a/flake.nix b/flake.nix index b3265cd..9aa9087 100644 --- a/flake.nix +++ b/flake.nix @@ -48,14 +48,30 @@ # Equivalent to inputs'.nixpkgs.legacyPackages.hello; # packages.default = pkgs.hello; # formatter = pkgs.nixfmt-rfc-style; - # pkgs = import nixpkgs { + + formatter = pkgs.alejandra; + # pkgs = import inputs.nixpkgs { # inherit system; # config.allowUnfree = true; # }; - - formatter = pkgs.alejandra; + # lib = inputs.haumea.lib.load { + # src = ./scripts; + # inputs = { + # inherit nixpkgs; + # }; + # }; }; flake = { + module = {pkgs, ...} @ args: + haumea.lib.load { + src = ./scripts; + inputs = + args + // { + inherit inputs; + }; + }; + # The usual flake attributes can be defined here, including system- # agnostic ones like nixosModule and system-enumerating ones, although # those are more easily expressed in perSystem. @@ -81,7 +97,14 @@ # home.packages = with pkgs; [xrandr procps polybar bspwm sxhkd polybar-pulseaudio-control bluez]; }; - specialArgs = {inherit inputs;}; + + # lib = inputs.haumea.lib.load { + # src = ./scripts; + # inputs = { + # inherit (nixpkgs) lib; + # }; + # }; + # extraSpecialArgs = {inherit inputs;}; modules = [ ./configuration.nix @@ -90,7 +113,10 @@ # agenix.nixosModules.default # home manager # inputs.haumea.nixosModules - # self.h-lib + # (haumea.lib.load { + # src = ./scripts; + # inputs = {inherit pkgs;}; + # }) inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/scripts/tb.nix b/scripts/tb.nix index 12f070e..839789f 100644 --- a/scripts/tb.nix +++ b/scripts/tb.nix @@ -1,16 +1,10 @@ -# scripts.nix {pkgs, ...}: { - home.packages = with pkgs; [ - (writeShellApplication { - name = "termbin"; - runtimeInputs = with pkgs; [ - netcat - ]; - - text = '' - file=$1 - cat "$1" | nc termbin.com 9999 - ''; - }) - ]; + tb = pkgs.writeShellApplication { + name = "termbin"; + runtimeInputs = with pkgs; [netcat]; + text = '' + file=$1 + cat "$file" | nc termbin.com 9999 + ''; + }; } diff --git a/scripts/termbin/tb.nix b/scripts/termbin/tb.nix deleted file mode 100644 index 12f070e..0000000 --- a/scripts/termbin/tb.nix +++ /dev/null @@ -1,16 +0,0 @@ -# scripts.nix -{pkgs, ...}: { - home.packages = with pkgs; [ - (writeShellApplication { - name = "termbin"; - runtimeInputs = with pkgs; [ - netcat - ]; - - text = '' - file=$1 - cat "$1" | nc termbin.com 9999 - ''; - }) - ]; -}