~ruther/nixos-config

ref: f2df73bae72b69a2900bb552b5d55094c582eafe nixos-config/nixos/hosts/laptop-phobos/home.nix -rw-r--r-- 1.0 KiB
f2df73ba — Frantisek Bohacek chore: update dwl 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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")
  ];
}
Do not follow this link