summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-02-16 00:05:38 +0100
committerlassulus <lass@lassul.us>2017-02-16 00:08:05 +0100
commit679ccce6bd5feef4edd7533a67536836f7b7aa26 (patch)
treef465e04433f875e6c6093a88d562a6d63ce14ceb /lass/2configs
parent1b5196f4fdc8dc32fb771d518f08a769329b5fd9 (diff)
l 2: use upstream xserver
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/baseX.nix60
-rw-r--r--lass/2configs/fetchWallpaper.nix4
-rw-r--r--lass/2configs/xserver/Xresources.nix66
-rw-r--r--lass/2configs/xserver/default.nix147
-rw-r--r--lass/2configs/xserver/xserver.conf.nix40
5 files changed, 28 insertions, 289 deletions
diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix
index 2933ca0e..539fdc87 100644
--- a/lass/2configs/baseX.nix
+++ b/lass/2configs/baseX.nix
@@ -1,13 +1,13 @@
{ config, pkgs, ... }:
-
+with import <stockholm/lib>;
let
- mainUser = config.users.extraUsers.mainUser;
+ user = config.krebs.build.user;
in {
imports = [
- ./xserver
./mpv.nix
./power-action.nix
./screenlock.nix
+ ./copyq.nix
{
hardware.pulseaudio = {
enable = true;
@@ -66,37 +66,31 @@ in {
youtube-tools
rxvt_unicode
- #window manager stuff
- #haskellPackages.xmobar
- #haskellPackages.yeganesh
- #dmenu2
- #xlibs.fontschumachermisc
];
- #fonts.fonts = [
- # pkgs.xlibs.fontschumachermisc
- #];
-
- #services.xserver = {
- # enable = true;
-
- # windowManager.xmonad.extraPackages = hspkgs: with hspkgs; [
- # X11-xshape
- # ];
- # windowManager.xmonad.enable = true;
- # windowManager.xmonad.enableContribAndExtras = true;
- # windowManager.default = "xmonad";
- # desktopManager.default = "none";
- # desktopManager.xterm.enable = false;
- # displayManager.slim.enable = true;
- # displayManager.auto.enable = true;
- # displayManager.auto.user = mainUser.name;
-
- # layout = "us";
- # xkbModel = "evdev";
- # xkbVariant = "altgr-intl";
- # xkbOptions = "caps:backspace";
- #};
+ fonts.fonts = [
+ pkgs.xlibs.fontschumachermisc
+ ];
+
+ services.xserver = {
+ enable = true;
+
+ desktopManager.xterm.enable = false;
+ displayManager.slim.enable = true;
+ windowManager.session = [{
+ name = "xmonad";
+ start = ''
+ ${pkgs.xorg.xhost}/bin/xhost +LOCAL:
+ ${pkgs.xmonad-lass}/bin/xmonad &
+ waitPID=$!
+ '';
+ }];
+
+ layout = "us";
+ xkbModel = "evdev";
+ xkbVariant = "altgr-intl";
+ xkbOptions = "caps:backspace";
+ };
services.logind.extraConfig = ''
HandleLidSwitch=ignore
@@ -107,4 +101,6 @@ in {
twoFingerScroll = true;
accelFactor = "0.035";
};
+
+ services.urxvtd.enable = true;
}
diff --git a/lass/2configs/fetchWallpaper.nix b/lass/2configs/fetchWallpaper.nix
index 29f32199..971be958 100644
--- a/lass/2configs/fetchWallpaper.nix
+++ b/lass/2configs/fetchWallpaper.nix
@@ -9,9 +9,5 @@ in {
url = "prism/wallpaper.png";
maxTime = 10;
};
- systemd.services.fetchWallpaper = {
- after = [ "xmonad.service" ];
- wantedBy = [ "xmonad.service" ];
- };
}
diff --git a/lass/2configs/xserver/Xresources.nix b/lass/2configs/xserver/Xresources.nix
deleted file mode 100644
index 3049774f..00000000
--- a/lass/2configs/xserver/Xresources.nix
+++ /dev/null
@@ -1,66 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-pkgs.writeText "Xresources" ''
- URxvt*scrollBar: false
- URxvt*urgentOnBell: true
- URxvt*font: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-*
- URxvt*boldFont: -*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-*
-
- ! ref https://github.com/muennich/urxvt-perls
- URxvt.perl-lib: ${pkgs.urxvt_perls}/lib/urxvt/perl
- URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
- URxvt.url-select.launcher: ${config.lass.browser.select}/bin/browser-select
- URxvt.url-select.underline: true
- URxvt.keysym.M-u: perl:url-select:select_next
- URxvt.keysym.M-Escape: perl:keyboard-select:activate
- URxvt.keysym.M-s: perl:keyboard-select:search
-
- URxvt.intensityStyles: false
-
- URxvt*background: #050505
- ! URxvt*background: #041204
-
- !URxvt.depth: 32
- !URxvt*background: rgba:0500/0500/0500/cccc
-
- ! URxvt*background: #080810
- URxvt*foreground: #d0d7d0
- ! URxvt*background: black
- ! URxvt*foreground: white
- ! URxvt*background: rgb:00/00/40
- ! URxvt*foreground: rgb:a0/a0/d0
- ! XTerm*cursorColor: rgb:00/00/60
- URxvt*cursorColor: #f042b0
- URxvt*cursorColor2: #f0b000
- URxvt*cursorBlink: off
- ! URxvt*cursorUnderline: true
- ! URxvt*highlightColor: #232323
- ! URxvt*highlightTextColor: #b0ffb0
-
- URxvt*.pointerBlank: true
- URxvt*.pointerBlankDelay: 987654321
- URxvt*.pointerColor: #f042b0
- URxvt*.pointerColor2: #050505
-
- ! URxvt*color0: #000000
- ! URxvt*color1: #c00000
- ! URxvt*color2: #80c070
- URxvt*color3: #c07000
- ! URxvt*color4: #0000c0
- URxvt*color4: #4040c0
- ! URxvt*color5: #c000c0
- ! URxvt*color6: #008080
- URxvt*color7: #c0c0c0
-
- URxvt*color8: #707070
- URxvt*color9: #ff6060
- URxvt*color10: #70ff70
- URxvt*color11: #ffff70
- URxvt*color12: #7070ff
- URxvt*color13: #ff50ff
- URxvt*color14: #70ffff
- URxvt*color15: #ffffff
-
-''
diff --git a/lass/2configs/xserver/default.nix b/lass/2configs/xserver/default.nix
deleted file mode 100644
index cba4db76..00000000
--- a/lass/2configs/xserver/default.nix
+++ /dev/null
@@ -1,147 +0,0 @@
-{ config, pkgs, ... }@args:
-with import <stockholm/lib>;
-let
- user = config.krebs.build.user;
-
- copyqConfig = pkgs.writeDash "copyq-config" ''
- ${pkgs.copyq}/bin/copyq config check_clipboard true
- ${pkgs.copyq}/bin/copyq config check_selection true
- ${pkgs.copyq}/bin/copyq config copy_clipboard true
- ${pkgs.copyq}/bin/copyq config copy_selection true
-
- ${pkgs.copyq}/bin/copyq config activate_closes true
- ${pkgs.copyq}/bin/copyq config clipboard_notification_lines 0
- ${pkgs.copyq}/bin/copyq config clipboard_tab &clipboard
- ${pkgs.copyq}/bin/copyq config disable_tray true
- ${pkgs.copyq}/bin/copyq config hide_tabs true
- ${pkgs.copyq}/bin/copyq config hide_toolbar true
- ${pkgs.copyq}/bin/copyq config item_popup_interval true
- ${pkgs.copyq}/bin/copyq config maxitems 1000
- ${pkgs.copyq}/bin/copyq config move true
- ${pkgs.copyq}/bin/copyq config text_wrap true
- '';
-in {
-
- environment.systemPackages = [
- pkgs.gitAndTools.qgit
- pkgs.mpv
- pkgs.sxiv
- pkgs.xsel
- pkgs.zathura
- ];
-
- fonts.fonts = [
- pkgs.xlibs.fontschumachermisc
- ];
-
- services.xserver = {
- enable = true;
- display = 11;
- tty = 11;
-
- synaptics = {
- enable = true;
- twoFingerScroll = true;
- accelFactor = "0.035";
- };
-
- layout = "us";
- xkbVariant = "altgr-intl";
- xkbOptions = "caps:backspace";
- };
-
- systemd.services.display-manager.enable = false;
-
- systemd.services.xmonad = {
- wantedBy = [ "multi-user.target" ];
- requires = [ "xserver.service" ];
- environment = {
- DISPLAY = ":${toString config.services.xserver.display}";
-
- XMONAD_STARTUP_HOOK = pkgs.writeDash "xmonad-startup-hook" ''
- ${pkgs.xorg.xhost}/bin/xhost +LOCAL: &
- ${pkgs.xorg.xrdb}/bin/xrdb -merge ${import ./Xresources.nix args} &
- ${pkgs.xorg.xsetroot}/bin/xsetroot -solid '#1c1c1c' &
- wait
- '';
-
- XMONAD_STATE = "/tmp/xmonad.state";
-
- # XXX JSON is close enough :)
- XMONAD_WORKSPACES0_FILE = pkgs.writeText "xmonad.workspaces0" (toJSON [
- "dashboard" # we start here
- ]);
- };
- serviceConfig = {
- SyslogIdentifier = "xmonad";
- ExecStart = "${pkgs.xmonad-lass}/bin/xmonad";
- ExecStop = pkgs.writeScript "xmonad-stop" ''
- #! /bin/sh
- ${pkgs.xmonad-lass}/bin/xmonad --shutdown
- ${pkgs.coreutils}/bin/sleep 2s
- '';
- User = user.name;
- WorkingDirectory = user.home;
- };
- };
-
- systemd.services.xserver = {
- after = [
- "systemd-udev-settle.service"
- "local-fs.target"
- "acpid.service"
- ];
- reloadIfChanged = true;
- environment = {
- XKB_BINDIR = "${pkgs.xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
- XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime.
- LD_LIBRARY_PATH = concatStringsSep ":" (
- [ "${pkgs.xorg.libX11}/lib" "${pkgs.xorg.libXext}/lib" ]
- ++ concatLists (catAttrs "libPath" config.services.xserver.drivers));
- };
- serviceConfig = {
- SyslogIdentifier = "xserver";
- ExecReload = "${pkgs.coreutils}/bin/echo NOP";
- ExecStart = toString [
- "${pkgs.xorg.xorgserver}/bin/X"
- ":${toString config.services.xserver.display}"
- "vt${toString config.services.xserver.tty}"
- "-config ${import ./xserver.conf.nix args}"
- "-logfile /dev/null -logverbose 0 -verbose 3"
- "-nolisten tcp"
- "-xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb"
- ];
- };
- };
-
- systemd.services.urxvtd = {
- wantedBy = [ "multi-user.target" ];
- reloadIfChanged = true;
- serviceConfig = {
- SyslogIdentifier = "urxvtd";
- ExecReload = "${pkgs.coreutils}/bin/echo NOP";
- ExecStart = "${pkgs.rxvt_unicode}/bin/urxvtd";
- Restart = "always";
- RestartSec = "2s";
- StartLimitBurst = 0;
- User = user.name;
- };
- };
-
- systemd.services.copyq = {
- wantedBy = [ "multi-user.target" ];
- requires = [ "xserver.service" ];
- environment = {
- DISPLAY = ":${toString config.services.xserver.display}";
- };
- serviceConfig = {
- SyslogIdentifier = "copyq";
- ExecStart = "${pkgs.copyq}/bin/copyq";
- ExecStartPost = copyqConfig;
- Restart = "always";
- RestartSec = "2s";
- StartLimitBurst = 0;
- User = user.name;
- };
- };
-}
diff --git a/lass/2configs/xserver/xserver.conf.nix b/lass/2configs/xserver/xserver.conf.nix
deleted file mode 100644
index 6f34e015..00000000
--- a/lass/2configs/xserver/xserver.conf.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with import <stockholm/lib>;
-
-let
- cfg = config.services.xserver;
-in
-
-pkgs.stdenv.mkDerivation {
- name = "xserver.conf";
-
- xfs = optionalString (cfg.useXFS != false)
- ''FontPath "${toString cfg.useXFS}"'';
-
- inherit (cfg) config;
-
- buildCommand =
- ''
- echo 'Section "Files"' >> $out
- echo $xfs >> $out
-
- for i in ${toString config.fonts.fonts}; do
- if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then
- for j in $(find $i -name fonts.dir); do
- echo " FontPath \"$(dirname $j)\"" >> $out
- done
- fi
- done
-
- for i in $(find ${toString cfg.modules} -type d); do
- if test $(echo $i/*.so* | wc -w) -ne 0; then
- echo " ModulePath \"$i\"" >> $out
- fi
- done
-
- echo 'EndSection' >> $out
-
- echo "$config" >> $out
- '';
-}