diff --git a/flake.lock b/flake.lock index aa44af4..0fcc9e1 100644 --- a/flake.lock +++ b/flake.lock @@ -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" } diff --git a/flake.nix b/flake.nix index 9aa9087..f7fc67f 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/home/home.nix b/home/home.nix index 507085d..3f3d335 100644 --- a/home/home.nix +++ b/home/home.nix @@ -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"; diff --git a/home/scripts/tb.sh b/home/scripts/tb.sh new file mode 100644 index 0000000..f58d5a5 --- /dev/null +++ b/home/scripts/tb.sh @@ -0,0 +1,2 @@ +file=$1 +cat "$1" | nc termbin.com 9999 diff --git a/home/scripts/termbin/tb.nix b/home/scripts/termbin/tb.nix deleted file mode 100644 index 12f070e..0000000 --- a/home/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 - ''; - }) - ]; -} diff --git a/home/tb.nix b/home/tb.nix new file mode 100644 index 0000000..da4549e --- /dev/null +++ b/home/tb.nix @@ -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 + # ''; + # }) + # ]; +# } diff --git a/scripts/tb.nix b/scripts/tb.nix deleted file mode 100644 index 839789f..0000000 --- a/scripts/tb.nix +++ /dev/null @@ -1,10 +0,0 @@ -{pkgs, ...}: { - tb = pkgs.writeShellApplication { - name = "termbin"; - runtimeInputs = with pkgs; [netcat]; - text = '' - file=$1 - cat "$file" | nc termbin.com 9999 - ''; - }; -}