2022-08-25 12:21:35 -06:00
|
|
|
{ config, lib, pkgs, ... }:
|
2022-10-13 21:32:47 -06:00
|
|
|
let
|
|
|
|
rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; });
|
|
|
|
in with lib; {
|
2022-08-25 12:21:35 -06:00
|
|
|
imports = [ ./gnome.nix ./kde.nix ./xfce.nix ./arcan.nix ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
pulse = {
|
|
|
|
enable = mkOption {
|
|
|
|
description = "Enable PulseAudio";
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
type = types.bool;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
pipewire = {
|
|
|
|
enable = mkOption {
|
|
|
|
description = "Enable PipeWire";
|
|
|
|
default = true;
|
|
|
|
example = true;
|
|
|
|
type = types.bool;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkMerge [
|
|
|
|
(mkIf config.arcan.enable {
|
|
|
|
sound.enable = true;
|
|
|
|
services = { xserver.enable = false; };
|
|
|
|
environment.systemPackages = with pkgs; [ brave go-font vlc pcsctools ];
|
|
|
|
})
|
|
|
|
(mkIf (config.kde.enable || config.gnome.enable || config.xfce.enable) {
|
|
|
|
|
|
|
|
services = {
|
|
|
|
xserver.enable = true;
|
|
|
|
pcscd.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# TODO: TEMP FIX
|
|
|
|
systemd.services.NetworkManager-wait-online.serviceConfig.ExecStart =
|
|
|
|
lib.mkForce [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
|
|
|
|
|
|
|
|
sound.enable = true;
|
|
|
|
security.rtkit.enable = true;
|
2022-10-13 21:32:47 -06:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
brave
|
|
|
|
go-font
|
|
|
|
vlc
|
|
|
|
pcsctools
|
|
|
|
rage
|
|
|
|
];
|
2022-08-25 12:21:35 -06:00
|
|
|
|
|
|
|
programs = {
|
|
|
|
firejail = {
|
|
|
|
enable = true;
|
|
|
|
wrappedBinaries = {
|
2022-09-09 07:03:56 -06:00
|
|
|
#firefox = {
|
|
|
|
# executable = "${lib.getBin pkgs.firefox}/bin/firefox";
|
|
|
|
# profile = "${pkgs.firejail}/etc/firejail/firefox.profile";
|
|
|
|
#};
|
2022-08-25 12:21:35 -06:00
|
|
|
#brave = {
|
|
|
|
# executable = "${lib.getBin pkgs.brave}/bin/brave";
|
|
|
|
# profile = "${pkgs.firejail}/etc/firejail/brave.profile";
|
|
|
|
#};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
})
|
|
|
|
(mkIf config.pulse.enable { hardware.pulseaudio = { enable = true; }; })
|
|
|
|
(mkIf config.pipewire.enable {
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|