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": { "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1612369752, "lastModified": 1612369752,
@ -33,6 +53,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nur": "nur" "nur": "nur"
} }

View file

@ -1,11 +1,13 @@
{ {
description = "Nixos configuration with flakes"; description = "Nixos configuration with flakes";
inputs = { inputs = {
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
}; };
outputs = { self, nixpkgs, nur }: outputs = { self, nixpkgs, nur, home-manager }:
let let
buildHost = name: system: nixpkgs.lib.nixosSystem { buildHost = name: system: nixpkgs.lib.nixosSystem {
inherit system; inherit system;
@ -20,6 +22,13 @@
}) })
{ nixpkgs.overlays = [ nur.overlay ]; } { nixpkgs.overlays = [ nur.overlay ]; }
(./. + "/${name}.nix") (./. + "/${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 in

5
home/default.nix Normal file
View file

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