aboutsummaryrefslogtreecommitdiff
path: root/lib/nix-furnace/default.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2025-06-09 19:43:34 +0000
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2025-06-09 19:43:34 +0000
commitf3b7a6a33588ad425de02c4b841df19f30733e44 (patch)
treeab6a8524350fda5868bf3f43187affbdb0895ce6 /lib/nix-furnace/default.nix
parenta45c4551712c1ba5cb82eaf290f311ab0e8690e4 (diff)
reorganize programs, move functions to library, and remove the rest of hyprland (all sway now)
Diffstat (limited to 'lib/nix-furnace/default.nix')
-rw-r--r--lib/nix-furnace/default.nix31
1 files changed, 6 insertions, 25 deletions
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 =
[