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,4 +1,4 @@
{ inputs, pkgs, stateVersion, hostname, username, hostConfig, ... }:
{ pkgs, stateVersion, hostname, ... }:
{
imports = [ # Include the results of the hardware scan.
../hosts/${hostname}/hardware-configuration.nix
@ -15,11 +15,9 @@
./includes/system/overlay.nix
];
nixpkgs.config.allowUnfree = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = hostname;
console = {
@ -30,32 +28,10 @@
useXkbConfig = true; # use xkbOptions in tty.
};
environment.systemPackages = with pkgs; [
git
zsh
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit hostConfig;
inherit hostname;
};
# NixOS system-wide home-manager configuration
sharedModules = [
inputs.sops-nix.homeManagerModules.sops
];
users.${username} = {
home.stateVersion = stateVersion;
imports = [
../home-manager/base.nix
];
};
};
system.stateVersion = stateVersion;
}