flake: add home-manager

This commit is contained in:
Bruno BELANYI 2021-02-18 21:27:08 +00:00
parent 5e8aac2a5e
commit c0feb8a462
3 changed files with 36 additions and 1 deletions

View File

@ -1,5 +1,25 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1613535568,
"narHash": "sha256-JeTRN/ee6QTP/IlR89dz1LHMi8ag0kW/Kf8hT6d12sY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2e795f3efd6265e3d538d4ee78bba773e1044340",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1612369752,
@ -33,6 +53,7 @@
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nur": "nur"
}

View File

@ -1,11 +1,13 @@
{
description = "Nixos configuration with flakes";
inputs = {
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
};
outputs = { self, nixpkgs, nur }:
outputs = { self, nixpkgs, nur, home-manager }:
let
buildHost = name: system: nixpkgs.lib.nixosSystem {
inherit system;
@ -20,6 +22,13 @@
})
{ nixpkgs.overlays = [ nur.overlay ]; }
(./. + "/${name}.nix")
home-manager.nixosModules.home-manager
{
home-manager.users.ambroisie = import ./home;
# Nix Flakes compatibility
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
in

5
home/default.nix Normal file
View File

@ -0,0 +1,5 @@
{ ... }:
{
imports = [
];
}