feat: improve flake structure
This commit is contained in:
parent
969be6b552
commit
b30e96b595
6 changed files with 91 additions and 74 deletions
modules
17
modules/flakeDefaults.nix
Normal file
17
modules/flakeDefaults.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, lib, self, inputs, ... }:
|
||||
|
||||
let
|
||||
flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
|
||||
nixRegistry = builtins.mapAttrs (name: v: { flake = v; }) flakes;
|
||||
in {
|
||||
# Let 'nixos-version --json' know about the Git revision
|
||||
# of this flake.
|
||||
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
|
||||
|
||||
nix = {
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
nixPath = lib.mapAttrsToList (n: v: "${n}=${v}") flakes;
|
||||
registry = nixRegistry;
|
||||
package = pkgs.nixUnstable;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue