project: rename self flake input to config

This commit is contained in:
Gabriel Arazas 2023-11-08 21:48:56 +08:00
parent 934ecd0bd5
commit 8938c60ce7
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -11,8 +11,18 @@
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem { nixosConfigurations.desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
({ config, lib, ... }: { ({ config, lib, pkgs, ... }: {
nix.registry = lib.mapAttrs (_: flake: { inherit flake; }) inputs; # Setting each of the flake inputs as part of the system registry
# including our own flake which is just renamed from "self" to
# "config".
nix.registry =
lib.mapAttrs'
(name: flake:
let
name' = if (name == "self") then "config" else name;
in
lib.nameValuePair name' { inherit flake; })
inputs;
}) })
./hosts/desktop ./hosts/desktop
]; ];