Import existing configuration of main

This commit is contained in:
Andrew Kvalheim 2021-12-02 10:40:10 -08:00
parent 5f1ea35463
commit fa76db2597
9 changed files with 2961 additions and 0 deletions

102
hosts/main/Compose Normal file
View file

@ -0,0 +1,102 @@
# Spaces
<Multi_key> <space> <0> : " " # figure space
<Multi_key> <space> <bar> : " " # thin space
<Multi_key> <space> <m> : " " # em space
<Multi_key> <space> <semicolon> : " " # non-breaking space
<Multi_key> <space> <z> : "" # zero-width space
# Punctuation
<Multi_key> <exclam> <question> : "‽" # interrobang
<Multi_key> <grave> <apostrophe> : "" # prime
<Multi_key> <grave> <quotedbl> : "″" # double prime
<Multi_key> <greater> <greater> : "»" # right double angle quotation mark
<Multi_key> <less> <less> : "«" # left double angle quotation mark
<Multi_key> <minus> <minus> : "—" # em dash
<Multi_key> <minus> <n> : "" # en dash
<Multi_key> <minus> <question> : "­" # soft hyphen
<Multi_key> <minus> <semicolon> : "" # non-breaking hyphen
<Multi_key> <o> <o> : "°" # degree
<Multi_key> <period> <bar> : "⋮" # vertical ellipsis
<Multi_key> <period> <minus> : "·" # middle dot
<Multi_key> <period> <period> : "…" # horizontal ellipsis
# Mathematical operators
<Multi_key> <asciitilde> <equal> : "≈" # almost equal to
<Multi_key> <exclam> <equal> : "≠" # not equal to
<Multi_key> <greater> <equal> : "≥" # greater-than or equal to
<Multi_key> <less> <equal> : "≤" # less-than or equal to
<Multi_key> <minus> <0> : "" # minus sign
<Multi_key> <plus> <minus> : "±" # plus-minus sign
<Multi_key> <v> <slash> : "√" # square root
<Multi_key> <x> <x> : "×" # multiplication sign
# Geometric symbols
<Multi_key> <asciicircum> <bar> : "↑" # up arrow
<Multi_key> <bar> <v> : "↓" # down arrow
<Multi_key> <equal> <greater> : "⇒" # right double arrow
<Multi_key> <less> <greater> : "↔" # left-right arrow
<Multi_key> <less> <minus> : "←" # left arrow
<Multi_key> <minus> <greater> : "→" # right arrow
# Numbers
<Multi_key> <p> <i> : "π" # pi
<Multi_key> <8> <8> : "∞" # infinity
<Multi_key> <1> <2> : "½" # one half
<Multi_key> <1> <3> : "⅓" # one third
<Multi_key> <2> <3> : "⅔" # two thirds
<Multi_key> <1> <4> : "¼" # one fourth
<Multi_key> <3> <4> : "¾" # three fourths
<Multi_key> <1> <5> : "⅕" # one fifth
<Multi_key> <2> <5> : "⅖" # two fifths
<Multi_key> <3> <5> : "⅗" # three fifths
<Multi_key> <4> <5> : "⅘" # four fifths
<Multi_key> <1> <6> : "⅙" # one sixth
<Multi_key> <5> <6> : "⅚" # five sixths
<Multi_key> <1> <7> : "⅐" # one seventh
<Multi_key> <1> <8> : "⅛" # one eighth
<Multi_key> <3> <8> : "⅜" # three eighths
<Multi_key> <5> <8> : "⅝" # five eighths
<Multi_key> <7> <8> : "⅞" # seven eighths
<Multi_key> <1> <9> : "⅑" # one ninth
<Multi_key> <1> <0> : "⅒" # one tenth
# Letters and letterlike symbols
<Multi_key> <a> <e> : "æ" # ae ligature
<Multi_key> <a> <grave> : "à" # a with grave
<Multi_key> <c> <bar> : "¢" # cent sign
<Multi_key> <c> <o> : "©" # copyright sign
<Multi_key> <m> <u> : "µ" # micro sign
<Multi_key> <n> <asciitilde> : "ñ" # n with tilde
<Multi_key> <p> <p> : "¶" # pilcrow sign
<Multi_key> <s> <s> : "§" # section sign
<Multi_key> <t> <m> : "™" # trade mark sign
<Multi_key> <u> <colon> : "ü" # u with diaeresis
# Superscript
<Multi_key> <asciicircum> <minus> : "⁻" # superscript minus
<Multi_key> <asciicircum> <plus> : "⁺" # superscript plus sign
<Multi_key> <asciicircum> <0> : "⁰" # superscript zero
<Multi_key> <asciicircum> <1> : "¹" # superscript one
<Multi_key> <asciicircum> <2> : "²" # superscript two
<Multi_key> <asciicircum> <3> : "³" # superscript three
<Multi_key> <asciicircum> <4> : "⁴" # superscript four
<Multi_key> <asciicircum> <5> : "⁵" # superscript five
<Multi_key> <asciicircum> <6> : "⁶" # superscript six
<Multi_key> <asciicircum> <7> : "⁷" # superscript seven
<Multi_key> <asciicircum> <8> : "⁸" # superscript eight
<Multi_key> <asciicircum> <9> : "⁹" # superscript nine
<Multi_key> <asciicircum> <n> : "ⁿ" # superscript n
# Subscript
<Multi_key> <underscore> <minus> : "₋" # subscript minus
<Multi_key> <underscore> <plus> : "₊" # subscript plus sign
<Multi_key> <underscore> <0> : "₀" # subscript zero
<Multi_key> <underscore> <1> : "₁" # subscript one
<Multi_key> <underscore> <2> : "₂" # subscript two
<Multi_key> <underscore> <3> : "₃" # subscript three
<Multi_key> <underscore> <4> : "₄" # subscript four
<Multi_key> <underscore> <5> : "₅" # subscript five
<Multi_key> <underscore> <6> : "₆" # subscript six
<Multi_key> <underscore> <7> : "₇" # subscript seven
<Multi_key> <underscore> <8> : "₈" # subscript eight
<Multi_key> <underscore> <9> : "₉" # subscript nine

