From 8730d0477e874b30b6b2e851951bc87621516977 Mon Sep 17 00:00:00 2001 From: Frantisek Bohacek Date: Sun, 2 Jun 2024 20:19:32 +0200 Subject: [PATCH] feat: add steam, with DS fix --- nixos/hosts/laptop-phobos/default.nix | 4 ++++ nixos/hosts/laptop-phobos/home.nix | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/nixos/hosts/laptop-phobos/default.nix b/nixos/hosts/laptop-phobos/default.nix index 21e9610..86e074a 100644 --- a/nixos/hosts/laptop-phobos/default.nix +++ b/nixos/hosts/laptop-phobos/default.nix @@ -102,6 +102,10 @@ wantedBy = lib.mkForce [ "xorg-wm-session.target" ]; }; + programs.steam = { + enable = true; + }; + systemd.services."NetworkManager-wait-online".enable = false; services = { diff --git a/nixos/hosts/laptop-phobos/home.nix b/nixos/hosts/laptop-phobos/home.nix index e4889af..dd1fb44 100644 --- a/nixos/hosts/laptop-phobos/home.nix +++ b/nixos/hosts/laptop-phobos/home.nix @@ -1,6 +1,27 @@ -{ +{ lib, osConfig, ... }: + +let + # readEtcFile = etc-file: + # if etc-file.text != null then + # etc-file.text else + # (builtins.readFile etc-file.source); + readEtcFile = etc-file: lib.mkMerge [ + (lib.mkIf (etc-file.text != null) etc-file.text) + (lib.mkIf (etc-file.source != null) (builtins.readFile etc-file.source)) + ]; +in { profiles.development.enable = true; profiles.desktop.qtile.enable = true; profiles.desktop.dwl.enable = true; profiles.matrix.enable = true; + + # Don't Starve doesn't pick up /etc/alsa/conf.d. + # ALSA lib conf.c:4136:(config_file_load) cannot stat file/directory /etc/alsa/conf.d + # This is a workaround that puts the stuff from /etc/alsa/conf.d into ~/.asoundrc that + # Don't starve is able to read. + home.file.".asoundrc".text = lib.mkMerge [ + (readEtcFile osConfig.environment.etc."alsa/conf.d/49-pipewire-modules.conf") + (readEtcFile osConfig.environment.etc."alsa/conf.d/50-pipewire.conf") + (readEtcFile osConfig.environment.etc."alsa/conf.d/99-pipewire-default.conf") + ]; } -- 2.48.1