flake: add flake.nix

No flake.lock is added because the only input (nixpkgs) will almost
always be overridden, and currently Home Manager's testing and
verification is not flake based.

PR #1455
This commit is contained in:
Tony Olagbaiye 2020-08-26 07:13:05 +01:00 committed by Robert Helgesson
parent a79d31fcfd
commit 6cf6b587b5
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
3 changed files with 24 additions and 0 deletions

2
.github/CODEOWNERS vendored
View File

@ -1,5 +1,7 @@
* @rycee
/flake.nix @bqv @kisik21
/modules/home-environment.nix @rycee
/modules/misc/dconf.nix @gnidorah @rycee

1
.gitignore vendored
View File

@ -1 +1,2 @@
/flake.lock
/result*

21
flake.nix Normal file
View File

@ -0,0 +1,21 @@
{
description = "Home Manager for Nix";
outputs = { self, nixpkgs }: rec {
nixosModules.home-manager = import ./nixos;
lib = {
homeManagerConfiguration = { configuration, system, homeDirectory
, username
, pkgs ? builtins.getAttr system nixpkgs.outputs.legacyPackages
, check ? true }@args:
import ./modules {
inherit pkgs check;
configuration = { ... }: {
imports = [ configuration ];
home = { inherit homeDirectory username; };
};
};
};
};
}