52
hosts/main/andrew.asc Normal file
View file

@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFQCVQMBEADxjtwOWxQg9ZastI0Yy57rzOBvGq0sJ7uw/b6H84WmYq29ccWB
ZqWaZE3ybqkYXqn0ZbMQ6D9iUh6wTPTUjxrcIsp5YdMlpfOAt6SpcD0wQXxyaZxP
aVrLGpfKE4sQKmQ6dZ7Vs140Ne9wkGDpHw+NVDKwMdCNl26bjSn+vxB0JFyvhgRP
gF1yTmjV+EjiW9XnWIeJ3ZeSie4sYtUljcGPfvVqYPDmnsmp4aPu7Y/itH7vT3kq
Fpz07faMF6HFUcPMkaK1UFA43aQ+2oI+XtPgOVmr4zlnqgkTXXHs4COjbMd+ZVQf
fKI2NE//UldhHqpcyaePjLDVIbzU9mUc6uyYYkuwNLSmA9RdQ0jT1en3rBp8Iso2
HNHIgR9A0R8Y2Oef+addHibFn43o8zUJc77mtuOi+fs0ylR/A+cge7YB/nLD683h
sa4m8kfnhH/997foyrmWKa4pjKTnbuMc28WxK1dAZKfzTilPMw8Ta5ftfAII8I7a
OIujRV1COBFDXLtwtJx2yFXP9ZclMJ18ttri1xlyLq1ygEumYPq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r8JyFrRn8DBoudCvwy3TW3zJvz4pA6YwdwuZQawApTROqU9gGKrSz5vyRTMLYeu6sCrAB54l/nEh00kPME6/s+GWQ== andrew@kvalhe.im

22
hosts/main/halmakish.kbd Normal file
View file

