add comments

This commit is contained in:
Mohamed Chrayed 2024-08-16 15:19:40 +02:00
parent bc06438f3d
commit b1cfb62360

View File

@ -1,5 +1,6 @@
{
description = "Moe.OS";
# Define Inputs
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = {
@ -13,12 +14,14 @@
inputs.home-manager.follows = "home-manager";
};
};
# Define Outputs, import Modules
outputs = { nixpkgs, home-manager, jovian, plasma-manager, ...}:
let
# Define system globally since I have no aarch devices
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system;};
lib = nixpkgs.lib;
# NixOS Modules for all hosts
systemModules = [
home-manager.nixosModules.home-manager
./modules/system/apps-shell
@ -32,7 +35,7 @@
./modules/system/upgrades
./modules/system/users
];
# Home Manager Modules for all hosts
userModules = [
./modules/user/git
./modules/user/homeversion
@ -41,12 +44,14 @@
{
nixosConfigurations = {
# user and hostName variable inside hostConfig so we can call it in other modules
computer-mo = let
user = "mo";
hostName = "computer-mo";
in lib.nixosSystem {
specialArgs = {inherit systemModules; inherit userModules; inherit system; inherit user; inherit hostName;};
system = system;
# Device specific NixOS Modules
modules = systemModules ++ [
jovian.nixosModules.jovian
./hosts/${hostName}
@ -58,10 +63,11 @@
./modules/system/plasma
./modules/system/steam
{
# Device specific Home Manager Modules
home-manager.users.${user}.imports = userModules ++ [
./modules/user/plasma
];
# Issue with Plasma Manager, has to be imported in a special way
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
}
];