Browse Source

Add Gentoo Linux role

master
Maxim Likhachev 5 years ago
parent
commit
231489b2b0
  1. 20
      playbook.yml
  2. 13
      roles/linux-gentoo/handlers/main.yml
  3. 80
      roles/linux-gentoo/tasks/applications.yml
  4. 19
      roles/linux-gentoo/tasks/install-github.yml
  5. 61
      roles/linux-gentoo/tasks/main.yml
  6. 29
      roles/linux-gentoo/tasks/portage.yml
  7. 18
      roles/linux-gentoo/tasks/prelink.yml
  8. 13
      roles/linux-gentoo/tasks/preload.yml
  9. 9
      roles/linux-gentoo/templates/eixrc.j2
  10. 59
      roles/linux-gentoo/templates/make.conf.j2
  11. 6
      roles/linux-gentoo/templates/packages.j2
  12. 23
      roles/linux-gentoo/templates/savedconfig/x11-misc/dmenu
  13. 59
      roles/linux-gentoo/templates/savedconfig/x11-misc/tabbed
  14. 498
      roles/linux-gentoo/templates/savedconfig/x11-terms/st
  15. 104
      roles/linux-gentoo/templates/xorg.conf.j2
  16. 18
      roles/linux-gentoo/templates/xorg.touchpad.conf.j2
  17. 89
      roles/linux-gentoo/vars/applications.yml
  18. 6
      roles/linux-gentoo/vars/cleanup.yml
  19. 1
      roles/linux-gentoo/vars/main.yml
  20. 12
      roles/linux-gentoo/vars/mount.yml
  21. 398
      roles/linux-gentoo/vars/portage.yml
  22. 13
      roles/linux-gentoo/vars/services.yml
  23. 7
      roles/linux-gentoo/vars/sysctl.yml
  24. 8
      roles/linux-gentoo/vars/system.yml
  25. 3
      roles/linux-gentoo/vars/xorg.yml

20
playbook.yml

@ -4,9 +4,19 @@ @@ -4,9 +4,19 @@
gather_facts: yes
hosts: all
roles:
- { role: linux, when: ansible_os_family != "Darwin" }
- { role: macos, when: ansible_os_family == "Darwin" }
- { role: shellrc }
- { role: scripts-linux }
- { role: fonts }
- role: linux-gentoo
when: ansible_os_family == "Calculate"
- role: macos
when: ansible_os_family == "Darwin"
- role: fonts
- role: docker-experimental
- role: shellrc
when: ansible_os_family == "Darwin"
- role: scripts-linux
when: ansible_os_family == "Darwin"

13
roles/linux-gentoo/handlers/main.yml

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
- name: update prelink cache
command: prelink -afmR
- name: emerge depclean
portage:
depclean: yes
- name: emerge world
debug: msg="make.conf has been updated. Please run 'emerge @world'"
- name: emerge custom set
debug: msg="Custom set has been updated. Please run 'emerge @{{ apps.set_name }}'"

80
roles/linux-gentoo/tasks/applications.yml

@ -0,0 +1,80 @@ @@ -0,0 +1,80 @@
- name: Make a list with packages with custom USE flags
template:
src: packages.j2
dest: /etc/portage/package.use/custom.clt
vars:
packages: "{{ gentoo.use.custom }}"
- name: Freeze packages
template:
src: packages.j2
dest: /etc/portage/package.provide
vars:
packages: "{{ apps.freeze }}"
- name: Mask packages
template:
src: packages.j2
dest: /etc/portage/package.mask/custom.clt
vars:
packages: "{{ apps.mask }}"
- name: Unmask packages
template:
src: packages.j2
dest: /etc/portage/package.keywords/custom.clt
vars:
packages: "{{ apps.unmask }}"
- name: Make directories for savedconfig files
file:
path: "/etc/portage/savedconfig/{{ item | dirname }}"
state: directory
with_items: "{{ gentoo.use.config }}"
- name: Copy savedconfig files
template:
src: "savedconfig/{{ item }}"
dest: "/etc/portage/savedconfig/{{ item }}"
with_items: "{{ gentoo.use.config }}"
tags:
- portage
- emerge
- savedconfig
- name: Make custom package set
template:
src: packages.j2
dest: "/etc/portage/sets/{{ apps.set_name }}"
vars:
packages: "{{ apps.install }}"
notify: emerge custom set
- name: Remove unused applications
portage:
package: "{{ apps.remove }}"
state: absent
notify: emerge depclean
- name: Disable services
service:
name: "{{ item.name }}"
runlevel: "{{ item.runlevel | default(omit) }}"
state: stopped
enabled: no
with_items: "{{ services.disabled }}"
- name: Enable services
service:
name: "{{ item.name }}"
runlevel: "{{ item.runlevel | default(omit) }}"
state: started
enabled: yes
with_items: "{{ services.enabled }}"
# Download binaries from GitHub
# TODO: Mention binary releases in README.md
- include: install-github.yml app_name="{{ item.name }}" app_repository="{{ item.repository }}" app_type="{{ item.type }}"
with_items:
- "{{ apps.github }}"
when: false

