nixos-config/base/gui-programs.nix

64 lines
1.4 KiB
Nix
Raw Normal View History

{ pkgs, lib, config, options, ... }:
2022-01-11 16:08:21 +01:00
let
inherit (lib)
mkEnableOption
mkIf
optional
;
in
2021-04-16 21:33:48 +02:00
{
options.my.gui = {
2022-01-11 16:08:21 +01:00
enable = mkEnableOption "System has some kind of screen attached";
isNvidia = mkEnableOption "System a NVIDIA GPU";
};
2022-01-11 16:08:21 +01:00
config = mkIf config.my.gui.enable {
my.displayManager.sddm.enable = true;
services = {
xserver = {
enable = true;
# NOTE: could use `mkOptionDefault` but this feels more explicit
videoDrivers = if config.my.gui.isNvidia then [ "nvidia" ]
else options.services.xserver.videoDrivers.default;
windowManager.i3.enable = true;
layout = "fr";
xkbVariant = "us";
libinput.enable = true;
};
};
2022-01-11 16:08:21 +01:00
environment.systemPackages = builtins.attrValues {
inherit (pkgs)
element-desktop
feh
firefox
ffmpeg
gimp
imagemagick
mpv
obs-studio
pavucontrol
slack
spotify
tdesktop
teams
thunderbird
virt-manager
zathura
;
2021-04-18 14:46:12 +02:00
2022-01-11 16:08:21 +01:00
inherit (pkgs.gnome) nautilus;
inherit (pkgs.unstable) discord;
};
networking.networkmanager.enable = true;
programs.nm-applet.enable = true;
programs.steam.enable = true;
# NOTE: needed for home emacs configuration
nixpkgs.config.input-fonts.acceptLicense = true;
};
2021-04-16 21:33:48 +02:00
}