Started work on home-manager directory configs
This commit is contained in:
parent
a74c1b431c
commit
636f39e9d5
3 changed files with 156 additions and 0 deletions
28
.config/home-manager/flake.nix
Normal file
28
.config/home-manager/flake.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
description = "Home Manager multi-machine flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }: let
|
||||
# Get system type (Linux or MacOS, x86_64 or ARM)
|
||||
system = builtins.currentSystem;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
# Get current machine hostname
|
||||
hostname = builtins.getEnv "HOSTNAME";
|
||||
in {
|
||||
homeConfigurations = {
|
||||
"${hostname}" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
./common.nix
|
||||
./${hostname}/home.nix
|
||||
];
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue