From f3b7a6a33588ad425de02c4b841df19f30733e44 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Mon, 9 Jun 2025 19:43:34 +0000 Subject: reorganize programs, move functions to library, and remove the rest of hyprland (all sway now) --- lib/nix-furnace/default.nix | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'lib/nix-furnace') diff --git a/lib/nix-furnace/default.nix b/lib/nix-furnace/default.nix index 7c18ae9..303730e 100644 --- a/lib/nix-furnace/default.nix +++ b/lib/nix-furnace/default.nix @@ -1,27 +1,6 @@ let - lazyImport = path: - if (builtins.pathExists path) - then import path - else {}; - - mkIfNull = cond: onTrue: - if cond - then onTrue - else null; - - getSubdirs = dir: - builtins.filter (x: x != null) - (builtins.attrValues - (builtins.mapAttrs - (name: value: mkIfNull (value == "directory") name) - (builtins.readDir dir))); - - getSubfiles = dir: - builtins.filter (x: x != null) - (builtins.attrValues - (builtins.mapAttrs - (name: value: mkIfNull (value == "file") name) - (builtins.readDir dir))); + my-lib = import ../lib.nix; + inherit (my-lib.globimport) lazyImport getSubdirs getSubfiles; mkHomeImports = modName: [ (lazyImport ../../modules/${modName}/options.nix) @@ -65,9 +44,11 @@ let }; }; }; + + specialArgs = {inherit inputs my-lib;}; in inputs.nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; + inherit specialArgs; modules = [ {networking.hostName = hostname;} @@ -85,7 +66,7 @@ let backupFileExtension = "bak"; useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = {inherit inputs;}; + extraSpecialArgs = specialArgs; users."${username}" = { imports = [ -- cgit v1.3.1