@ -0,0 +1,22 @@
;;(defcfg
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
;; output (uinput-sink "KMonad output")
;;
;; fallthrough true
;;)
(defsrc
` 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
caps a s d f g h j k l ; ' ret
lsft z x c v b n m , . / rsft
lctl lmet lalt spc ralt sysrq rctrl
)
(deflayer main
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
g _ _ _ _ _ _ _ _ _ _ _ _ _
bspc _ _ _ _ ret _ _ _ _ _ _ _
m _ _ _ _ _ _ spc _ _ _ ]
esc tab lctl rsft _ lalt lmet
)

90
hosts/main/halmakish.xkb Normal file
View file

@ -0,0 +1,90 @@
// # Installation
//
// 1. Copy `halmakish.xkb` to `/usr/share/X11/xkb/symbols/halmakish`.
//
// 2. Insert into `/usr/share/X11/xkb/rules/evdev.xml`:
// ```xml
// <layout>
// <configItem>
// <name>halmakish</name>
// <shortDescription>hm</shortDescription>
// <description>Halmakish</description>
// <languageList>
// <iso639Id>eng</iso639Id>
// </languageList>
// </configItem>
// <variantList>
// <variant>
// <configItem>
// <name>basic</name>
// <description>Halmakish</description>
// </configItem>
// </variant>
// </variantList>
// </layout>
// ```
//
// 3. Run `sudo dpkg-reconfigure xkb-data`.
partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {
name[Group1]= "Halmakish (Basic)";
// key <TLDE> { [ grave, asciitilde ] };
// key <AE01> { [ 1, exclam ] };
// key <AE02> { [ 2, at ] };
// key <AE03> { [ 3, numbersign ] };
// key <AE04> { [ 4, dollar ] };
// key <AE05> { [ 5, percent ] };
// key <AE06> { [ 6, asciicircum ] };
// key <AE07> { [ 7, ampersand ] };
// key <AE08> { [ 8, asterisk ] };
// key <AE09> { [ 9, less ] };
// key <AE10> { [ 0, greater ] };
// key <AE11> { [ minus, underscore ] };
// key <AE12> { [ equal, plus ] };
key <BKSP> { [ BackSpace, BackSpace, Delete ] };
key <TAB> { [ Tab, Tab, Escape ] };
key <AD01> { [ f, F, ampersand ] };
key <AD02> { [ l, L, bracketleft ] };
key <AD03> { [ r, R, bracketright ] };
key <AD04> { [ semicolon, underscore, exclam ] };
key <AD05> { [ b, B, asciicircum ] };
key <AD06> { [ q, Q, percent ] };
key <AD07> { [ p, P, 7 ] };
key <AD08> { [ u, U, 8 ] };
key <AD09> { [ d, D, 9 ] };
key <AD10> { [ j, J, asterisk ] };
key <AD11> { [ leftdoublequotemark, rightdoublequotemark, quotedbl ] };
key <AD12> { [ parenleft, parenright ] };
// key <BKSL> { [ backslash, bar ] };
key <CAPS> { [ BackSpace, BackSpace, Delete ] };
key <AC01> { [ s, S, numbersign ] };
key <AC02> { [ h, H, braceleft ] };
key <AC03> { [ n, N, braceright ] };
key <AC04> { [ t, T, equal ] };
key <AC05> { [ w, W, at ] };
key <AC06> { [ slash, asciitilde, grave ] };
key <AC07> { [ a, A, 4 ] };
key <AC08> { [ e, E, 5 ] };
key <AC09> { [ o, O, 6 ] };
key <AC10> { [ i, I, 0 ] };
key <AC11> { [ rightsinglequotemark, leftsinglequotemark, apostrophe ] };
key <AB01> { [ z, Z, question ] };
key <AB02> { [ m, M, less ] };
key <AB03> { [ c, C, greater ] };
key <AB04> { [ period, minus, period ] };
key <AB05> { [ v, V, bar ] };
key <AB06> { [ g, G, dollar ] };
key <AB07> { [ x, X, backslash ] };
key <AB08> { [ comma, colon, 2 ] };
key <AB09> { [ k, K, 3 ] };
key <AB10> { [ y, Y, plus ] };
key <SPCE> { [ space, space, 1 ] };
include "level3(ralt_switch_multikey)"
};

572
hosts/main/home.nix Normal file
View file

@ -0,0 +1,572 @@
{ config, lib, pkgs, ... }:
let
attachments = (pkgs.yarn2nix-moretea.mkYarnWorkspace {
src = /home/ak/akorg/project/current/andrew.kvalhe.im/andrew.kvalhe.im;
}).attachments;
iosevkaCommon = {
widths = {
normal = { css = "normal"; menu = 5; shape = 500; };
};
weights = {
regular = { css = 400; menu = 400; shape = 400; };
bold = { css = 700; menu = 700; shape = 800; };
};
slopes = {
upright = { angle = 0; css = "normal"; menu = "upright"; shape = "upright"; };
italic = { angle = 9.4; css = "italic"; menu = "italic"; shape = "italic"; };
};
variants.design = {
digit-form = "old-style";
capital-a = "curly-serifless";
capital-g = "toothless-corner-serifless-hooked";
capital-k = "curly-serifless";
capital-u = "toothless-corner";
capital-r = "standing";
capital-v = "curly";
capital-w = "curly";
capital-x = "curly-serifless";
capital-y = "curly-serifless";
capital-z = "curly-serifless";
a = "double-storey-toothless-corner";
b = "toothless-corner";
d = "toothless-corner-serifless";
f = "flat-hook-crossbar-at-x-height";
g = "earless-corner";
i = "serifed-flat-tailed";
j = "flat-hook-serifed";
l = "flat-tailed";
m = "earless-corner-double-arch-short-leg";
n = "earless-corner-straight";
p = "earless-corner";
q = "earless-corner";
r = "earless-corner";
t = "flat-hook-short-neck2";
u = "toothless-corner";
w = "curly";
x = "curly-serifless";
y = "curly";
z = "curly-serifless";
zero = "slashed";
two = "straight-neck";
three = "flat-top";
four = "semi-open-non-crossing";
five = "oblique-upper-left-bar";
six = "straight-bar";
seven = "bend-serifless";
eight = "crossing-asymmetric";
nine = "straight-bar";
tilde = "low";
asterisk = "hex-low";
underscore = "above-baseline";
caret = "low";
brace = "curly";
at = "short";
dollar = "open-cap";
cent = "open";
percent = "dots";
bar = "force-upright";
};
};
iosevka-custom-proportional = pkgs.iosevka.override {
set = "custom-proportional";
privateBuildPlan = iosevkaCommon // {
family = "Iosevka Custom Proportional";
spacing = "quasi-proportional";
ligations = { inherits = "javascript"; };
};
};
iosevka-custom-mono = pkgs.iosevka.override {
set = "custom-mono";
privateBuildPlan = iosevkaCommon // {
family = "Iosevka Custom Mono";
ligations = { inherits = "javascript"; };
};
};
iosevka-custom-term = pkgs.iosevka.override {
set = "custom-term";
privateBuildPlan = iosevkaCommon // {
family = "Iosevka Custom Term";
spacing = "term";
no-ligation = true;
};
};
palette = {
black = "#1b1b1b";
blue = "#66d9ef";
dark-gray = "#3a3a3a";
gray = "#666666";
green = "#a6e22e";
orange = "#fd971f";
purple = "#ae81ff";
red = "#f92672";
white = "#f8f8f8";
yellow = "#e6db74";
};
in
{
# Home manager
programs.home-manager.enable = true;
home.stateVersion = "21.05"; # Permanent
nixpkgs.config.allowUnfree = true;
manual.html.enable = true;
home.username = "ak";
home.homeDirectory = "/home/ak";
home.packages = with pkgs; [
attachments
awscli2
chromium
curl
darktable
delta
digikam
dnsutils
exiftool
fd
ffmpeg
file
firefox-wayland
gimp-with-plugins
gnome.gnome-boxes
gnome.gnome-tweaks
gnome.zenity
gopass
# (gnomeExtensions.easyScreenCast.overrideAttrs (attrs: rec {
# version = "1.4.0";
# src = fetchFromGitHub {
# owner = "EasyScreenCast";
# repo = "EasyScreenCast";
# rev = version;
# sha256 = "sha256-+lh/hqYC9+DUvLE016KuAY4Ybw8KrqEEG7WG4pUbg2k=";
# };
# }))
gnomeExtensions.system-monitor
gnomeExtensions.tray-icons-reloaded
gnupg
gpsprune
htop
httpie
hugin
imagemagick
inkscape
iosevka-custom-mono
iosevka-custom-proportional
iosevka-custom-term
jitsi-meet-electron
josm
killall
libheif # heif-convert
libreoffice
lsof
minecraft
moreutils
mozjpeg
mtr
multitail
ncdu
netcat
nheko
nix-top
nix-tree
nixpkgs-fmt
nox
oxipng
pwgen
qownnotes
ripgrep
roboto
rsync
shellcheck
signal-desktop
thunderbird
tig
transmission-gtk
trash-cli
v4l-utils
vagrant
vscodium
wget
whois
xorg.xev
yaru-theme
youtube-dl
];
fonts.fontconfig.enable = true;
home.sessionVariables = rec {
ANSIBLE_NOCOWS = true;
EDITOR = "${pkgs.vscodium}/bin/codium --wait";
EXA_COLORS = lib.concatStringsSep ":" (lib.attrsets.mapAttrsToList (k: v: "${k}=${v}") {
ur = "2;37"; # the user-read permission bit
uw = "2;37"; # the user-write permission bit
ux = "1;32"; # the user-execute permission bit for regular files
ue = "1;32"; # the user-execute for other file kinds
gr = "2;37"; # the group-read permission bit
gw = "2;37"; # the group-write permission bit
gx = "2;37"; # the group-execute permission bit
tr = "1;35"; # the others-read permission bit
tw = "1;31"; # the others-write permission bit
tx = "2;37"; # the others-execute permission bit
su = "1;33"; # setuid, setgid, and sticky permission bits for files
sf = "1;33"; # setuid, setgid, and sticky for other file kinds
xa = "1;33"; # the extended attribute indicator
sn = "2;37"; # the numbers of a files size
ub = "1;37"; # the units of a files size if it is lower than 1 KB/Kib
uk = "1;34"; # the units of a files size if it is between 1 KB/KiB and 1 MB/MiB
um = "1;33"; # the units of a files size if it is between 1 MB/MiB and 1 GB/GiB
ug = "1;31"; # the units of a files size if it is between 1 GB/GiB and 1 TB/TiB
ut = "1;31"; # the units of a files size if it is 1 TB/TiB or higher
uu = "30"; # a user thats you
un = "31"; # a user thats someone else
gu = "30"; # a group that you belong to
gn = "31"; # a group you arent a member of
da = "2;3;37"; # a files date
lp = "2;37"; # the path of a symlink
cc = "1;33"; # an escaped character in a filename
});
LS_COLORS = lib.concatStringsSep ":" (lib.attrsets.mapAttrsToList (k: v: "${k}=${v}") {
di = "1;36"; # directories
ex = "32"; # executable files
fi = "37"; # regular files
pi = "3;34"; # named pipes
so = "3;34"; # sockets
bd = "1;34"; # block devices
cd = "1;34"; # character devices
ln = "35"; # symlinks
or = "31"; # symlinks with no target
});
VISUAL = EDITOR;
VSCODE_GALLERY_CACHE_URL = "https://vscode.blob.core.windows.net/gallery/index";
VSCODE_GALLERY_CONTROL_URL = "";
VSCODE_GALLERY_ITEM_URL = "https://marketplace.visualstudio.com/items";
VSCODE_GALLERY_RECOMMENDATIONS_URL = "";
VSCODE_GALLERY_SERVICE_URL = "https://marketplace.visualstudio.com/_apis/public/gallery";
};
systemd.user.paths.organize-downloads = {
Unit.Description = "Watch downloads";
Path.PathExistsGlob = "%h/Downloads/Screen{s,\\ S}hot\\ *.png";
Install.WantedBy = [ "default.target" ];
};
systemd.user.services.organize-downloads = {
Unit.Description = "Organize downloads";
Service.ExecStart = "%h/.local/bin/organize-downloads";
Service.Nice = 10;
};
programs = {
bat.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
stdlib = ''
use_gopass() {
eval "$(gopass-await "$@")"
}
'';
};
exa = { enable = true; enableAliases = true; };
fzf = rec {
enable = true;
enableZshIntegration = true;
defaultOptions = [ "--height 33%" "--reverse" ];
defaultCommand = "fd --one-file-system --type file"; # --no-ignore-parent pending https://github.com/sharkdp/fd/pull/817 (fd v9)
fileWidgetCommand = defaultCommand;
changeDirWidgetCommand = "fd --one-file-system --type directory"; # --no-ignore-parent pending https://github.com/sharkdp/fd/pull/817 (fd v9)
};
git = {
enable = true;
aliases = {
ff = "merge --ff-only";
puff = "pull --ff-only";
recent = "!git --no-pager log --max-count 8 --pretty=tformat:\"%w($(tput cols),0,8)%C(cyan)%h%Creset %C(yellow)%cr:%C(magenta)%d%Creset %s\"";
};
delta = {
enable = true;
options = {
file-renamed-label = "moved:";
line-numbers-left-format = "{nm:>1} ";
line-numbers-left-style = "#444444";
line-numbers-minus-style = "#872843 bold";
line-numbers-plus-style = "#5c7b2a bold";
line-numbers-right-format = "{np:>1}";
line-numbers-right-style = "#444444";
line-numbers-zero-style = "#444444 bold";
minus-emph-style = "#827c7d #42282d";
minus-empty-line-marker-style = "normal #42282d";
minus-non-emph-style = "#444444";
minus-style = "#827c7d #42282d";
plus-emph-style = "syntax #343e28";
plus-empty-line-marker-style = "normal #343e28";
plus-non-emph-style = "syntax";
plus-style = "syntax #343e28";
syntax-theme = "Monokai Extended";
whitespace-error-style = "reverse white";
full = {
file-style = "white bold";
file-decoration-style = "omit";
hunk-header-style = "omit";
line-numbers = true;
};
};
};
extraConfig = {
core.autocrlf = "input";
diff.algorithm = "patience";
init.defaultBranch = "main";
merge.commit = false;
push.followTags = true;
tig = {
line-graphics = "utf-8";
main-view-date = "custom";
main-view-date-format = "%F %H:%M";
main-view-id-display = true;
show-changes = false;
tab-size = 4;
truncation-delimiter = "utf-8";
vertical-split = false;
color = {
author = "color8 default";
cursor = "black magenta bold";
graph-commit = "magenta default";
date = "yellow default";
id = "cyan default";
main-head = "magenta default bold";
main-local-tag = "green default";
main-ref = "magenta default";
main-remote = "blue default";
main-tag = "green default";
main-tracked = "blue default bold";
palette-0 = "color8 default";
palette-1 = "color8 default";
palette-2 = "color8 default";
palette-3 = "color8 default";
palette-4 = "color8 default";
palette-5 = "color8 default";
palette-6 = "color8 default";
palette-7 = "color8 default";
palette-8 = "color8 default";
palette-9 = "color8 default";
palette-10 = "color8 default";
palette-11 = "color8 default";
palette-12 = "color8 default";
palette-13 = "color8 default";
search-result = "black white bold";
title-blur = "white black";
title-focus = "white black bold";
};
};
};
ignores = [
".direnv/"
".envrc"
".envrc.nix"
".vscode/"
];
iniContent.core.pager = lib.mkForce "${pkgs.delta}/bin/delta --color-only --features full"; # Set feature
userName = "Andrew Kvalheim";
userEmail = "Andrew@Kvalhe.im";
};
jq.enable = true;
kitty = {
enable = true;
font = {
package = iosevka-custom-term;
name = "Iosevka Custom Term";
size = 11;
};
keybindings = {
"shift+left" = "previous_tab";
"ctrl+shift+left" = "move_tab_backward";
"shift+right" = "next_tab";
"ctrl+shift+right" = "move_tab_forward";
"shift+down" = "previous_window";
"ctrl+shift+up" = "move_window_backward";
"shift+up" = "next_window";
"ctrl+shift+down" = "move_window_forward";
"alt+down" = "resize_window shorter";
"alt+up" = "resize_window taller";
};
settings = {
# Mouse
click_interval = "0.25";
focus_follows_mouse = "yes";
mouse_hide_wait = "0";
select_by_word_characters = "-_?&%+#";
# Windows
hide_window_decorations = true;
scrollback_lines = "16384";
enabled_layouts = "vertical, horizontal";
# Workaround for https://github.com/kovidgoyal/kitty/issues/3180
touch_scroll_multiplier = "10";
# Sounds
enable_audio_bell = "no";
# Font
bold_font = "Iosevka Custom Term Bold";
italic_font = "Iosevka Custom Term Italic";
bold_italic_font = "Iosevka Custom Term Bold Italic";
active_tab_font_style = "bold";
inactive_tab_font_style = "bold";
# Cursor
cursor_shape = "beam";
# URLs
url_style = "single";
# Colors
wayland_titlebar_color = palette.black;
foreground = palette.white;
background = palette.black;
cursor = palette.orange;
url_color = palette.white;
active_border_color = palette.dark-gray;
inactive_border_color = palette.dark-gray;
bell_border_color = palette.red;
active_tab_foreground = palette.white;
active_tab_background = palette.dark-gray;
inactive_tab_foreground = palette.gray;
inactive_tab_background = palette.dark-gray;
selection_foreground = palette.black;
selection_background = palette.orange;
color0 = palette.dark-gray;
color1 = palette.red;
color2 = palette.green;
color3 = palette.yellow;
color4 = palette.blue;
color5 = palette.orange;
color6 = palette.purple;
color7 = palette.white;
color8 = palette.gray;
color9 = palette.red;
color10 = palette.green;
color11 = palette.yellow;
color12 = palette.blue;
color13 = palette.orange;
color14 = palette.purple;
color15 = palette.white;
};
};
zsh = {
enable = true;
autocd = false;
history = {
expireDuplicatesFirst = true;
extended = true;
ignoreDups = false;
ignoreSpace = true;
save = 100000000;
size = 1000000000;
};
sessionVariables = {
ATTACHMENTS_ENV = "/home/ak/.attachments.env";
HIST_STAMPS = "yyyy-mm-dd";
REPORTTIME = 10;
WORDCHARS = "_.~;!#$%^";
};
initExtra = ''
setopt HIST_FIND_NO_DUPS
setopt NOCLOBBER
setopt PUSHD_SILENT
export DIRENV_LOG_FORMAT="$(print -P "%B%F{8} %%s%f")"
TIMEFMT="$(print -P "%B%F{8} Duration: %%*Es, CPU: %%P, Memory: %%MkB%f")"
git() {
if [[ "$1" == 'clone' && "$2" =~ '^https://(github\.com|gitlab\.com)/([^/]+)/[^/]+' ]]; then
shift
echo "Detected origin name ''\'''${match[2]}'" >&2
command git clone --origin "''${match[2]}" "$@"
elif [[ "$1" == 'checkout' ]]; then
echo 'Reminder: Use `git switch` or `git restore` instead.' >&2
command git "$@"
else
command git "$@"
fi
}
rd() { diff --recursive --unified "$@" | delta }
rdw() { diff --ignore-all-space --recursive --unified "$@" | delta }
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
'';
shellAliases = {
a = "git add --patch";
b = "git switch --create";
c = "git commit";
cat = "bat --plain";
code = "codium";
d = "git diff ':!*.lock'";
ds = "git diff --staged ':!*.lock'";
e = "exa --all --group-directories-first --long --header --time-style long-iso";
et = "exa --all --group-directories-first --long --header --time-style long-iso --tree";
gf = "git fetch --all --jobs 4 --prune";
gff = "git fetch --all --jobs 4 --prune && git merge --ff-only";
h = "tig --all";
mv = "mv --no-clobber --verbose";
p = "gopass";
rebase = "noglob git rebase --autostash --autosquash --interactive";
rm = "rm --one-file-system --verbose";
s = "git status";
stash = "git stash save --include-untracked";
undo = "git restore --patch";
watch = "watch --color";
};
prezto = {
enable = true;
pmodules = [
"environment"
"terminal"
"spectrum"
"completion"
"syntax-highlighting"
"history-substring-search"
"prompt"
"git"
];
prompt.theme = "powerlevel10k";
syntaxHighlighting.styles = {
arg0 = "fg=white,bold";
precommand = "fg=white"; # Pending https://github.com/zsh-users/zsh-syntax-highlighting/issues/432
reserved-word = "fg=blue";
};
terminal = {
autoTitle = true;
multiplexerTitleFormat = "%1~";
tabTitleFormat = "%1~";
windowTitleFormat = "%1~";
};
extraConfig = ''
zstyle ':prezto:module:git:alias' skip 'yes'
'';
};
};
};
# TODO: Clear `~/.cache/gtk-3.0/compose` when this is updated
home.file.".XCompose".source = ./Compose;
home.file.".p10k.zsh".source = ./p10k.zsh;
# Workaround for https://github.com/NixOS/nixpkgs/issues/101616
home.file."${config.xdg.configHome}/autostart/gnome-keyring-ssh.desktop".text = ''
[Desktop Entry]
Type=Application
Name=SSH Key Agent
Hidden=true
'';
home.sessionPath = [ "$HOME/.cargo/bin" ];
}

