nixos-config/2configs/gui/base.nix

98 lines
2.4 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2015-08-07 12:10:02 +02:00
##
# of course this name is a lie
# - it prepares a GUI environment close to my
# current configuration,specifically:
2015-08-07 12:10:02 +02:00
#
# * autologin with mainUser into awesome
# * audio
# * terminus font
2015-08-07 12:10:02 +02:00
#
# if this is not enough, check out main-laptop.nix
2015-12-03 20:37:04 +01:00
2016-10-20 20:54:38 +02:00
with import <stockholm/lib>;
2015-08-07 12:10:02 +02:00
let
mainUser = config.krebs.build.user.name;
in
{
2017-04-17 13:11:32 +02:00
imports = [
./urxvtd.nix
];
2015-08-05 15:11:52 +02:00
services.xserver = {
enable = true;
layout = "us";
2015-08-07 12:53:38 +02:00
xkbVariant = "altgr-intl";
2017-05-24 16:53:57 +02:00
xkbOptions = "ctrl:nocaps, eurosign:e";
2015-08-05 15:11:52 +02:00
windowManager = {
awesome.enable = true;
awesome.luaModules = [ pkgs.luaPackages.vicious ];
default = "awesome";
};
2015-08-07 12:10:02 +02:00
displayManager.auto.enable = true;
displayManager.auto.user = mainUser;
2015-08-05 15:11:52 +02:00
desktopManager.xterm.enable = false;
};
2016-02-11 17:06:50 +01:00
# lid switch is handled via button presses
services.logind.extraConfig = mkDefault "HandleLidSwitch=ignore";
2016-04-17 02:03:15 +02:00
makefu.awesome.enable = true;
i18n.consoleFont = "Lat2-Terminus16";
fonts = {
enableCoreFonts = true;
enableFontDir = true;
2017-03-24 13:02:26 +01:00
enableGhostscriptFonts = true;
fonts = [ pkgs.terminus_font ];
};
environment.systemPackages = with pkgs;[
2015-10-14 00:10:15 +02:00
pavucontrol
xlockmore
rxvt_unicode-with-plugins
firefox
2015-08-07 12:10:02 +02:00
];
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
2017-05-12 11:29:46 +02:00
XTerm*FaceName : xft:xos4 Terminus:pixelsize=11
URxvt*termName: rxvt
2016-04-03 21:43:02 +02:00
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
2017-05-12 11:29:46 +02:00
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
2017-03-01 15:45:50 +01:00
URxvt.url-select.launcher: firefox -new-tab
URxvt.url-select.underline: true
URxvt.searchable-scrollback: CM-s
'';
2016-08-02 11:49:24 +02:00
in ''
cat ${xdefaultsfile} | xrdb -merge
${pkgs.xorg.xhost}/bin/xhost +local:
'';
}