This commit is contained in:
Mohamed Chrayed 2024-08-16 16:37:35 +02:00
parent aeda5c47ce
commit 7da9c00d71

View File

@ -15,7 +15,14 @@
};
};
# Define Outputs, import Modules
outputs = { nixpkgs, home-manager, jovian, plasma-manager, ...}:
outputs =
{
nixpkgs,
home-manager,
jovian,
plasma-manager,
...
}:
let
# Define system globally since I have no aarch devices
system = "x86_64-linux";
@ -42,14 +49,22 @@
];
in
{
nixosConfigurations = {
# Workstation config
# user and hostName variable inside hostConfig so we can call it in other modules
computer-mo = let
computer-mo =
let
user = "mo";
hostName = "computer-mo";
in lib.nixosSystem {
specialArgs = {inherit systemModules; inherit userModules; inherit system; inherit user; inherit hostName;};
in
lib.nixosSystem {
specialArgs = {
inherit systemModules;
inherit userModules;
inherit system;
inherit user;
inherit hostName;
};
system = system;
# Device specific NixOS Modules
modules = systemModules ++ [
@ -73,5 +88,42 @@
];
};
};
# Steamdeck config
# user and hostName variable inside hostConfig so we can call it in other modules
steamdeck =
let
user = "deck";
hostName = "steamdeck";
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}
./modules/system/apps-misc
./modules/system/browser
./modules/system/controller
./modules/system/jovian-desktop
./modules/system/lact
./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 ];
}
];
};
};
}