View file

@ -0,0 +1,135 @@
# Adapted from https://github.com/pjones/tilde
{ config, lib, pkgs, ... }:
let
cfg = config.kmonad;
package = pkgs.callPackage ({ haskellPackages, haskell }: let
src = pkgs.fetchFromGitHub {
owner = "kmonad";
repo = "kmonad";
rev = "768d5e4e1375d80607440bdcd10296ca7f6f00ea";
sha256 = "15i6s2mn5bg5cwqhq6j95smadf2vf2f9pczqdpy51hhqv9vspg5n";
};
drv = haskell.lib.justStaticExecutables (haskellPackages.callCabal2nix "kmonad" src { });
in drv) { };
# Per-keyboard options:
keyboard = { name, ... }: {
options = {
name = lib.mkOption {
type = lib.types.str;
example = "laptop-internal";
description = "Keyboard name.";
};
device = lib.mkOption {
type = lib.types.path;
example = "/dev/input/by-id/some-dev";
description = "Path to the keyboard's device file.";
};
config = lib.mkOption {
type = lib.types.lines;
default = ''
(defsrc a)
(deflayer default a)
;; Missing kmonad.keyboard.<name>.config
'';
description = ''
Keyboard configuration excluding the defcfg block.
'';
};
};
config = {
name = lib.mkDefault name;
};
};
# Create a complete KMonad configuration file:
mkCfg = keyboard:
let defcfg = ''
(defcfg
input (device-file "${keyboard.device}")
output (uinput-sink "kmonad-${keyboard.name}")
fallthrough true
allow-cmd false
)
'';
in
pkgs.writeTextFile {
name = "kmonad-${keyboard.name}.cfg";
text = defcfg + "\n" + keyboard.config;
checkPhase = "${cfg.package}/bin/kmonad -d $out";
};
# Build a systemd path config that starts the service below when a
# keyboard device appears:
mkPath = keyboard: rec {
name = "kmonad-${keyboard.name}";
value = {
description = "KMonad trigger for ${keyboard.device}";
wantedBy = [ "default.target" ];
pathConfig.Unit = "${name}.service";
pathConfig.PathExists = keyboard.device;
};
};
# Build a systemd service that starts KMonad:
mkService = keyboard: {
name = "kmonad-${keyboard.name}";
value = {
description = "KMonad for ${keyboard.device}";
script = "${cfg.package}/bin/kmonad ${mkCfg keyboard}";
serviceConfig.Restart = "no";
serviceConfig.User = "kmonad";
serviceConfig.SupplementaryGroups = [ "input" "uinput" ];
serviceConfig.Nice = -20;
};
};
in
{
options.kmonad = {
enable = lib.mkEnableOption "KMonad: An advanced keyboard manager.";
package = lib.mkOption {
type = lib.types.package;
default = package;
example = "pkgs.haskellPackages.kmonad";
description = "The KMonad package to use.";
};
keyboards = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule keyboard);
default = { };
description = "Keyboard configuration.";
};
};
config = lib.mkIf cfg.enable {
users.groups.uinput = { };
users.groups.kmonad = { };
users.users.kmonad = {
description = "KMonad system user.";
group = "kmonad";
isSystemUser = true;
};
services.udev.extraRules = ''
# KMonad user access to /dev/uinput
KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
'';
systemd.paths =
builtins.listToAttrs
(map mkPath (builtins.attrValues cfg.keyboards));
systemd.services =
builtins.listToAttrs
(map mkService (builtins.attrValues cfg.keyboards));
};
}

