306 current 2025-01-25 22:09:05 25.05.20241217.d3c42f1 6.6.66 *

This commit is contained in:
2025-01-26 00:29:12 -05:00
parent 1405bb6d3f
commit b3728610ad
7 changed files with 68 additions and 135 deletions

22
flake.lock generated
View File

@@ -18,27 +18,6 @@
"type": "github"
}
},
"haumea": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1685133229,
"narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=",
"owner": "nix-community",
"repo": "haumea",
"rev": "34dd58385092a23018748b50f9b23de6266dffc2",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v0.2.2",
"repo": "haumea",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -90,7 +69,6 @@
"root": {
"inputs": {
"flake-parts": "flake-parts",
"haumea": "haumea",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}

View File

@@ -10,26 +10,22 @@
inputs.nixpkgs.follows = "nixpkgs";
};
haumea = {
url = "github:nix-community/haumea/v0.2.2";
inputs.nixpkgs.follows = "nixpkgs";
};
# haumea = {
# url = "github:nix-community/haumea/v0.2.2";
# inputs.nixpkgs.follows = "nixpkgs";
# };
};
outputs = inputs @ {
flake-parts,
self,
haumea,
nixpkgs,
...
}:
flake-parts.lib.mkFlake {
inherit inputs;
} {
imports = [
# To import a flake module
#cajun-xmonad.default
];
imports = [];
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = {
@@ -50,28 +46,8 @@
# formatter = pkgs.nixfmt-rfc-style;
formatter = pkgs.alejandra;
# pkgs = import inputs.nixpkgs {
# inherit system;
# config.allowUnfree = true;
# };
# 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.
@@ -87,36 +63,16 @@
# "package" = pkgs."package".overrideAttrs (attrs: {...})
};
};
overlays = [
# (final: prev: {
# nur = import inputs.nur {inherit (final) pkgs;};
# })
# inputs.emacs-overlay.overlay -- breaks doom on 30.??
# inputs.nur.overlay
];
overlays = [];
# home.packages = with pkgs; [xrandr procps polybar bspwm sxhkd polybar-pulseaudio-control bluez];
};
# lib = inputs.haumea.lib.load {
# src = ./scripts;
# inputs = {
# inherit (nixpkgs) lib;
# };
# };
specialArgs = {inherit inputs;};
# extraSpecialArgs = {inherit inputs;};
modules = [
./configuration.nix
# inputs.nixos-hardware.nixosModules.system76-gaze18
# agenix
# agenix.nixosModules.default
# home manager
# inputs.haumea.nixosModules
# (haumea.lib.load {
# src = ./scripts;
# inputs = {inherit pkgs;};
# })
# self.module
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;

View File

@@ -3,7 +3,48 @@
pkgs,
lib,
...
}: {
}: let
# readScriptsRecursively = dir: let
# entries = builtins.readDir dir; # This gives an attrset of filenames -> { "type": "regular"|"directory", ...}
# names = builtins.attrNames entries;
# in
# # We convert all items to a list of name/value pairs; then flatten them
# lib.attrsets.listToAttrs (lib.concatMap (
# entry: let
# fullPath = "${dir}/${entry}";
# entryInfo = entries.${entry}; # e.g., {type="regular"|"directory",size=...}
# in
# if entryInfo.type == "directory"
# then
# # Recursively read sub-directory
# builtins.attrValues (readScriptsRecursively fullPath)
# else
# # For a file, produce an attribute set item
# [
# {
# name = entry;
# value = fullPath;
# }
# ]
# )
# names);
# scripts = readScriptsRecursively ./scripts;
# scriptDerivations =
# lib.attrsets.mapAttrs (
# scriptName: scriptPath:
# pkgs.writeShellApplication {
# name = scriptName;
# # Pick whatever runtime dependencies you need
# runtimeInputs = with pkgs; [
# # Example: netcat, bashInteractive, curl, etc.
# netcat
# ];
# # The text of the shell script is read directly from the file
# text = builtins.readFile scriptPath;
# }
# )
# scripts;
in {
home.username = "synchronous";
home.homeDirectory = "/home/synchronous";
imports = [
@@ -23,40 +64,6 @@
# home.packages = with pkgs; [xrandr procps polybar bspwm sxhkd polybar-pulseaudio-control bluez];
# home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
# ];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
EDITOR = "nvim";
HOME = "/home/synchronous";

2
home/scripts/tb.sh Normal file
View File

@@ -0,0 +1,2 @@
file=$1
cat "$1" | nc termbin.com 9999

View File

@@ -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
'';
})
];
}

16
home/tb.nix Normal file
View File

@@ -0,0 +1,16 @@
# scripts.nix
# {pkgs, ...}: {
# home.packages = with pkgs; [
# (writeShellApplication {
# name = "termbin";
# runtimeInputs = with pkgs; [
# netcat
# ];
# text = ''
# file=$1
# cat "$1" | nc termbin.com 9999
# '';
# })
# ];
# }

View File

@@ -1,10 +0,0 @@
{pkgs, ...}: {
tb = pkgs.writeShellApplication {
name = "termbin";
runtimeInputs = with pkgs; [netcat];
text = ''
file=$1
cat "$file" | nc termbin.com 9999
'';
};
}