diff --git a/flake.nix b/flake.nix index 592c4f7..a0b11f2 100644 --- a/flake.nix +++ b/flake.nix @@ -45,18 +45,19 @@ ./hosts/generic/users.nix ./hosts/generic/home-persistence.nix ./hosts/generic/zapret.nix + ./hosts/generic/allow_unfree.nix ./hosts/Aphelion/hardware-Aphelion.nix ./hosts/Aphelion/nvidia.nix ./desktop/gnome.nix ./misc/disable_suspend.nix + ./home/yaroslav/steam.nix home-manager.nixosModules.home-manager zapret.nixosModules.zapret { home-manager.useUserPackages = true; home-manager.users.yaroslav = { imports = [ - ./home/yaroslav/Aphelion/Aphelion.nix - ./home/yaroslav/steam.nix + ./home/yaroslav/Aphelion/Aphelion.nix ]; }; } diff --git a/home/yaroslav/home.nix b/home/yaroslav/home.nix index c91456e..ae40528 100644 --- a/home/yaroslav/home.nix +++ b/home/yaroslav/home.nix @@ -49,6 +49,7 @@ in nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "obsidian" "yandex-music" + "steam" ]; home.packages = with pkgs; [ firefox diff --git a/home/yaroslav/steam.nix b/home/yaroslav/steam.nix index 9633648..3cc146b 100644 --- a/home/yaroslav/steam.nix +++ b/home/yaroslav/steam.nix @@ -1,16 +1,9 @@ -{ lib, ... }: +{ config, lib, ... }: { - programs.steam = { +programs.steam = { enable = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers }; - - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "steam" - "steam-original" - "steam-unwrapped" - "steam-run" - ]; } diff --git a/hosts/Aphelion/nvidia.nix b/hosts/Aphelion/nvidia.nix index 3abef1d..ed75c34 100644 --- a/hosts/Aphelion/nvidia.nix +++ b/hosts/Aphelion/nvidia.nix @@ -1,10 +1,5 @@ -{ config, lib, ... }: -{ - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "nvidia-x11" - "nvidia-settings" - ]; +{ ... }: +{ boot.initrd.kernelModules = [ "nvidia" ]; hardware.graphics.enable = true; services.xserver.videoDrivers = [ "nvidia" ]; diff --git a/hosts/generic/home-persistence.nix b/hosts/generic/home-persistence.nix index c8f6e57..00733d4 100644 --- a/hosts/generic/home-persistence.nix +++ b/hosts/generic/home-persistence.nix @@ -26,6 +26,7 @@ files = [ ".p10k.zsh" ".zsh_history" + ".config/monitors.xml" ]; }; }; diff --git a/hosts/generic/unfree_allow.nix b/hosts/generic/unfree_allow.nix new file mode 100644 index 0000000..876a37f --- /dev/null +++ b/hosts/generic/unfree_allow.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +{ + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "nvidia-x11" + "nvidia-settings" + "steam" + "steam-unwrapped" + "steam-original" + "steam-run" + ]; +}