328
hosts/main/nixos.nix Normal file
View file

@ -0,0 +1,328 @@
{ config, lib, pkgs, ... }:
let
palette = {
black = "#1b1b1b";
blue = "#66d9ef";
dark-gray = "#3a3a3a";
gray = "#666666";
green = "#a6e22e";
orange = "#fd971f";
purple = "#ae81ff";
red = "#f92672";
white = "#f8f8f8";
yellow = "#e6db74";
};
in
{
imports =
[
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
<nixos-hardware/lenovo/thinkpad/p14s/amd/gen2>
/etc/nixos/hardware-configuration.nix
./kmonad-issue-306.nix
./local/nixos.nix
];
# Nix
system.stateVersion = "21.05"; # Permanent
nix.autoOptimiseStore = true;
nix.gc = { automatic = true; options = "--delete-older-than 7d"; };
nix.extraOptions = ''
# Recommended by nix-direnv
keep-outputs = true
keep-derivations = true
'';
nixpkgs.config.allowUnfree = true;
# CPU architecture
nixpkgs.localSystem = {
platform.gcc = { arch = "znver3"; tune = "znver3"; };
system = "x86_64-linux";
};
# Boot
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.memtest86.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.plymouth.enable = true;
# Swap
zramSwap.enable = true;
# Filesystems
boot.initrd.luks = {
gpgSupport = true;
devices.pv = {
device = "/dev/disk/by-partlabel/pv-enc";
allowDiscards = true;
fallbackToPassword = true;
gpgCard.encryptedPass = ./local/luks-passphrase.gpg;
gpgCard.publicKey = ./andrew.asc;
};
};
fileSystems = {
"/" = {
options = [ "noatime" ];
};
"/home/ak/annex" = {
device = "closet:/mnt/hdd/home-ak-annex";
fsType = "nfs";
options = [ "noauto" "user" ];
};
"/home/ak/services-hdd" = {
device = "closet:/mnt/hdd/services";
fsType = "nfs";
options = [ "noauto" "user" ];
};
"/home/ak/services-ssd" = {
device = "closet:/mnt/ssd/services";
fsType = "nfs";
options = [ "noauto" "user" ];
};
};
# TODO: Set `chattr +i` on intermittent mount points
boot.cleanTmpDir = true;
# Workaround for:
# - https://github.com/NixOS/nixpkgs/issues/24913
# - https://github.com/NixOS/nixpkgs/issues/9848
security.wrappers = {
"mount.nfs" = {
source = "${pkgs.nfs-utils}/bin/mount.nfs";
owner = "root"; group = "root"; setuid = true;
};
"umount.nfs" = {
source = "${pkgs.nfs-utils}/bin/umount.nfs";
owner = "root"; group = "root"; setuid = true;
};
};
# Time and locale
time.timeZone = "America/Los_Angeles";
i18n.extraLocaleSettings.LC_TIME = "en_DK.UTF-8";
# Networking
networking.useDHCP = false; # Future default
networking.hostName = "main";
networking.domain = "home.arpa";
networking.search = [ "home.arpa" ];
systemd.network.links = {
"10-dock".linkConfig.Name = "dock";
"10-jack".linkConfig.Name = "jack";
"10-wifi".linkConfig.Name = "wifi";
};
networking.interfaces.dock.useDHCP = true;
networking.interfaces.jack.useDHCP = true;
networking.interfaces.wifi.useDHCP = true;
# Workaround for `avahi-daemon[1234]: Failed to read /etc/avahi/services.`
# Upstream: https://github.com/lathiat/avahi/blob/v0.8/avahi-daemon/static-services.c#L917-L919
system.activationScripts.etcAvahiServices = "mkdir -p /etc/avahi/services";
# Turn off wifi when jack is connected
# networking.networkmanager.dispatcherScripts = [{ source = pkgs.writeText "dispatch" ''
# case "$1" in
# "")
# case "$2" in
# connectivity-change)
# if [ "$(${pkgs.networkmanager}/bin/nmcli --get-values 'GENERAL.STATE' device show 'jack')" = '20 (unavailable)' ]; then
# logger "Enabling wifi ($2)"
# ${pkgs.networkmanager}/bin/nmcli radio wifi on
# fi
# ;;
# esac
# ;;
# jack)
# case "$2" in
# down)
# logger "Enabling wifi ($1 $2)"
# ${pkgs.networkmanager}/bin/nmcli radio wifi on
# ;;
# up)
# logger "Disabling wifi ($1 $2)"
# ${pkgs.networkmanager}/bin/nmcli radio wifi off
# ;;
# esac
# ;;
# esac
# ''; }];
# Console
console.colors = map (lib.removePrefix "#") [
"#000000" palette.red palette.green palette.yellow palette.blue palette.orange palette.purple palette.white
palette.gray palette.red palette.green palette.yellow palette.blue palette.orange palette.purple palette.white
];
# Keyboard
services.xserver.extraLayouts.halmakish = {
description = "Andrew";
languages = [ "eng" ];
symbolsFile = ./halmakish.xkb;
};
services.xserver.layout = "halmakish";
console.useXkbConfig = true;
kmonad = {
enable = true;
keyboards.default = {
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
config = builtins.readFile ./halmakish.kbd;
};
};
# Power
systemd.ctrlAltDelUnit = "poweroff.target";
# Authentication
security.pam.u2f = {
enable = true;
appId = "pam://main";
control = "sufficient";
cue = true;
};
# Authorization
security.sudo.extraRules = [
{
groups = [ "wheel" ];
commands = [
{ command = "/run/current-system/sw/bin/nix-channel --update"; options = [ "NOPASSWD" ]; }
{ command = "/run/current-system/sw/bin/nixos-rebuild boot"; options = [ "NOPASSWD" ]; }
{ command = "/run/current-system/sw/bin/nixos-rebuild switch"; options = [ "NOPASSWD" ]; }
{ command = "/run/current-system/sw/bin/poweroff"; options = [ "NOPASSWD" ]; }
];
}
];
# SSH
services.openssh.enable = true;
# Mail
services.postfix = {
enable = true;
config = {
relayhost = "[email-smtp.us-west-2.amazonaws.com]:587";
smtp_use_tls = "yes";
smtp_tls_security_level = "encrypt";
smtp_tls_note_starttls_offer = "yes";
smtp_sasl_auth_enable = "yes";
smtp_sasl_security_options = "noanonymous";
smtp_sasl_password_maps = "hash:/var/lib/postfix/conf/smtp_sasl_password_maps";
};
origin = "andrew.kvalhe.im";
destination = []; # Disable local delivery
mapFiles.smtp_sasl_password_maps = ./local/smtp-sasl-password-maps;
};
systemd.services."alert@" = {
description = "Alert of failed %I";
serviceConfig.SyslogIdentifier = "%p";
serviceConfig.Type = "oneshot";
serviceConfig.ExecStart = ''
${pkgs.bash}/bin/bash -c "${pkgs.system-sendmail}/bin/sendmail -i root \
<<< $'Subject: %I failed\n\n'\"$(systemctl --full status %I)\""
'';
};
# SMART monitoring
services.smartd = {
enable = true;
notifications.mail.enable = true;
};
# Audio
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa = { enable = true; support32Bit = true; };
pulse.enable = true;
};
# Printer
services.printing.enable = true;
services.printing.drivers = with pkgs; [
brgenml1cupswrapper
];
hardware.printers = {
ensureDefaultPrinter = "DCP-7065DN";
ensurePrinters = [ {
name = "DCP-7065DN";
description = "Brother DCP-7065DN";
model = "brother-BrGenML1-cups-en.ppd";
deviceUri = "lpd://lumberjack/binary_p1";
} ];
};
# Scanner
hardware.sane.enable = true;
hardware.sane.brscan4 = {
enable = true;
netDevices.DCP-7065DN = { model = "DCP-7065DN"; nodename = "lumberjack"; };
};
# Graphical environment
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Applications
# environment.systemPackages = with pkgs; [
# ];
# fonts.fonts = with pkgs; [
# ];
environment.gnome.excludePackages = with pkgs.gnome; [
epiphany
geary
gnome-maps
gnome-music
gnome-photos
gnome-weather
];
services.pcscd.enable = true;
programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
virtualisation = {
containers.registries.search = ["docker.io"];
docker = { enable = true; enableOnBoot = false; autoPrune.enable = true; };
podman.enable = true;
libvirtd.enable = true;
};
programs.zsh.enable = true;
environment.localBinInPath = true;
# Users
users.mutableUsers = false;
users.groups.ak.gid = 1000;
users.users.ak = {
isNormalUser = true;
uid = 1000;
group = "ak";
extraGroups = [
"wheel"
"networkmanager"
"lp"
"scanner"
"podman"
"docker"
"libvirtd"
];
description = "Andrew";
hashedPassword = builtins.readFile ./local/ak.passwd;
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [ (builtins.readFile ./andrew.pub) ];
};
# Backup
systemd.services.mirror = {
description = "Mirror to closet";
serviceConfig.Type = "oneshot";
serviceConfig.Nice = 10;
onFailure = [ "alert@%n.service" ];
path = with pkgs; [ netcat openssh rsync ];
script = builtins.readFile ./local/mirror.sh;
};
systemd.timers.mirror = {
timerConfig.OnCalendar = "00,12,17:00 America/Los_Angeles";
timerConfig.Persistent = true;
wantedBy = [ "timers.target" ];
};
}

1659
hosts/main/p10k.zsh Normal file

File diff suppressed because it is too large Load diff