19
roles/linux-gentoo/tasks/install-github.yml

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
---
- name: Create {{ apps.bin_path }} directory
file:
path: "{{ apps.bin_path }}"
state: directory
- name: Get latest {{ app_name }} GitHub release
shell: >
curl -sq "https://api.github.com/repos/{{ app_repository }}/releases/latest" | jq -r '.assets[] | select ( .name | contains ("{{ app_type }}") ) | .browser_download_url'
register: app_release
- name: Download {{ app_name }}
get_url:
url: "{{ app_release.stdout }}"
dest: "{{ apps.bin_path }}/{{ app_name }}"
mode: 0777
when: app_release.rc == 0

61
roles/linux-gentoo/tasks/main.yml

@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
- include_vars: system.yml
- include_vars: services.yml
- include_vars: sysctl.yml
- include_vars: mount.yml
- include_vars: portage.yml
- include_vars: applications.yml
- include_vars: xorg.yml
- include_vars: cleanup.yml
- name: Adjust number of tty consoles
lineinfile:
path: /etc/inittab
regexp: '^c{{ item }}:'
state: absent
with_sequence: start={{ system.tty_consoles + 1 }} end=9
- name: Configure tmpfs
mount:
path: "{{ item.path }}"
src: tmpfs
fstype: tmpfs
state: present
opts: "{{ item.options | default('defaults') }}"
with_items: "{{ mount.tmpfs }}"
- include: portage.yml
- include: applications.yml
- include: prelink.yml
when: optimisation.prelink
- include: preload.yml
when: optimisation.preload
- name: Set sysctl options
sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
state: present
sysctl_set: yes
with_items: "{{ sysctl }}"
- name: Make xorg.conf
template:
src: xorg.conf.j2
dest: "/etc/X11/xorg.conf.clt"
- name: Configure touchpad
template:
src: xorg.touchpad.conf.j2
dest: "/etc/X11/xorg.conf.d/touchpad.conf.clt"
- name: Update imagemagick policies
lineinfile:
path: /etc/ImageMagick-7/policy.xml
regexp: '<policy domain="coder" rights="read | write" pattern="PDF" />'
line: '<policy domain="coder" rights="read | write" pattern="PDF" />'
insertbefore: '</policymap>'
state: present

29
roles/linux-gentoo/tasks/portage.yml

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
- name: Create make.conf
template:
src: make.conf.j2
dest: /etc/portage/make.conf/custom.clt
notify: emerge world
- name: Enable SQLite in portage
lineinfile:
path: /etc/portage/modules
regexp: '^portdbapi\.auxdbmodule'
line: 'portdbapi.auxdbmodule = cache.sqlite.database'
create: yes
register: portage_sqlite_enabled
- name: Update portage cache
shell: >
rm -rf /var/cache/edb/dep &&
emerge --metadata
when: portage_sqlite_enabled.changed
- name: Configure eix
template:
src: eixrc.j2
dest: /etc/eixrc/50-calculate.clt
register: eix_configured
- name: Update eix cache
shell: eix-update
when: eix_configured.changed

18
roles/linux-gentoo/tasks/prelink.yml

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
- name: Install prelink utility
portage:
package: prelink
state: present
register: prelink_installed
notify: update prelink cache
- name: Update env data
command: env-update
when: prelink_installed.changed
- name: Enable prelink
lineinfile:
path: /etc/conf.d/prelink
regexp: '^PRELINKING'
line: 'PRELINKING="{{ optimisation.prelink }}"'
create: yes
notify: update prelink cache

13
roles/linux-gentoo/tasks/preload.yml

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
- name: Install preload
portage:
package: preload
state: present
register: preload_updated
- name: Enable daemons
service:
name: preload
state: started
enabled: yes
runlevel: default
when: preload_updated.changed

9
roles/linux-gentoo/templates/eixrc.j2

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
# {{ ansible_managed }}
COLORSCHEME{{ gentoo.eix.colorscheme }}="true"
NOSTATUSLINE="{{ 'false' if gentoo.eix.statusline == 'true' else 'true' }}"
EIX_LIMIT={{ gentoo.eix.limit }}
EIX_LIMIT_COMPACT={{ gentoo.eix.limit_compact }}
PORTDIR_CACHE_METHOD='{{ gentoo.eix.cache_method }}'
OVERLAY_CACHE_METHOD='{{ gentoo.eix.cache_method }}'

