refactor: separate NixOS and Home-Manager configuration

This commit is contained in:
Yorick Barbanneau 2024-10-09 00:37:47 +02:00
parent 9edca93fd5
commit d446f84030
5 changed files with 75 additions and 127 deletions

View file

@ -1,12 +1,23 @@
{ stateVersion, username, inputs, ... }:
{ inputs, lib, stateVersion, username, hostname, ... }:
{
home.stateVersion = stateVersion;
home.username = "${username}";
home.homeDirectory = "/home/${username}";
fonts.fontconfig.enable = true;
imports = [
inputs.sops-nix.homeManagerModules.sops
./base.nix
../hosts/${hostname}/home-config.nix
../nixos/includes/system/overlay.nix
];
../modules/home-manager/default.nix
] ++ lib.optional (
builtins.pathExists ../hosts/${hostname}/includes/home-manager.nix
) ../hosts/${hostname}/includes/home-manager.nix;
nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true;
fonts.fontconfig.enable = true;
home = {
inherit stateVersion username;
homeDirectory = "/home/${username}";
sessionPath = [
"$HOME/.local/bin"
];
};
}