Add flakes

This commit is contained in:
Florian RICHER 2023-08-19 23:40:25 +02:00
parent ae5e6508bc
commit b1d54aef28
2 changed files with 91 additions and 0 deletions

47
flake.lock Normal file
View file

@ -0,0 +1,47 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1692448348,
"narHash": "sha256-/Wy9Bzw59A5OD82S9dWHshg+wiSzJNh95hPXNhO5K7E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "bdb5bcad01ff7332fdcf4b128211e81905113f84",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1692356644,
"narHash": "sha256-AYkPFT+CbCVSBmh0WwIzPpwhEJ4Yy3A7JZvUkGJIg5o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8ecc900b2f695d74dea35a92f8a9f9b32c8ea33d",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

44
flake.nix Normal file
View file

@ -0,0 +1,44 @@
{
description = "System config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ...}@inputs:
let
inherit (nixpkgs) lib;
util = import ./lib {
inherit system pkgs home-manager lib; overlays = (pkgs.overlays);
};
inherit (util) user;
inherit (util) host;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [];
};
system = "x86_64-linux";
in {
homeManagerConfigurations = {
jq = user.mkHMUser {
};
};
nixosConfigurations = {
laptop = host.mkHost {
};
};
};
}