Add gaming profile and make host profile selection explicit

This commit is contained in:
Joshua Yuen 2026-10-06 19:29:25 -04:00
parent 2efa87f90c
commit 0a34d3f062
Signed by: josh
GPG Key ID: 530DA0331EFE99F5
6 changed files with 28 additions and 9 deletions

View File

@ -48,7 +48,6 @@
let let
system = "x86_64-linux"; system = "x86_64-linux";
username = "josh"; username = "josh";
profile = "desktop";
homePath = ./. + "/users/${username}/home.nix"; homePath = ./. + "/users/${username}/home.nix";
pkgs = import nixpkgs { pkgs = import nixpkgs {
@ -60,6 +59,7 @@
mkHost = mkHost =
{ {
host, host,
profile,
extraModules ? [ ], extraModules ? [ ],
}: }:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
@ -79,12 +79,19 @@
in in
{ {
nixosConfigurations = { nixosConfigurations = {
laptop = mkHost { host = "laptop"; }; laptop = mkHost {
host = "laptop";
profile = "gaming";
};
vm = mkHost { host = "vm"; }; vm = mkHost {
host = "vm";
profile = "desktop";
};
live = mkHost { live = mkHost {
host = "installation-iso"; host = "installation-iso";
profile = "desktop";
extraModules = [ extraModules = [
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix") (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
{ environment.systemPackages = [ install-system.packages.${system}.default ]; } { environment.systemPackages = [ install-system.packages.${system}.default ]; }
@ -94,7 +101,8 @@
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration { homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs profile username; inherit inputs username;
profile = "desktop";
}; };
inherit pkgs; inherit pkgs;
modules = [ modules = [

View File

@ -1,9 +1,10 @@
{ {
profile,
... ...
}: }:
{ {
imports = [ imports = [
../../profiles/desktop ../../profiles/${profile}
../../modules/nixos ../../modules/nixos
../../modules/drivers ../../modules/drivers

View File

@ -1,9 +1,10 @@
{ {
profile,
... ...
}: }:
{ {
imports = [ imports = [
../../profiles/desktop ../../profiles/${profile}
../../modules/nixos ../../modules/nixos
../../modules/drivers ../../modules/drivers

View File

@ -1,9 +1,10 @@
{ {
profile,
... ...
}: }:
{ {
imports = [ imports = [
../../profiles/desktop ../../profiles/${profile}
../../modules/nixos ../../modules/nixos
../../modules/drivers ../../modules/drivers

View File

@ -29,6 +29,4 @@
modules.screenshot.enable = true; modules.screenshot.enable = true;
modules.tailscale.enable = true; modules.tailscale.enable = true;
modules.steam.enable = true;
} }

View File

@ -0,0 +1,10 @@
{
...
}:
{
imports = [
../desktop
];
modules.steam.enable = true;
}