flocon/modules/nix/programs/games.nix
Anthony Rodriguez de6052693e
treewide: huge refactor, move everything into modules
As my configuration was getting more and more complex, I thought it was
time to switch to a completely modular approach. A local module system
has been created, containing profiles (some will be added later, as I
went with as generic as I could, but I would like to make them more
specialized).

NixOS and home-manager modules have also been separated, which I don't
like too much, and will switch to a cleaner implementation of home
management systems.

commit 09a07b15da
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Jan 15 22:56:32 2025 +0100

    treewide: config/home-manager -> modules/hm

    Moved every remaining home-manager piece of configuration to its own
hm
    module.

commit d7356d3fde
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Wed Jan 15 14:55:03 2025 +0100

    modules/nix/services: add keyd

commit c846cc95ae
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 21:41:13 2025 +0100

    flake: update inputs

commit 94d59b47b3
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 21:41:09 2025 +0100

    modules/nix/services: remove kanata

commit 4429b604dd
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 21:41:01 2025 +0100

    config/home-manager: remove services/udiskie.nix

commit 376024d4a5
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 20:06:31 2025 +0100

    treewide: config/home-manager/services -> modules/hm/services

commit b808281674
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 19:33:31 2025 +0100

    treewide: config/home-manager -> modules/hm

    Started moving HM config to the new local modules system.
Conditionally
    toggling based on profiles and modules.

commit 2b77ac239e
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 15:10:49 2025 +0100

    treewide: config/nixos/services -> modules/nix/services

    Moved every service in their own module, and conditionally enable
them
    based on profiles.

commit 7aadc0c8fe
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 14:44:38 2025 +0100

    modules/nix/programs/hyprland: make chromium/electron apps run on
Wayland

commit ec285bcc52
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:58:52 2025 +0100

    treewide: config/nixos/programs -> modules/nix/programs

    Here, we also use the option we just added,
`local.modules.hyprland.enable` to toggle Hyprland, as well as the
profiles. Also removed other unused configuration, such as KDE/Gnome.

commit 76a2caa9c7
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 14:07:41 2025 +0100

    options/modules: add options for Hyprland

commit 9f3d6ae768
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:56:56 2025 +0100

    config/nix/programs: cleanup unused files

commit f3c08b8431
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:55:17 2025 +0100

    treewide: config/nixos/programs/fonts -> modules/nix/core/fonts

commit c37f00205b
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:49:29 2025 +0100

    treewide: config/nixos/nix -> modules/nix/core/nix.nix

commit a734372732
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 13:43:23 2025 +0100

    treewide: config/nixos/network -> modules/nix/core/networking

commit 07a9c5f510
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:34:01 2025 +0100

    treewide: move hardware into modules

commit 7d1baf7eb5
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:33:21 2025 +0100

    options: use mkIf for assertions

commit 9b01b40253
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:33:00 2025 +0100

    hosts: set profiles

    We set profiles before moving the config so nothing breaks and we
keep a
    working commit history :)

commit 65ea8beba0
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:22:06 2025 +0100

    options: remove isServer since we have server profile

commit 7906864ae1
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:21:49 2025 +0100

    options/profiles: add laptop profile

commit 99b6b41de3
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 12:01:33 2025 +0100

    treewide: migrate config/system/core to modules

    Moved everything from core into modules. I want to get all the NixOS
    stuff moved first, and do home-manager after. I used the different
    profiles to disable configuration that might break my server, as it
has
    its own configuration already. This will need to be refactored
later, as
    I want to ultimately only use the local module system.

commit b89a42ef13
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 11:59:59 2025 +0100

    modules/options: add profiles

    The next step in the refactoring is to add different profiles, so
that
    we may toggle them easily in our hosts. Here's the profiles I went
for:

    - desktop: enables everything a desktop computer needs (graphics,
    productivity apps, base apps such as browsers...)
    - gaming: enables gaming configurations (steam, gamescope...)
    - server: enables server configurations (website hosting, git
forge...)

    I made sure the server profile can not be enabled if desktop/gaming
are
    enabled, as it would not make sense to have desktop applications and
    configurations on a server.

commit 851024052d
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 11:02:13 2025 +0100

    modules: move style to nix/style

    This is temporary, as we're going to get rid of that awkward style
    module that was meant to be shared, but ended up being too specific
to
    my use-case. We just put it in a nix directory for now, as we will
with
    everything else. This will be refactored later to be mixed with the
    relevant program's configuration.

commit bb55875491
Author: Anthony Rodriguez <anthony@nezia.dev>
Date:   Tue Jan 14 10:56:34 2025 +0100

    treewide: move shared/nixosModules to modules

    The idea of this refactor is, as the configuration is getting bigger
and
    more complex, to move everything into a local modules system. The
idea
    is to simplify hosts declaration and add a new layer of abstraction
to
    avoid the long and redundant imports in hosts/default.nix, that I am
    currently using.

    First, we're going to move everything to the modules directory, and
    split options from the proper configuration. That allows us to have
an
    easier time understanding how the options are structured, as they
will
    follow the directory structure and won't be mixed with the module
    configuration.
2025-01-15 23:00:13 +01:00

21 lines
316 B
Nix

{
lib,
config,
...
}: {
config = lib.mkIf config.local.profiles.gaming.enable {
programs = {
steam = {
enable = true;
};
gamemode.enable = true;
gamescope.enable = true;
coolercontrol = {
enable = true;
nvidiaSupport = true;
};
};
};
}