summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/default.nix5
-rw-r--r--common/nix.nix18
2 files changed, 14 insertions, 9 deletions
diff --git a/common/default.nix b/common/default.nix
index 7b53735..60385d3 100644
--- a/common/default.nix
+++ b/common/default.nix
@@ -1,6 +1,6 @@
1inputs: 1inputs:
2 2
3{ config, lib, ... }: 3{ config, ... }:
4 4
5{ 5{
6 imports = [ 6 imports = [
@@ -27,8 +27,5 @@ inputs:
27 }) 27 })
28 ]; 28 ];
29 29
30 nix.registry = with lib;
31 mapAttrs (name: value: { flake = value; }) inputs;
32
33 services.nscd.enableNsncd = true; 30 services.nscd.enableNsncd = true;
34} 31}
diff --git a/common/nix.nix b/common/nix.nix
index e31bcbf..0e58908 100644
--- a/common/nix.nix
+++ b/common/nix.nix
@@ -1,8 +1,8 @@
1inputs: 1inputs: {
2 2 config,
3{ pkgs, ... }: 3 lib,
4 4 ...
5{ 5}: {
6 nix = { 6 nix = {
7 gc = { 7 gc = {
8 automatic = true; 8 automatic = true;
@@ -14,5 +14,13 @@ inputs:
14 auto-optimise-store = true; 14 auto-optimise-store = true;
15 extra-experimental-features = ["nix-command" "flakes"]; 15 extra-experimental-features = ["nix-command" "flakes"];
16 }; 16 };
17
18 registry = lib.mapAttrs (_name: value: {flake = value;}) inputs;
19 nixPath =
20 lib.mapAttrsToList
21 (name: value: "${name}=${value.flake}")
22 (lib.filterAttrs
23 (name: value: name != "self" && value.flake != null)
24 config.nix.registry);
17 }; 25 };
18} 26}