{ config, lib, pkgs, ... }: { options.snowflake.workstation.desktop = { enable = lib.mkEnableOption "enable gnome desktop"; autoLoginUser = lib.mkOption { type = lib.types.str; description = "user to autostart gnome with"; }; }; config = lib.mkIf config.snowflake.workstation.desktop.enable { # base packages required everywhere environment = { systemPackages = with pkgs; [ # video player mpv # ani-skip # to skip anime intros # doesn't work, hence removing # file sharing localsend # libraries x265 # HEVC support for firefox / mpv ]; gnome.excludePackages = (with pkgs; [ gnome-photos gnome-tour gedit # text editor cheese # webcam tool gnome-terminal epiphany # web browser geary # email reader totem # video player gnome-calendar gnome-music gnome-characters tali # poker game iagno # go game hitori # sudoku game atomix # puzzle game ]); }; # Enable the X11 windowing system. services.xserver.enable = true; # Enable the GNOME Desktop Environment. services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; # prevent sleeping on lid close services.displayManager.autoLogin.enable = true; services.displayManager.autoLogin.user = config.snowflake.workstation.desktop.autoLoginUser; # tap to click across app using libinput services.libinput.enable = true; services.libinput.touchpad.tapping = true; # workaround for autologin - https://nixos.wiki/wiki/GNOME#automatic%20login systemd.services."getty@tty1".enable = false; systemd.services."autovt@tty1".enable = false; # Configure keymap in X11 services.xserver = { xkb.layout = "us"; # swap Escape key with CapsLock (requires reboot, since done at system # level), but this will not apply at user level in gnome since that is # taken care of by gnome # will only work in gdm right now as of writing this xkb.options = "caps:swapescape"; xkb.variant = ""; }; fonts.packages = with pkgs; [ noto-fonts noto-fonts-cjk-sans noto-fonts-emoji # fira-code fira-code-symbols # jetbrains-mono # font for neovim (nerdfonts.override { fonts = [ "FiraCode" "Iosevka" "JetBrainsMono" ]; }) ]; # Enable Bluetooth hardware.bluetooth = { enable = true; powerOnBoot = true; }; # mouse configurator services.ratbagd.enable = true; # higher openssh security services.openssh = { settings.PermitRootLogin = "no"; }; # Allow unfree packages hardware.enableAllFirmware = true; nixpkgs.config.allowUnfree = true; # Enable CUPS to print documents. services.printing.enable = true; # Enable sound with pipewire. # sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; wireplumber.enable = true; # If you want to use JACK applications, uncomment this jack.enable = true; }; programs.dconf.enable = true; # Enable OpenGL hardware.graphics = { enable = true; enable32Bit = true; }; services.fwupd.enable = true; }; }