59
roles/linux-gentoo/templates/make.conf.j2

@ -0,0 +1,59 @@ @@ -0,0 +1,59 @@
# {{ ansible_managed }}
#------------------------------------
# Основные опции сборки
#------------------------------------
FEATURES="{{ gentoo.portage.features | join(' ') }}"
#------------------------------------
# Настройки компилятора
#------------------------------------
# Дополнительные параметры, передаваемые компилятору. Флаг '-march=native'
# оптимизирует программы под ваше оборудование.
CFLAGS="{{ gentoo.portage.cflags | join(' ') }}"
CXXFLAGS="${CFLAGS}"
#----------------------------------
# Ускорение компиляции
#----------------------------------
MAKEOPTS="{{ gentoo.portage.buildopts.common | join(' ') }} {{ gentoo.portage.buildopts.make | join(' ') }}"
# Количество пакетов для одновременной сборки.
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} {{ gentoo.portage.buildopts.common | join(' ') }} {{ gentoo.portage.buildopts.emerge | join(' ') }}"
#PORTAGE_BUNZIP2_COMMAND="lbunzip2 -nX"
#----------------------------------
# Поддерживаемые архитектуры
#----------------------------------
ABI_X86="{{ gentoo.architectures | join(' ') }}"
QEMU_SOFTMMU_TARGETS="i386 x86_64"
QEMU_USER_TARGETS="i386 x86_64"
RUBY_TARGETS="{{ gentoo.interpretators.ruby | join(' ') }}"
RUBY_SINGLE_TARGETS="ruby27"
PYTHON_TARGETS="{{ gentoo.interpretators.python | join(' ') }}"
#----------------------------------
# Локализация
#----------------------------------
LINGUAS="{{ gentoo.languages | join(' ') }}"
L10N="{{ gentoo.languages | join(' ') }}"
#----------------------------------
# Устройства
#----------------------------------
INPUT_DEVICES="{{ gentoo.devices.input | join(' ') }}"
VIDEO_CARDS="{{ gentoo.devices.video | join(' ') }}"
#----------------------------------
# USE-Флаги
#----------------------------------
USE_ENABLED="{{ gentoo.use.enabled | join(' ') }}"
USE_DISABLED="{{ gentoo.use.disabled | map('regex_replace', '(.*)', '-\\1') | join(' ') }}"
USE="$USE_DISABLED $USE_ENABLED"

6
roles/linux-gentoo/templates/packages.j2

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
# {{ ansible_managed }}
{% for package in packages %}
{{ package }}
{% endfor %}

23
roles/linux-gentoo/templates/savedconfig/x11-misc/dmenu

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
/* See LICENSE file for copyright and license details. */
/* Default settings; can be overriden by command line. */
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
/* -fn option overrides fonts[0]; default X11 font or font set */
static const char *fonts[] = {
"{{ x.font_name }}:size=14"
};
static const char *prompt = NULL; /* -p option; prompt to the left of input field */
static const char *colors[SchemeLast][2] = {
/* fg bg */
[SchemeNorm] = { "#bbbbbb", "#222222" },
[SchemeSel] = { "#eeeeee", "#005577" },
[SchemeOut] = { "#000000", "#00ffff" },
};
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
static unsigned int lines = 0;
/*
* Characters not considered part of a word while deleting words
* for example: " /?\"&[]"
*/
static const char worddelimiters[] = " ";

59
roles/linux-gentoo/templates/savedconfig/x11-misc/tabbed

@ -0,0 +1,59 @@ @@ -0,0 +1,59 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-*-medium-*-*-*-16-*-*-*-*-*-*-*";
/*static const char font[] = "DevaVu Sans:pixelsize=30:antialias=true:autohint=true";*/
static const char* normbgcolor = "#222222";
static const char* normfgcolor = "#cccccc";
static const char* selbgcolor = "#555555";
static const char* selfgcolor = "#ffffff";
static const char before[] = "<";
static const char after[] = ">";
static const int tabwidth = 400;
static const Bool foreground = True;
/*
* Where to place a new tab when it is opened. When npisrelative is True,
* then the current position is changed + newposition. If npisrelative
* is False, then newposition is an absolute position.
*/
static int newposition = 0;
static Bool npisrelative = False;
#define SETPROP(p) { \
.v = (char *[]){ "/bin/sh", "-c", \
"prop=\"`xwininfo -children -id $1 | grep '^ 0x' | sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' | xargs -0 printf %b | dmenu -l 10`\" &&" \
"xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
p, winid, NULL \
} \
}
#define MODKEY ControlMask
static Key keys[] = { \
/* modifier key function argument */
{ MODKEY|ShiftMask, XK_Return, focusonce, { 0 } },
{ MODKEY|ShiftMask, XK_Return, spawn, { 0 } },
{ MODKEY, XK_t, spawn, SETPROP("_TABBED_SELECT_TAB") },
{ MODKEY|ShiftMask, XK_l, rotate, { .i = +1 } },
{ MODKEY|ShiftMask, XK_h, rotate, { .i = -1 } },
{ MODKEY|ShiftMask, XK_j, movetab, { .i = -1 } },
{ MODKEY|ShiftMask, XK_k, movetab, { .i = +1 } },
{ MODKEY, XK_Tab, rotate, { .i = 0 } },
{ MODKEY, XK_1, move, { .i = 0 } },
{ MODKEY, XK_2, move, { .i = 1 } },
{ MODKEY, XK_3, move, { .i = 2 } },
{ MODKEY, XK_4, move, { .i = 3 } },
{ MODKEY, XK_5, move, { .i = 4 } },
{ MODKEY, XK_6, move, { .i = 5 } },
{ MODKEY, XK_7, move, { .i = 6 } },
{ MODKEY, XK_8, move, { .i = 7 } },
{ MODKEY, XK_9, move, { .i = 8 } },
{ MODKEY, XK_0, move, { .i = 9 } },
{ MODKEY, XK_q, killclient, { 0 } },
{ 0, XK_F11, fullscreen, { 0 } },
};

