mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
* XMonad base config
* Polybar
* development environment for emacs
* flake bump
Flake lock file updates:
• Added input 'flake-utils':
'github:numtide/flake-utils/cfacdce06f30d2b68473a46042957675eebb3401' (2023-04-11)
• Added input 'flake-utils/systems':
'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
• Added input 'flake-utils-plus':
'github:gytis-ivaskevicius/flake-utils-plus/2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a' (2022-07-07)
• Added input 'flake-utils-plus/flake-utils':
'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07)
• Added input 'nixpkgs':
'github:NixOS/nixpkgs/7629f9b0680d87c7775f3261bee746da5dac76d1' (2023-05-08)
• Added input 'nixpkgs-unstable':
'github:NixOS/nixpkgs/897876e4c484f1e8f92009fd11b7d988a121a4e7' (2023-05-06)
103 lines
2.6 KiB
Nix
103 lines
2.6 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; {
|
|
options.elss.graphical = {
|
|
enable = mkEnableOption "configure graphical layer";
|
|
greeterCursorsize = mkOption {
|
|
type = types.int;
|
|
default = 16;
|
|
description = ''
|
|
Size of the cursortheme in the lightdm greeter
|
|
'';
|
|
};
|
|
dpi = mkOption {
|
|
type = types.nullOr types.int;
|
|
default = null;
|
|
description = ''
|
|
DPI setting for the xserver
|
|
'';
|
|
};
|
|
xserver.enable = mkEnableOption "enable X server";
|
|
xmonad = {
|
|
enable = mkEnableOption "enable xmonad";
|
|
polybar.enable = mkEnableOption "enable Polybar for xmonad";
|
|
};
|
|
i3.enable = mkEnableOption "enable i3";
|
|
};
|
|
config = let
|
|
cfg = config.elss.graphical;
|
|
#cursorsize = if config.variables.hostName == "nucturne" then 14 else 16;
|
|
#xserverDPI = if config.variables.hostName == "stel-xps" then 180 else null;
|
|
|
|
okular-x11 = pkgs.symlinkJoin {
|
|
name = "okular";
|
|
paths = [pkgs.okular];
|
|
buildInputs = [pkgs.makeWrapper];
|
|
postBuild = ''
|
|
wrapProgram $out/bin/okular \
|
|
--set QT_QPA_PLATFORM xcb
|
|
'';
|
|
};
|
|
in
|
|
mkIf cfg.enable {
|
|
# cfg.xserver.enable = cfg.i3.enable;
|
|
elss.users.x11.enable = cfg.xserver.enable || cfg.xmonad.enable;
|
|
|
|
elss.networking.useNetworkManager = true;
|
|
|
|
services = {
|
|
xserver = mkIf cfg.xserver.enable {
|
|
enable = true;
|
|
dpi = cfg.dpi;
|
|
displayManager.lightdm = {
|
|
enable = true;
|
|
greeters.gtk.cursorTheme.size = cfg.greeterCursorsize;
|
|
};
|
|
windowManager.i3 = mkIf cfg.i3.enable {
|
|
enable = true;
|
|
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 = true;
|
|
|
|
hardware = {
|
|
#pulseaudio.enable = true;
|
|
bluetooth.enable = true;
|
|
};
|
|
|
|
security.pam.services.lightdm.enableGnomeKeyring = true;
|
|
|
|
services.blueman.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
ungoogled-chromium
|
|
# force okular to use xwayland, because of https://github.com/swaywm/sway/issues/4973
|
|
okular-x11
|
|
texlive.combined.scheme-full
|
|
usbutils
|
|
keepassxc
|
|
libsecret
|
|
];
|
|
};
|
|
}
|