Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit1368ba721f508684577e96edbeca488afb7ad7b9 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-12-16 16:09:45 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-12-16 16:09:45 +0200
Files415f0a608a11285020c8c67936d34c71c672c176
nix-1368ba721f508684577e96edbeca488afb7ad7b9.tar
nix-1368ba721f508684577e96edbeca488afb7ad7b9.tar.gz
nix-1368ba721f508684577e96edbeca488afb7ad7b9.zip
Parent0d2f382f0ffc7ff9b336eca9c07027f4ce701149 (diff)
[autoconfig] Added support for custom packages under ./packages
1 files changed, 10 insertions, 3 deletions
-rw-r--r--autoconfig.nix13
diff --git a/autoconfig.nix b/autoconfig.nix
index ee8b108..fa2caaa 100644
--- a/autoconfig.nix
+++ b/autoconfig.nix
@@ -19,12 +19,19 @@ in {
inputs-overlays =
lib.mapAttrs
- (_: nixpkgs:
- nixpkgs.legacyPackages.${sysidentity.arch})
+ (_: nixpkgs-special:
+ nixpkgs-special.legacyPackages.${sysidentity.arch})
(lib.filterAttrs
(name: _:
lib.hasPrefix "nixpkgs-" name)
inputs);
+
+ custom-packages-overlays =
+ lib.mapAttrs
+ (name: _:
+ nixpkgs.legacyPackages.${sysidentity.arch}.callPackage ./packages/${name} { })
+ (lib.filterAttrs (_: type: type == "directory") (builtins.readDir ./packages));
+
in
lib.nixosSystem {
system = sysidentity.arch;
@@ -33,7 +40,7 @@ in {
./configuration.nix
({ ... }: {
networking.hostName = sysidentity.name;
- nixpkgs.overlays = [ (_: _: inputs-overlays) ];
+ nixpkgs.overlays = [ (_: _: inputs-overlays) (_: _: custom-packages-overlays) ];
})
]
++ (if lib.pathIsRegularFile ./machines/${dir}/configuration.nix