498
roles/linux-gentoo/templates/savedconfig/x11-terms/st

@ -0,0 +1,498 @@ @@ -0,0 +1,498 @@
/* {{ ansible_managed }} */
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
/* CHANGED */
static char *font = "{{ x.font_name }}:pixelsize=18:antialias=true:autohint=true";
static int borderpx = 2;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: utmp option
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
/* CHANGED */
static char *shell = "/bin/bash";
char *utmp = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: " `'\"()[]{}"
*/
char *worddelimiters = " ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
/* frames per second st should at maximum draw to the screen */
static unsigned int xfps = 120;
static unsigned int actionfps = 30;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
* attribute.
*/
static unsigned int blinktimeout = 800;
/*
* thickness of underline and bar cursors
*/
static unsigned int cursorthickness = 2;
/*
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
* it
*/
static int bellvolume = 0;
/* default TERM value */
char *termname = "st-256color";
/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the st.info and appropriately install the st.info in the environment where
* you use this st version.
*
* it#$tabspaces,
*
* Secondly make sure your kernel is not expanding tabs. When running `stty
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
* running following command:
*
* stty tabs
*/
unsigned int tabspaces = 8;
static const char *colorname_xterm[] = {
/* 8 normal colors */
"#3B3B3C", /* black */
"#CD0000", /* red */
"#20A330", /* green */
"#b8b800", /* yellow */
"#0000CD", /* blue */
"#B217B2", /* magenta */
"#00B0B0", /* cyan */
"#BEB262", /* gray */
/* 8 bright colors */
"#808080", /* gray */
"#800000", /* red */
"#005020", /* green */
"#995500", /* yellow */
"#004080", /* blue */
"#443300", /* magenta */
"#306080", /* cyan */
"#7F7776", /* white */
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
"#D9D9D9",
"#000000",
};
static const char *colorname[] = {
/* 8 normal colors */
"#3B3B3C", /* black */
"#CD0000", /* red */
"#0A6D16", /* green */
"#b8b800", /* yellow */
"#0000CD", /* blue */
"#B217B2", /* magenta */
"#00B0B0", /* cyan */
"#D9D9D9", /* gray */
/* 8 bright colors */
"#808080", /* gray */
"#800000", /* red */
"#005020", /* green */
"#995500", /* yellow */
"#004080", /* blue */
"#443300", /* magenta */
"#306080", /* cyan */
"#7F7776", /* white */
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#8C8C8C",
"#E29B00",
"#464B50",
"#000000",
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
/* CHANGED */
unsigned int defaultfg = 259;
unsigned int defaultbg = 7;
static unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
/*
* Default shape of cursor
* 2: Block ("█")
* 4: Underline ("_")
* 6: Bar ("|")
* 7: Snowman ("☃")
*/
static unsigned int cursorshape = 2;
/*
* Default columns and rows numbers
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
/*
* Default colour and shape of the mouse cursor
*/
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
/*
* Color used to display font attributes when fontconfig selected a font which
* doesn't match the ones requested.
*/
static unsigned int defaultattr = 11;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* button mask string */
{ Button4, XK_ANY_MOD, "\031" },
{ Button5, XK_ANY_MOD, "\005" },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
};
/*
* Special keys (change & recompile st.info accordingly)
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
* appkey value:
* * 0: no value
* * > 0: keypad application mode enabled
* * = 2: term.numlock = 1
* * < 0: keypad application mode disabled
* appcursor value:
* * 0: no value
* * > 0: cursor application mode enabled
* * < 0: cursor application mode disabled
* crlf value
* * 0: no value
* * > 0: crlf mode is enabled
* * < 0: crlf mode is disabled
*
* Be careful with the order of the definitions because st searches in
* this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
* to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };
/*
* State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/*
* Override mouse-select while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forceselmod = ShiftMask;
/*
* This is the huge key array which defines all compatibility to the Linux
* world. Please decide about changes wisely.
*/
static Key key[] = {
/* keysym mask string appkey appcursor */
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_Insert, ControlMask, "\033[L", -1, 0},
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_Delete, ControlMask, "\033[M", -1, 0},
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_End, ControlMask, "\033[J", -1, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
};
/*
* Selection types' masks.
* Use the same masks as usual.
* Button1Mask is always unset, to make masks match between ButtonPress.
* ButtonRelease and MotionNotify.
* If no match is found, regular selection is used.
*/
static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
};
/*
* Printable characters in ASCII, used to estimate the advance width
* of single wide characters.
*/
static char ascii_printable[] =
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~";

104
roles/linux-gentoo/templates/xorg.conf.j2

@ -0,0 +1,104 @@ @@ -0,0 +1,104 @@
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
Section "Module"
Load "dri"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "int10"
Load "vbe"
Load "glx" # OpenGL X protocol interface
Load "extmod" # Misc. required extension
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "Monitor"
Identifier "eDP1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
Option "Primary" "true"
Option "PreferredMode" "1920x1080"
Option "DPMS"
EndSection
Section "Monitor"
Identifier "DP1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
Option "Below" "eDP1"
Option "PreferredMode" "1920x515"
Option "DPMS"
EndSection
Section "Device"
Identifier "Card0"
Driver "intel"
# Option "DRI" "2"
Option "DRI" "False"
BusID "PCI:0:2:0"
#Screen 0
EndSection
Section "Device"
Identifier "Card1"
Driver "intel"
#Driver "nouveau"
BusID "PCI:2:0:0"
#BusID "PCI:0:2:0"
#Screen 1
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "eDP1"
DefaultDepth 24
#Option "AutoServerLayout" "on"
#Option "AccelMethod" "sna"
Option "TearFree" "on"
Option "eDP1" "eDP1"
Option "ZaphodHeads" "eDP1"
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1920x1080"
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "DP1"
DefaultDepth 24
#Option "AutoServerLayout" "on"
#Option "AccelMethod" "sna"
Option "TearFree" "on"
Option "DP1" "DP1"
Option "ZaphodHeads" "DP1"
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1920x515"
EndSubSection
EndSection

18
roles/linux-gentoo/templates/xorg.touchpad.conf.j2

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
Section "InputClass"
Identifier "Touchpad"
Driver "libinput"
MatchIsTouchpad "1"
Option "Protocol" "event"
Option "DisableWhileTyping" "on"
Option "AccelSpeed" "0.35"
Option "Tapping" "on"
Option "TappingDrag" "on"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
Option "CircularScrolling" "1"
# 1 = L, 2 = R, 3 = M
Option "ClickMethod" "clickfinger"
# L+R = M
Option "MiddleEmulation" "on"
EndSection

89
roles/linux-gentoo/vars/applications.yml

@ -0,0 +1,89 @@ @@ -0,0 +1,89 @@
apps:
set_name: apps
remove:
- app-editors/nano
freeze:
mask:
unmask:
- app-admin/ansible-lint
- app-misc/nnn
- app-text/docx2txt
- dev-haskell/stack-bin ~amd64
# - sys-apps/bat
# - dev-haskell/hlint
install:
- app-admin/ansible # https://www.ansible.com/ Automate deployment, configuration, and upgrading.
- app-arch/unrar # https://www.rarlab.com/ Extract, view, and test RAR archives.
- app-editors/neovim # https://neovim.io/ Ambitious Vim-fork focused on extensibility and agility.
- app-emulation/docker # https://www.docker.com/ Pack, ship and run any application as a lightweight container.
- app-misc/jq # https://stedolan.github.io/jq/ Lightweight and flexible command-line JSON processor.
- app-misc/nnn # https://github.com/jarun/nnn Tiny, lightning fast, feature-packed file manager.
- app-misc/vifm # https://vifm.info/ Ncurses based file manager with vi like keybindings.
- app-shells/hstr # https://github.com/dvorka/hstr Bash and zsh history suggest box.
- app-text/antiword # http://www.winfield.demon.nl/ Utility to read Word (.doc) files.
- app-text/docx2txt # https://docx2txt.sourceforge.io/ Converts Microsoft Office docx documents to equivalent text documents.
- app-text/ghostscript-gpl # https://www.ghostscript.com/ Interpreter for PostScript and PDF.
- app-text/sdcv # https://dushistov.github.io/sdcv/ Console version of StarDict.
- app-text/tree # http://mama.indstate.edu/users/ice/tree/ Display directories as trees (with optional color/HTML output).
- app-text/zathura # https://pwmt.org/projects/zathura/ A document viewer.
- dev-haskell/stack-bin # https://haskellstack.org/ The Haskell Tool Stack.
- dev-lang/tcl # https://tcl.tk TCL Programming language.
- dev-lang/tk # https://tcl.tk GUI ToolKit for TCL Programming language.
- dev-util/shellcheck-bin # https://www.shellcheck.net/ Static analysis and lint tool, for (ba)sh scripts.
- mail-client/neomutt # https://neomutt.org/ Command line mail reader (or MUA). It’s a fork of Mutt with added features.
- mail-filter/procmail # http://www.procmail.org/ Mail delivery agent.
- media-gfx/geeqie # http://www.geeqie.org/ lightweight image viewer for Linux, BSDs and compatibles.
- media-gfx/imagemagick # https://www.imagemagick.org/ Tools and libraries to manipulate images in many formats.
- media-gfx/sxiv # https://github.com/muennich/sxiv Simple X Image Viewer.
- media-libs/exiftool # https://www.sno.phy.queensu.ca/~phil/exiftool/index.html Perl lib for reading and writing EXIF metadata.
- media-sound/mpc # https://musicpd.org/clients/mpc/ A minimalist command line interface to MPD.
- media-sound/mpd # https://www.musicpd.org/ Flexible, powerful, server-side application for playing music.
- media-sound/ncmpcpp # https://rybczak.net/ncmpcpp/ NCurses Music Player Client (Plus Plus).
- media-video/mpv # https://mpv.io/ Free, open source, and cross-platform media player.
- net-fs/sshfs # https://github.com/libfuse/sshfs A network filesystem client to connect to SSH servers.
- net-mail/fetchmail # https://www.fetchmail.info Full-featured, robust, well-documented remote-mail retrieval and forwarding utility.
- net-misc/aria2 # https://aria2.github.io Lightweight multi-protocol & multi-source command-line download utility.
- net-misc/connman # https://01.org/connman Internet connection daemon.
- sys-fs/dfc # https://projects.gw-computing.net/projects/dfc Display graphs and colors of file system space/usage.
- sys-fs/ntfs3g # https://www.tuxera.com/community/open-source-ntfs-3g/ Read-write NTFS driver for FUSE.
- sys-process/htop # https://hisham.hm/htop/ Improved top (interactive process viewer).
- www-client/firefox-bin # https://www.mozilla.org/ru/firefox/ Mozilla Firefox.
- x11-misc/dmenu # https://tools.suckless.org/dmenu/ Fast and lightweight dynamic menu for X.
- x11-misc/polybar # https://polybar.github.io/ A fast and easy-to-use status bar.
- x11-misc/rofi # https://github.com/davatorium/rofi A window switcher, application launcher and dmenu replacement.
- x11-misc/tabbed # https://tools.suckless.org/tabbed/ Simple generic tabbed fronted to xembed aware applications.
- x11-misc/wmctrl # https://sites.google.com/site/tstyblo/wmctrl Command line tool to interact with an EWMH/NetWM compatible X Window Manager.
- x11-misc/xclip # https://github.com/astrand/xclip Command line interface to the X11 clipboard.
- x11-terms/st # https://st.suckless.org Simple terminal implementation for X.
- x11-wm/bspwm # https://github.com/baskerville/bspwm A tiling window manager based on binary space partitioning.
- sys-apps/preload
- sys-devel/prelink
- sys-power/acpi
# Libraries and dependencies
- app-arch/zip
- app-text/zathura-djvu
- app-text/zathura-pdf-poppler
- dev-python/passlib
- dev-tcltk/tcllib
- dev-tcltk/tclreadline
- dev-tcltk/tkimg
- media-fonts/sophia-nubian
- net-print/cups # Required by Joplin.app
bin_path: ~/.shellrc/bin/hub/
github:
- name: joplin
type: AppImage
repository: laurent22/joplin
# - sys-apps/fd # https://github.com/sharkdp/fd Simple, fast and user-friendly alternative to find. **[BIN]**
# - sys-apps/ripgrep # https://github.com/BurntSushi/ripgrep Search tool like grep and The Silver Searcher. **[BIN]**
# - app-text/odt2txt # https://github.com/dstosberg/odt2txt/ Convert OpenDocument files to plain text.
# - dev-haskell/hlint # https://github.com/ndmitchell/hlint Haskell source code suggestions. **[BIN]**
# - sys-apps/bat # https://github.com/sharkdp/bat Clone of cat(1) with syntax highlighting and Git integration. **[BIN]**
# - media-video/vlc # https://www.videolan.org/vlc/ VLC media player.
# - media-gfx/graphviz
# - x11-misc/dunst

6
roles/linux-gentoo/vars/cleanup.yml

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
cleanup:
dirs:
- Видео
- Документы

1
roles/linux-gentoo/vars/main.yml

@ -0,0 +1 @@ @@ -0,0 +1 @@

12
roles/linux-gentoo/vars/mount.yml

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
mount:
tmpfs:
- path: /tmp
- path: /var/lock
- path: /var/tmp
options: rw,nosuid,noatime,nodev,size=5G,mode=1777
- path: /var/calculate/tmp/portage
options: rw,nosuid,noatime,nodev,size=8G,mode=775,uid=portage,gid=portage
# - path: /var/tmp/portage
# options: rw,nosuid,noatime,nodev,size=5G,mode=775,uid=portage,gid=portage,x-mount.mkdir=775

398
roles/linux-gentoo/vars/portage.yml

@ -0,0 +1,398 @@ @@ -0,0 +1,398 @@
gentoo:
architectures:
- 64
languages:
- ru
- en
interpretators:
python:
- python2_7
- python3_6
ruby:
- ruby25
- ruby27
devices:
input:
- libinput
video:
- intel
portage:
features:
- -getbinpkg
- parallel-fetch
- metadata-transfer
cflags:
- -O2 # Оптимизация
- -march=native # Сборка под текущую архитектуру
- -pipe # Передача промежуточных данных по конвееру
- -g0 # Отключение отладочной информации
#- --param l2-cache-size=256 # L2 Cache в килобайтах (lscpu | grep 'L2 cache' | cut -d : -f 2- | grep -o -E '[0-9]+'
#- -fomit-frame-pointer # Доступ к переменным через стек
#- -fgraphite
#- -fgraphite-identity # Оценка выгодности использования Graphite
#- -floop-interchange # Оптимизация циклов
#- -floop-block # Оптимизация циклов
#- -floop-strip-mine # Оптимизация циклов
#- -mmmx # Инструкции процессора (cat /proc/cpuinfo | tr ' ' '\012' | grep -e sse -e mmx -e now | sort -u)
#- -msse
#- -msse2
#- -msse4.1
#- -msse4.2
#- -mssse3
#- -ftree-vectorize
buildopts:
common:
- --jobs={{ ansible_processor_vcpus * 2 }} # Максимальное количество запускаемых копий make
- --load-average={{ ansible_processor_vcpus + 1 }} # Допустимая средняя загрузка CPU
make:
- -s # Уменьшение количества выводимой информации
emerge:
- --keep-going # Не прерывать сборку при ошибках
eix:
colorscheme: 1
statusline: false
limit: 50
limit_compact: 0
cache_method: sqlite
use:
config:
- x11-misc/dmenu
- x11-misc/tabbed
- x11-terms/st
custom:
- dev-lang/ghc binary
- sys-apps/iproute2 -minimal
- x11-base/xorg-server -minimal
- app-portage/eix sqlite
- app-text/ghostscript-gpl -gtk
- dev-lang/python sqlite
- dev-libs/libxml2 python
- media-gfx/graphviz -gtk tcl # Tcl/Tk Img package
- media-sound/mpd -curl -fifo -expat -lame -mikmod -network -upnp -icu -inotify
- sys-apps/calculate-utils minimal
- sys-apps/file python
- sys-kernel/calculate-sources desktop #-minimal
- x11-misc/tabbed savedconfig
- x11-misc/xmobar -alsa -dbus #mpd
- x11-misc/dmenu savedconfig
- x11-misc/polybar mpd
- x11-terms/st savedconfig
- x11-wm/xmonad -default-term
- net-misc/connman dbus
- net-wireless/wpa_supplicant dbus
- dev-libs/glib dbus
enabled:
- imlib
- minimal
- nouveau
- readline
- unicode3
- xft
#- glibc-omitfp # Нужен для CFLAGS="-fomit-frame-pointer"
#- graphite
#- xinerama
disabled:
# TODO: CHECK
- vaapi
- vdpau
- pam
- consolekit
- gtk-doc
- chm
- emoji
- dbus
- container-init
- 32bit
- a52
- aac
- acl
- ada
- apparmor
- arts
- arts
- audacious
- bash-completion
- bcrypt
- berkdb
- bidi
- blink
- bluetooth
- bluray
- boost
- caps
- cdda
- cddb
- cdio
- cdparanoia
- cdrkit
- cgi
- cgroups
- chromecast
- chromium
- client
- cmus
- cue
- cups
- cvs
- darcs
- dbm
- dbmmaker
- debug
- desktop
- dga
- directx
- doc
- doctool
- dvbpsi
- dvd
- dvdnav
- eds
- emacs
- epydoc
- equalizer
- esd
- ethernet
- eve
- examples
- fax
- ffmpeg
- flac
- foomatic
- fortran
- gdbm
- geoip
- geoloc
- ghostscript
- glamor
- gnome
- gnome-keyring
- gpg
- gpgme
- gpm
- gstreamer
- guile
- handbook
- hangouts
- ieee1394
- inifile
- install
- introspection
- ios
- ios
- ipv6
- irc
- jabber
- jack
- java
- joystick
- kde
- kerberos
- l2tp
- lame
- lastfm
- latex
- ldap
- libass
- libcaca
- libproxy
- lirc
- live
- lua
- matroska
- mikmod # Трекерная музыка
- modemmanager
- mono
- mp4
- multilib
- musepack
- native-headset
- networkmanager
- nfs
- ntfsdecrypt
- ntp
- nvidia
- ofono
- ofono-headset
- ogg
- opencl # Требует драйвер nvidia
- openconnect
- openvpn
- opus
- orc
- osdmenu
- oss
- pdf
- perl
- pinentry
- policykit
- portmon
- postgres
- postscript
- pptp
- pulseaudio
- python
- qt
- qt3support
- qt4
- qt4
- qt5
- raw
- reiserfs
- rsync-verify
- ruby
- samba
- scanner
- screensaver
- scrypt
- sec
- server
- skins
- smartcard
- snappy
- speex
- srt
- svg
- systemd
- tcl
- test
- tga
- themes
- theora
- timidity
- tinfo
- tk
- totp
- uchardet
- udisks
- update_drivedb
- upnp
- v4l
- vala
- vim
- vmware
- vnc
- vorbis
- vpnc
- vpx
- vulkan
- wavpack
- wayland
- webkit
- wispr
- wmf
- wxwidgets
- wxwindows
- xa
- xcomposite
- xscreensaver
- zsh-completion
# LANGUAGES
- l10n_am
- l10n_ar
- l10n_bg
- l10n_bn
- l10n_ca
- l10n_cs
- l10n_da
- l10n_de
- l10n_el
- l10n_en-GB
- l10n_es
- l10n_es-419
- l10n_et
- l10n_fa
- l10n_fi
- l10n_fil
- l10n_fr
- l10n_gu
- l10n_he
- l10n_hi
- l10n_hr
- l10n_hu
- l10n_id
- l10n_it
- l10n_ja
- l10n_kn
- l10n_ko
- l10n_lt
- l10n_lv
- l10n_ml
- l10n_mr
- l10n_ms
- l10n_nb
- l10n_nl
- l10n_pl
- l10n_pt-BR
- l10n_pt-PT
- l10n_ro
- l10n_sk
- l10n_sl
- l10n_sr
- l10n_sv
- l10n_sw
- l10n_ta
- l10n_te
- l10n_th
- l10n_tr
- l10n_uk
- l10n_vi
- l10n_zh-CN
- l10n_zh-TW
- linguas_am
- linguas_ar
- linguas_bg
- linguas_bn
- linguas_ca
- linguas_cs
- linguas_da
- linguas_de
- linguas_el
- linguas_en_GB
- linguas_es
- linguas_es_LA
- linguas_et
- linguas_fa
- linguas_fi
- linguas_fil
- linguas_fr
- linguas_gu
- linguas_he
- linguas_hi
- linguas_hr
- linguas_hu
- linguas_id
- linguas_it
- linguas_ja
- linguas_kn
- linguas_ko
- linguas_lt
- linguas_lv
- linguas_ml
- linguas_mr
- linguas_ms
- linguas_nb
- linguas_nl
- linguas_pl
- linguas_pt_BR
- linguas_pt_PT
- linguas_ro
- linguas_sk
- linguas_sl
- linguas_sr
- linguas_sv
- linguas_sw
- linguas_ta
- linguas_te
- linguas_th
- linguas_tr
- linguas_uk
- linguas_vi
- linguas_zh_CN
- linguas_zh_TW

13
roles/linux-gentoo/vars/services.yml

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
services:
disabled:
- name: xdm
- name: cupsd
- name: bluetooth
- name: sshd
- name: swap
runlevel: boot
enabled:
- name: connman
runlevel: boot

7
roles/linux-gentoo/vars/sysctl.yml

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
sysctl:
- name: vm.laptop_mode # Увеличение нахождения SSD в режиме suspend
value: 5
- name: vm.swappiness # При скольких процентах свободной оперативной памяти начинать писать в своп
value: 10

8
roles/linux-gentoo/vars/system.yml

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
system:
tty_consoles: 4
optimisation:
prelink: yes
preload: yes

3
roles/linux-gentoo/vars/xorg.yml

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
x:
font_name: NotoMono Nerd Font
Loading…
Cancel
Save