diff options
Diffstat (limited to 'makefu/2configs/gui')
-rw-r--r-- | makefu/2configs/gui/base.nix | 97 | ||||
-rw-r--r-- | makefu/2configs/gui/studio.nix | 22 | ||||
-rw-r--r-- | makefu/2configs/gui/urxvtd.nix | 21 | ||||
-rw-r--r-- | makefu/2configs/gui/wbob-kiosk.nix | 23 |
4 files changed, 163 insertions, 0 deletions
diff --git a/makefu/2configs/gui/base.nix b/makefu/2configs/gui/base.nix new file mode 100644 index 000000000..bf6bef29d --- /dev/null +++ b/makefu/2configs/gui/base.nix @@ -0,0 +1,97 @@ +{ config, lib, pkgs, ... }: +## +# of course this name is a lie +# - it prepares a GUI environment close to my +# current configuration,specifically: +# +# * autologin with mainUser into awesome +# * audio +# * terminus font +# +# if this is not enough, check out main-laptop.nix + + +with import <stockholm/lib>; +let + mainUser = config.krebs.build.user.name; +in +{ + imports = [ + ./urxvtd.nix + ]; + + services.xserver = { + enable = true; + layout = "us"; + xkbVariant = "altgr-intl"; + xkbOptions = "ctrl:nocaps"; + + windowManager = { + awesome.enable = true; + awesome.luaModules = [ pkgs.luaPackages.vicious ]; + default = "awesome"; + }; + + displayManager.auto.enable = true; + displayManager.auto.user = mainUser; + desktopManager.xterm.enable = false; + }; + # lid switch is handled via button presses + services.logind.extraConfig = mkDefault "HandleLidSwitch=ignore"; + makefu.awesome.enable = true; + i18n.consoleFont = "Lat2-Terminus16"; + + fonts = { + enableCoreFonts = true; + enableFontDir = true; + enableGhostscriptFonts = true; + fonts = [ pkgs.terminus_font ]; + }; + + environment.systemPackages = with pkgs;[ + pavucontrol + xlockmore + rxvt_unicode-with-plugins + firefox + ]; + users.extraUsers.${mainUser}.extraGroups = [ "audio" ]; + + hardware.pulseaudio = { + enable = true; + systemWide = true; + }; + services.xserver.displayManager.sessionCommands = let + xdefaultsfile = pkgs.writeText "Xdefaults" '' + cat |derp <<EOF + XTerm*background: black + XTerm*foreground: white + XTerm*FaceName : xft:xos4 Terminus:pixelsize=11 + + URxvt*termName: rxvt + URxvt*saveLines: 10000 + URxvt*loginShell: false + URxvt.scrollBar : false + URxvt*scrollBar_right: false + URxvt*borderLess: false + URxvt.foreground: white + URxvt.background: black + URxvt.urgentOnBell: true + URxvt.visualBell: false + URxvt.font : xft:xos4 Terminus:size=11 + + + ! blue + URxvt*color4: #268bd2 + + + URxvt.perl-ext: default,url-select + URxvt.keysym.M-u: perl:url-select:select_next + URxvt.url-select.launcher: firefox -new-tab + URxvt.url-select.underline: true + URxvt.searchable-scrollback: CM-s + ''; + in '' + cat ${xdefaultsfile} | xrdb -merge + ${pkgs.xorg.xhost}/bin/xhost +local: + ''; +} diff --git a/makefu/2configs/gui/studio.nix b/makefu/2configs/gui/studio.nix new file mode 100644 index 000000000..08157fda4 --- /dev/null +++ b/makefu/2configs/gui/studio.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: +let + user = config.makefu.gui.user; +in +{ + services.xserver.enable = true; + services.xserver.displayManager.sddm = { + enable = true; + autoLogin.enable = true; + autoLogin.user = user; + }; + # services.xserver.windowMananger.default = "plasma5"; + services.xserver.desktopManager = { + default = "plasma5"; + plasma5.enable = true; + }; + + services.xserver.layout = "us"; + services.xserver.xkbVariant = "altgr-intl"; + services.xserver.xkbOptions = "ctrl:nocaps"; + +} diff --git a/makefu/2configs/gui/urxvtd.nix b/makefu/2configs/gui/urxvtd.nix new file mode 100644 index 000000000..286b87ab3 --- /dev/null +++ b/makefu/2configs/gui/urxvtd.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +let + mainUser = config.krebs.build.user.name; +in { + systemd.services.urxvtd = { + wantedBy = [ "multi-user.target" ]; + before = [ "graphical.target" ]; + reloadIfChanged = true; + serviceConfig = { + SyslogIdentifier = "urxvtd"; + ExecReload = "${pkgs.coreutils}/bin/echo NOP"; + ExecStart = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtd"; + Restart = "always"; + RestartSec = "2s"; + StartLimitBurst = 0; + User = mainUser; + }; + }; + # TODO: sessionCommands from base-gui related to urxvt in this file +} diff --git a/makefu/2configs/gui/wbob-kiosk.nix b/makefu/2configs/gui/wbob-kiosk.nix new file mode 100644 index 000000000..4b7a0c333 --- /dev/null +++ b/makefu/2configs/gui/wbob-kiosk.nix @@ -0,0 +1,23 @@ +{ lib, ... }: +{ + + imports = [ + ./base.nix + ]; + services.xserver = { + layout = lib.mkForce "de"; + + windowManager = lib.mkForce { + awesome.enable = false; + default = "none"; + }; + desktopManager.xfce.enable = true; + + # xrandrHeads = [ "HDMI1" "HDMI2" ]; + # prevent screen from turning off, disable dpms + displayManager.sessionCommands = '' + xset s off -dpms + xrandr --output HDMI2 --right-of HDMI1 + ''; + }; +} |