nix/testing/home-manager.nix
2023-06-29 21:00:39 +09:00

25 lines
No EOL
751 B
Nix

{ config, pkgs, ... }:
# https://mipmip.github.io/home-manager-option-search/
# https://nix-community.github.io/home-manager/index.html
let
if ${nixos-version} == "unstable":
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in
{
imports = [
(import "${home-manager}/nixos")
./variables.nix
];
home-manager.users.${username} = {
/* The home.stateVersion option does not have a default and must be set */
home.stateVersion = "${nixos-version}";
/* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */
programs.git = {
enable = true;
userName = "${username}";
userEmail = "${email_address}";
};}
};
}