1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

Add steam module

This commit is contained in:
Stefan Ellmauthaler 2024-05-22 14:29:28 +02:00
parent eac96a858a
commit cfd6515043
No known key found for this signature in database
2 changed files with 47 additions and 20 deletions

View File

@ -1,11 +1,15 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/profiles/qemu-guest.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"];
@ -13,18 +17,18 @@
boot.kernelModules = []; boot.kernelModules = [];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/d56cbded-5e03-4fa2-bcfd-3a284bdae664"; device = "/dev/disk/by-uuid/d56cbded-5e03-4fa2-bcfd-3a284bdae664";
fsType = "xfs"; fsType = "xfs";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/12CE-A600"; device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/e9ec410f-8e92-4daf-a0b8-90828df6f96f"; } {device = "/dev/disk/by-uuid/e9ec410f-8e92-4daf-a0b8-90828df6f96f";}
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking

23
modules/steam.nix Normal file
View File

@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
...
}:
with lib; {
options.elss.steam.enable = mkEnableOption "Enable steam";
config = let
cfg = config.elss.steam;
in
mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
gamescopeSession.enable = true;
};
};
}