summaryrefslogtreecommitdiffstats
path: root/tv/2configs/xserver
diff options
context:
space:
mode:
Diffstat (limited to 'tv/2configs/xserver')
-rw-r--r--tv/2configs/xserver/Xmodmap.nix28
-rw-r--r--tv/2configs/xserver/default.nix167
l---------tv/2configs/xserver/lib1
-rw-r--r--tv/2configs/xserver/sxiv.nix12
-rw-r--r--tv/2configs/xserver/urxvt.nix73
-rw-r--r--tv/2configs/xserver/xkiller.nix14
-rw-r--r--tv/2configs/xserver/xserver.conf.nix39
7 files changed, 0 insertions, 334 deletions
diff --git a/tv/2configs/xserver/Xmodmap.nix b/tv/2configs/xserver/Xmodmap.nix
deleted file mode 100644
index 8e555e927..000000000
--- a/tv/2configs/xserver/Xmodmap.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ config, pkgs, ... }:
-
-with import ./lib;
-
-pkgs.writeText "Xmodmap" ''
- !keycode 66 = Caps_Lock
- !remove Lock = Caps_Lock
- clear Lock
-
- ! caps lock
- keycode 66 = Mode_switch
-
- keycode 13 = 4 dollar EuroSign cent
- keycode 30 = u U udiaeresis Udiaeresis
- keycode 32 = o O odiaeresis Odiaeresis
- keycode 38 = a A adiaeresis Adiaeresis
- keycode 39 = s S ssharp
-
- keycode 33 = p P Greek_pi Greek_PI
- keycode 40 = d D Greek_delta Greek_DELTA
- keycode 46 = l L Greek_lambda Greek_LAMBDA
-
- keycode 54 = c C cacute Cacute
-
- ! BULLET OPERATOR
- keycode 17 = 8 asterisk U2219
- keycode 27 = r R r U211D
-''
diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix
deleted file mode 100644
index 9b9d86f58..000000000
--- a/tv/2configs/xserver/default.nix
+++ /dev/null
@@ -1,167 +0,0 @@
-with import ./lib;
-{ config, pkgs, ... }@args: let
- cfg = {
- cacheDir = cfg.dataDir;
- configDir = "/var/empty";
- dataDir = "/run/xdg/${cfg.user.name}/xmonad";
- user = config.krebs.build.user;
- xmonad.pkg = pkgs.haskellPackages.xmonad-tv.overrideAttrs (_: {
- au = {
- XMONAD_BUILD_SCREEN_WIDTH = 1920;
- XMONAD_BUILD_TERM_FONT_WIDTH = 10;
- XMONAD_BUILD_TERM_FONT = "xft:Input Mono:size=12:style=Regular";
- XMONAD_BUILD_TERM_PADDING = 2;
- };
- }.${config.krebs.build.host.name} or {
- XMONAD_BUILD_SCREEN_WIDTH = 1366;
- XMONAD_BUILD_TERM_FONT_WIDTH = 6;
- XMONAD_BUILD_TERM_FONT = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
- XMONAD_BUILD_TERM_PADDING = 2;
- });
- };
-in {
-
- imports = [
- ./sxiv.nix
- ./urxvt.nix
- ];
-
- environment.systemPackages = [
- pkgs.ff
- pkgs.font-size
- pkgs.gitAndTools.qgit
- pkgs.mpv
- pkgs.xdotool
- pkgs.xsel
- pkgs.zathura
- ];
-
- fonts.fonts = [
- pkgs.xorg.fontschumachermisc
- ];
-
- services.xserver = {
-
- # Don't install feh into systemPackages
- # refs <nixpkgs/nixos/modules/services/x11/desktop-managers>
- desktopManager.session = mkForce [];
-
- displayManager.lightdm.enable = mkForce false;
- displayManager.job.execCmd = mkForce "derp";
-
- enable = true;
- display = mkForce 11;
- tty = mkForce 11;
- };
-
- systemd.services.display-manager.enable = false;
-
- systemd.services.xmonad = let
- xmonad = "${cfg.xmonad.pkg}/bin/xmonad";
- xmonad-start = pkgs.writeDash "xmonad-start" ''
- ${pkgs.coreutils}/bin/mkdir -p "$XMONAD_CACHE_DIR"
- ${pkgs.coreutils}/bin/mkdir -p "$XMONAD_CONFIG_DIR"
- ${pkgs.coreutils}/bin/mkdir -p "$XMONAD_DATA_DIR"
-
- f=$HOME/.dbus/session-bus/$(${pkgs.coreutils}/bin/cat /etc/machine-id)-${
- toString config.services.xserver.display
- }
- if test -e "$f" &&
- . "$f" &&
- ${pkgs.coreutils}/bin/kill -0 "$DBUS_SESSION_BUS_PID"
- then
- export DBUS_SESSION_BUS_ADDRESS
- else
- eval "$(${pkgs.dbus.lib}/bin/dbus-launch --sh-syntax)"
- fi
-
- exec ${xmonad}
- '';
- xmonad-ready = pkgs.writeDash "xmonad-ready" ''
- ${pkgs.systemd}/bin/systemd-notify --ready
- {
- ${pkgs.xorg.xhost}/bin/xhost +SI:localuser:${cfg.user.name}
- ${pkgs.xorg.xhost}/bin/xhost -LOCAL:
- } &
- ${pkgs.xorg.xmodmap}/bin/xmodmap ${import ./Xmodmap.nix args} &
- ${pkgs.xorg.xsetroot}/bin/xsetroot -solid '#1c1c1c' &
- wait
- '';
- in {
- wantedBy = [ "graphical.target" ];
- requires = [ "xserver.service" ];
- environment = {
- DISPLAY = ":${toString config.services.xserver.display}";
- FZMENU_FZF_DEFAULT_OPTS = toString [
- "--color=dark,border:126,bg+:090"
- "--inline-info"
- ];
- XMONAD_CACHE_DIR = cfg.cacheDir;
- XMONAD_CONFIG_DIR = cfg.configDir;
- XMONAD_DATA_DIR = cfg.dataDir;
- XMONAD_STARTUP_HOOK = xmonad-ready;
- XMONAD_WORKSPACES0_FILE = pkgs.writeJSON "xmonad-workspaces0.json" [
- "Dashboard" # we start here
- "23"
- "cr"
- "ff"
- "hack"
- "im"
- "mail"
- "stockholm"
- "za" "zh" "zj" "zs"
- ];
- };
- path = [
- config.tv.slock.package
- pkgs.flameshot-once-tv
- pkgs.pulseaudio.out
- pkgs.rxvt_unicode
- pkgs.xcalib
- "/run/wrappers" # for su
- ];
- serviceConfig = {
- ExecStart = "@${xmonad-start} xmonad-${currentSystem}";
- ExecStop = "@${xmonad} xmonad-${currentSystem} --shutdown";
- SyslogIdentifier = "xmonad";
- User = cfg.user.name;
- WorkingDirectory = cfg.user.home;
-
- NotifyAccess = "all";
- Type = "notify";
- };
- };
-
- systemd.services.xserver = {
- after = [
- "acpid.service"
- "local-fs.target"
- "systemd-udev-settle.service"
- ];
- wants = [
- "systemd-udev-settle.service"
- ];
- restartIfChanged = false;
- environment = {
- LD_LIBRARY_PATH = concatStringsSep ":" ([ "/run/opengl-driver/lib" ]
- ++ concatLists (catAttrs "libPath" config.services.xserver.drivers));
- };
- serviceConfig = {
- SyslogIdentifier = "xserver";
- 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 ${config.services.xserver.xkbDir}"
- ];
- };
- };
-
- tv.slock = {
- enable = true;
- user = cfg.user;
- };
-}
diff --git a/tv/2configs/xserver/lib b/tv/2configs/xserver/lib
deleted file mode 120000
index dc598c56d..000000000
--- a/tv/2configs/xserver/lib
+++ /dev/null
@@ -1 +0,0 @@
-../lib \ No newline at end of file
diff --git a/tv/2configs/xserver/sxiv.nix b/tv/2configs/xserver/sxiv.nix
deleted file mode 100644
index eb862f887..000000000
--- a/tv/2configs/xserver/sxiv.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-with import ./lib;
-{ config, pkgs, ... }: let
- cfg.user = config.krebs.build.user;
-in {
- tv.Xresources = {
- "Sxiv.foreground" = "#232323";
- "Sxiv.background" = "#424242";
- };
- users.users.${cfg.user.name}.packages = [
- pkgs.sxiv
- ];
-}
diff --git a/tv/2configs/xserver/urxvt.nix b/tv/2configs/xserver/urxvt.nix
deleted file mode 100644
index 3502c6356..000000000
--- a/tv/2configs/xserver/urxvt.nix
+++ /dev/null
@@ -1,73 +0,0 @@
-with import ./lib;
-{ config, pkgs, ... }: let
- cfg.user = config.krebs.build.user;
-in {
- systemd.services.urxvtd = {
- wantedBy = [ "graphical.target" ];
- restartIfChanged = false;
- serviceConfig = {
- SyslogIdentifier = "urxvtd";
- ExecStart = "${pkgs.rxvt_unicode}/bin/urxvtd";
- Restart = "always";
- RestartSec = "2s";
- StartLimitBurst = 0;
- User = cfg.user.name;
- };
- };
- tv.Xresources = {
- "URxvt*cutchars" = ''"\\`\"'&()*,;<=>?@[]^{|}‘’"'';
- "URxvt*eightBitInput" = "false";
- "URxvt*font" = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
- "URxvt*boldFont" = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1";
- "URxvt*scrollBar" = "false";
- "URxvt*background" = "#050505";
- "URxvt*foreground" = "#d0d7d0";
- "URxvt*cursorColor" = "#f042b0";
- "URxvt*cursorColor2" = "#f0b000";
- "URxvt*cursorBlink" = "off";
- "URxvt*jumpScroll" = "true";
- "URxvt*allowSendEvents" = "false";
- "URxvt*charClass" = "33:48,37-38:48,45-47:48,61:48,63-64:48";
- "URxvt*cutNewline" = "False";
- "URxvt*cutToBeginningOfLine" = "False";
-
- "URxvt*color0" = "#232342";
- "URxvt*color3" = "#c07000";
- "URxvt*color4" = "#4040c0";
- "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";
-
- "URxvt*iso14755" = "False";
-
- "URxvt*urgentOnBell" = "True";
- "URxvt*visualBell" = "True";
-
- # ref https://github.com/muennich/urxvt-perls
- "URxvt*perl-ext" = "default,url-select";
- "URxvt*keysym.M-u" = "perl:url-select:select_next";
- "URxvt*url-select.launcher" =
- "/etc/profiles/per-user/${cfg.user.name}/bin/ff -new-tab";
- "URxvt*url-select.underline" = "true";
- "URxvt*colorUL" = "#4682B4";
- "URxvt.perl-lib" = "${pkgs.urxvt_perls}/lib/urxvt/perl";
- "URxvt*saveLines" = "10000";
- "URxvt*modifier" = "mod1";
-
- "root-urxvt*background" = "#230000";
- "root-urxvt*foreground" = "#e0c0c0";
- "root-urxvt*BorderColor" = "#400000";
- "root-urxvt*color0" = "#800000";
-
- "fzmenu-urxvt*background" = "rgb:42/23/42";
- "fzmenu-urxvt*externalBorder" = "1";
- "fzmenu-urxvt*geometry" = "70x9";
- "fzmenu-urxvt*internalBorder" = "1";
- };
-}
diff --git a/tv/2configs/xserver/xkiller.nix b/tv/2configs/xserver/xkiller.nix
deleted file mode 100644
index 2f9763093..000000000
--- a/tv/2configs/xserver/xkiller.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ pkgs, ... }: {
-
- services.acpid.enable = true;
- services.acpid.handlers.xkiller = {
- action = /* sh */ ''
- event=($1)
- if test "''${event[2]}" = 00000080; then
- ${pkgs.systemd}/bin/systemd-cat -t xkiller ${pkgs.xkiller}
- fi
- '';
- event = "button/prog1";
- };
-
-}
diff --git a/tv/2configs/xserver/xserver.conf.nix b/tv/2configs/xserver/xserver.conf.nix
deleted file mode 100644
index 3fdfebf1b..000000000
--- a/tv/2configs/xserver/xserver.conf.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-with import ./lib;
-{ config, pkgs, ... }:
-
-let
- cfg = config.services.xserver;
-in
-
-pkgs.stdenv.mkDerivation {
- name = "xserver.conf";
-
- fontPath = optionalString (cfg.fontPath != null)
- ''FontPath "${toString cfg.fontPath}"'';
-
- inherit (cfg) config;
-
- buildCommand =
- ''
- echo 'Section "Files"' >> $out
- echo $fontPath >> $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
- '';
-}