Expose self as a flake

This commit is contained in:
Alexander Bantyev 2020-05-22 21:30:25 +03:00
parent 4ae7aa9efa
commit c19c3b8056
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 92 additions and 91 deletions

View File

@ -82,7 +82,7 @@
};
};
outputs = { nixpkgs, nix, ... }@inputs: {
outputs = { nixpkgs, nix, self, ... }@inputs: {
nixosConfigurations = with nixpkgs.lib;
let
hosts = map (fname: builtins.head (builtins.match "(.*)\\.nix" fname))
@ -94,5 +94,7 @@
specialArgs = { inherit inputs name; };
};
in genAttrs hosts mkHost;
legacyPackages.x86_64-linux =
(builtins.head (builtins.attrValues self.nixosConfigurations)).pkgs;
};
}

View File

@ -25,6 +25,8 @@ in {
inherit (old) mautrix-telegram;
inherit old;
yt-utilities =
import (self.fetchgit config.secrets.yt-utilities.source) { };
@ -56,10 +58,7 @@ in {
];
binaryCaches = [ "https://cache.nixos.org" "https://cache.balsoft.ru" ];
registry.nixpkgs = {
from = { id = "nixpkgs"; type = "indirect"; };
flake = inputs.nixpkgs;
};
registry.self.flake = inputs.self;
trustedUsers = [ "root" "balsoft" "@wheel" ];