1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00
nixos/layer/graphical.nix

63 lines
1.4 KiB
Nix

{ config, pkgs, lib, ... }:
let
isgraphical = config.variables.graphical;
cursorsize = if config.variables.hostName == "nucturne" then 14 else 16;
in
{
networking.networkmanager.enable = isgraphical;
services = {
xserver = {
enable = isgraphical;
displayManager.lightdm = {
enable = isgraphical;
greeters.gtk.cursorTheme.size = cursorsize;
};
# displayManager.sessionCommands = ''
# ${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
# Xcursor.size: 14
# EOF
# '';
windowManager.i3 = {
enable = isgraphical;
extraPackages = with pkgs; [
rofi # launcher
polybarFull # bar
i3lock # lock screen
xss-lock
autorandr
];
extraSessionCommands = ''
${pkgs.autorandr}/bin/autorandr -c
'';
};
layout = "us";
xkbOptions = "eurosign:e";
};
gnome.gnome-keyring.enable = true;
printing.enable = true;
};
sound.enable = isgraphical;
hardware = {
pulseaudio.enable = isgraphical;
bluetooth.enable = isgraphical;
};
services.blueman.enable = isgraphical;
environment.systemPackages = if isgraphical then with pkgs; [
firefox
#alacritty
thunderbird
okular
texlive.combined.scheme-full
usbutils
keepassxc
gnome.libsecret
arandr
] else [ ];
}