refactor: change hosts configuration to be more modular

This commit is contained in:
Youwen Wu 2024-08-07 01:01:58 -07:00
parent ee4c922eb2
commit e5c3d9c52b
3 changed files with 46 additions and 10 deletions

View file

@ -39,6 +39,42 @@
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "x86_64-linux";
modules = [
./hosts/nixos
./modules/nixos/secureboot.nix
./modules/nixos/gaming.nix
./modules/nixos/audio.nix
./modules/nixos/nvidia.nix
./modules/nixos/networking.nix
./modules/common/fonts.nix
catppuccin.nixosModules.catppuccin
lix-module.nixosModules.default
lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.youwen = {
imports = [
./users/youwen/linux/linux-home.nix
./users/youwen/linux/desktop.nix
./users/youwen/linux/programs.nix
./users/youwen/common/core.nix
./users/youwen/linux/catppuccin.nix
inputs.catppuccin.homeManagerModules.catppuccin
];
};
}
];
};
callisto = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "x86_64-linux";
modules = [
@ -64,11 +100,11 @@
home-manager.backupFileExtension = "backup";
home-manager.users.youwen = {
imports = [
./users/youwen/home-manager/linux/linux-home.nix
./users/youwen/home-manager/linux/desktop.nix
./users/youwen/home-manager/linux/programs.nix
./users/youwen/home-manager/common/core.nix
./users/youwen/home-manager/linux/catppuccin.nix
./users/youwen/linux/linux-home.nix
./users/youwen/linux/desktop.nix
./users/youwen/linux/programs.nix
./users/youwen/common/core.nix
./users/youwen/linux/catppuccin.nix
inputs.catppuccin.homeManagerModules.catppuccin
];
};
@ -88,8 +124,8 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.youwen.imports = [
./modules/home-manager/darwin/darwin-home.nix
./modules/home-manager/common/core.nix
./users/youwen/darwin/darwin-home.nix
./users/youwen/common/core.nix
];
home-manager.backupFileExtension = "backup";

View file

@ -5,9 +5,9 @@
{ config, inputs, pkgs, ... }:
{
# imports = [ # Include the results of the hardware scan.
# ./hardware-configuration.nix
# ];
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader = {