feat: games
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam.enable = false;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
services.gnome-keyring.enable = true;
|
||||
|
||||
programs.prismlauncher.enable = true;
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
services.flatpak.packages = [
|
||||
"nz.mega.MEGAsync"
|
||||
"com.bitwarden.desktop"
|
||||
"org.prismlauncher.PrismLauncher"
|
||||
"org.mozilla.Thunderbird"
|
||||
"net.blockbench.Blockbench"
|
||||
];
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
./krita
|
||||
./neovim.nix
|
||||
./obsidian
|
||||
./prismlauncher.nix
|
||||
./wezterm.nix
|
||||
];
|
||||
options = {};
|
||||
|
||||
30
modules/home-manager/programs/prismlauncher.nix
Normal file
30
modules/home-manager/programs/prismlauncher.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.programs.prismlauncher;
|
||||
in {
|
||||
imports = [];
|
||||
options.programs.prismlauncher = with lib;
|
||||
with lib.types; {
|
||||
enable = mkEnableOption "";
|
||||
flatpak = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
config = with lib;
|
||||
mkIf cfg.enable {
|
||||
services.flatpak = mkIf cfg.flatpak {
|
||||
packages = ["org.prismlauncher.PrismLauncher"];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; mkIf (!cfg.flatpak) [prismlauncher];
|
||||
programs.java = mkIf (!cfg.flatpak) {
|
||||
enable = true;
|
||||
package = mkDefault pkgs.jdk17;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
imports = [
|
||||
./nih
|
||||
./hyprland.nix
|
||||
./steam.nix
|
||||
];
|
||||
options = {};
|
||||
config = {};
|
||||
|
||||
34
modules/nixos/programs/steam.nix
Normal file
34
modules/nixos/programs/steam.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.programs.steam;
|
||||
in {
|
||||
imports = [];
|
||||
options.programs.steam = with lib;
|
||||
with lib.types; {
|
||||
wayland = mkOption {
|
||||
type = bool;
|
||||
default = config.programs.hyprland.enable;
|
||||
};
|
||||
};
|
||||
config = with lib;
|
||||
mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [steam-run];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"steam"
|
||||
"steam-original"
|
||||
"steam-run"
|
||||
];
|
||||
|
||||
programs.steam = {
|
||||
gamescopeSession = mkIf cfg.wayland {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user