misc: Add everything
This commit is contained in:
590
modules/programs/alacritty/default.nix
Normal file
590
modules/programs/alacritty/default.nix
Normal file
@@ -0,0 +1,590 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
options.services.alacritty = {
|
||||
fontSize = lib.mkOption {
|
||||
type = lib.types.float;
|
||||
default = 12.0;
|
||||
};
|
||||
};
|
||||
|
||||
config.environment.systemPackages = [ pkgs.alacritty ];
|
||||
config.home-manager.users.alexander.programs = {
|
||||
alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
window = {
|
||||
dimensions = {
|
||||
columns = 0;
|
||||
lines = 0;
|
||||
};
|
||||
padding = {
|
||||
x = 2;
|
||||
y = 2;
|
||||
};
|
||||
dynamic_padding = false;
|
||||
dynamic_title = true;
|
||||
decorations = "full";
|
||||
startup_mode = "Windowed";
|
||||
};
|
||||
|
||||
scrolling = {
|
||||
history = 10000;
|
||||
multiplier = 3;
|
||||
};
|
||||
|
||||
font = {
|
||||
size = config.services.alacritty.fontSize;
|
||||
offset = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
glyph_offset = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
use_thin_strokes = true;
|
||||
};
|
||||
debug = {
|
||||
render_timer = false;
|
||||
persistent_logging = false;
|
||||
};
|
||||
|
||||
draw_bold_text_with_bright_colors = true;
|
||||
|
||||
colors = {
|
||||
primary = {
|
||||
background = "0x1e282d";
|
||||
foreground = "0xc4c7d1";
|
||||
};
|
||||
normal = {
|
||||
black = "0x666666";
|
||||
red = "0xeb606b";
|
||||
green = "0xc3e88d";
|
||||
yellow = "0xf7eb95";
|
||||
blue = "0x80cbc4";
|
||||
magenta = "0xff2f90";
|
||||
cyan = "0xaeddff";
|
||||
white = "0xffffff";
|
||||
};
|
||||
bright = {
|
||||
black = "0xff262b";
|
||||
red = "0xeb606b";
|
||||
green = "0xc3e88d";
|
||||
yellow = "0xf7eb95";
|
||||
blue = "0x7dc6bf";
|
||||
magenta = "0x6c71c4";
|
||||
cyan = "0x35434d";
|
||||
white = "0xffffff";
|
||||
};
|
||||
};
|
||||
|
||||
background_opacity = 0.7;
|
||||
mouse_bindings = [ {
|
||||
mouse = "Middle";
|
||||
action = "PasteSelection";
|
||||
} ];
|
||||
mouse = {
|
||||
double_click = {
|
||||
threshold = 300;
|
||||
};
|
||||
triple_click = {
|
||||
threshold = 300;
|
||||
};
|
||||
|
||||
hide_when_typing = false;
|
||||
};
|
||||
|
||||
selection = {
|
||||
semantic_scape_chars = ",│`|:\"' ()[]{}<>";
|
||||
save_to_clipboard = true;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
style = "Block";
|
||||
unfocused_hollow = true;
|
||||
};
|
||||
|
||||
live_config_reload = true;
|
||||
enable_experimental_conpty_backend = false;
|
||||
alt_send_esc = true;
|
||||
|
||||
key_bindings = [
|
||||
{
|
||||
key = "Paste";
|
||||
action = "Paste";
|
||||
}
|
||||
{
|
||||
key = "Copy";
|
||||
action = "Copy";
|
||||
}
|
||||
{
|
||||
key = "L";
|
||||
mods = "Control";
|
||||
action = "ClearLogNotice";
|
||||
}
|
||||
{
|
||||
key = "L";
|
||||
mods = "Control";
|
||||
chars = "\\x0c";
|
||||
}
|
||||
{
|
||||
key = "Home";
|
||||
chars = "\\x1bOH";
|
||||
mode = "AppCursor";
|
||||
}
|
||||
{
|
||||
key = "Home";
|
||||
chars = "\\x1b[H";
|
||||
mode = "~AppCursor";
|
||||
}
|
||||
{
|
||||
key = "End";
|
||||
chars = "\\x1bOF";
|
||||
mode = "AppCursor";
|
||||
}
|
||||
{
|
||||
key = "End";
|
||||
chars = "\\x1b[F";
|
||||
mode = "~AppCursor";
|
||||
}
|
||||
{
|
||||
key = "PageUp";
|
||||
mods = "Shift";
|
||||
action = "ScrollPageUp";
|
||||
mode = "~Alt";
|
||||
}
|
||||
{
|
||||
key = "PageUp";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[5;2~";
|
||||
mode = "Alt";
|
||||
}
|
||||
{
|
||||
key = "PageDown";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[6;5~";
|
||||
}
|
||||
{
|
||||
key = "PageDown";
|
||||
chars = "\\x1b[6~";
|
||||
}
|
||||
{
|
||||
key = "Tab";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[Z";
|
||||
}
|
||||
{
|
||||
key = "Back";
|
||||
chars= "\\x7f";
|
||||
}
|
||||
{
|
||||
key = "Back";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b\\x7f";
|
||||
}
|
||||
{
|
||||
key = "Insert";
|
||||
chars = "\\x1b[2~";
|
||||
}
|
||||
{
|
||||
key = "Delete";
|
||||
chars = "\\x1b[3~";
|
||||
}
|
||||
{
|
||||
key = "Left";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[1;2D";
|
||||
}
|
||||
{
|
||||
key = "Left";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[1;5D";
|
||||
}
|
||||
{
|
||||
key = "Left";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[1;3D";
|
||||
}
|
||||
{
|
||||
key = "Left";
|
||||
chars = "\\x1b[D";
|
||||
mode = "~AppCursor";
|
||||
}
|
||||
{
|
||||
key = "Left";
|
||||
chars = "\\x1bOD";
|
||||
mode = "AppCursor";
|
||||
}
|
||||
{
|
||||
key = "Right";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[1;2C";
|
||||
}
|
||||
{
|
||||
key = "Right";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[1;5C";
|
||||
}
|
||||
{
|
||||
key = "Right";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[1;3C";
|
||||
}
|
||||
{
|
||||
key = "Right";
|
||||
chars = "\\x1b[C";
|
||||
mode = "~AppCursor";
|
||||
}
|
||||
{
|
||||
key = "Right";
|
||||
chars = "\\x1bOC";
|
||||
mode = "AppCursor";
|
||||
}
|
||||
{
|
||||
key = "Up";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[1;2A";
|
||||
}
|
||||
{
|
||||
key = "Up";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[1;5A";
|
||||
}
|
||||
{
|
||||
key = "Up";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[1;3A";
|
||||
}
|
||||
{
|
||||
key = "Up";
|
||||
chars = "\\x1b[A";
|
||||
mode = "~AppCursor";
|
||||
}
|
||||
{
|
||||
key = "Up";
|
||||
chars = "\\x1bOA";
|
||||
mode = "AppCursor";
|
||||
}
|
||||
{
|
||||
key = "Down";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[1;2B";
|
||||
}
|
||||
{
|
||||
key = "Down";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[1;5B";
|
||||
}
|
||||
{
|
||||
key = "Down";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[1;3B";
|
||||
}
|
||||
{
|
||||
key = "Down";
|
||||
chars = "\\x1b[B";
|
||||
mode = "~AppCursor";
|
||||
}
|
||||
{
|
||||
key = "Down";
|
||||
chars = "\\x1bOB";
|
||||
mode = "AppCursor";
|
||||
}
|
||||
{
|
||||
key = "F1";
|
||||
chars = "\\x1bOP";
|
||||
}
|
||||
{
|
||||
key = "F2";
|
||||
chars = "\\x1bOQ";
|
||||
}
|
||||
{
|
||||
key = "F3";
|
||||
chars = "\\x1bOR";
|
||||
}
|
||||
{
|
||||
key = "F4";
|
||||
chars = "\\x1bOS";
|
||||
}
|
||||
{
|
||||
key = "F5";
|
||||
chars = "\\x1b[15~";
|
||||
}
|
||||
{
|
||||
key = "F6";
|
||||
chars = "\\x1b[17~";
|
||||
}
|
||||
{
|
||||
key = "F7";
|
||||
chars = "\\x1b[18~";
|
||||
}
|
||||
{
|
||||
key = "F8";
|
||||
chars = "\\x1b[19~";
|
||||
}
|
||||
{
|
||||
key = "F9";
|
||||
chars = "\\x1b[20~";
|
||||
}
|
||||
{
|
||||
key = "F10";
|
||||
chars = "\\x1b[21~";
|
||||
}
|
||||
{
|
||||
key = "F11";
|
||||
chars = "\\x1b[23~";
|
||||
}
|
||||
{
|
||||
key = "F12";
|
||||
chars = "\\x1b[24~";
|
||||
}
|
||||
{
|
||||
key = "F1";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[1;2P";
|
||||
}
|
||||
{
|
||||
key = "F2";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[1;2Q";
|
||||
}
|
||||
{
|
||||
key = "F3";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[1;2R";
|
||||
}
|
||||
{
|
||||
key = "F4";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[1;2S";
|
||||
}
|
||||
{
|
||||
key = "F5";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[15;2~";
|
||||
}
|
||||
{
|
||||
key = "F6";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[17;2~";
|
||||
}
|
||||
{
|
||||
key = "F7";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[18;2~";
|
||||
}
|
||||
{
|
||||
key = "F8";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[19;2~";
|
||||
}
|
||||
{
|
||||
key = "F9";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[20;2~";
|
||||
}
|
||||
{
|
||||
key = "F10";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[21;2~";
|
||||
}
|
||||
{
|
||||
key = "F11";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[23;2~";
|
||||
}
|
||||
{
|
||||
key = "F12";
|
||||
mods = "Shift";
|
||||
chars = "\\x1b[24;2~";
|
||||
}
|
||||
{
|
||||
key = "F1";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[1;5P";
|
||||
}
|
||||
{
|
||||
key = "F2";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[1;5Q";
|
||||
}
|
||||
{
|
||||
key = "F3";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[1;5R";
|
||||
}
|
||||
{
|
||||
key = "F4";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[1;5S";
|
||||
}
|
||||
{
|
||||
key = "F5";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[15;5~";
|
||||
}
|
||||
{
|
||||
key = "F6";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[17;5~";
|
||||
}
|
||||
{
|
||||
key = "F7";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[18;5~";
|
||||
}
|
||||
{
|
||||
key = "F8";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[19;5~";
|
||||
}
|
||||
{
|
||||
key = "F9";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[20;5~";
|
||||
}
|
||||
{
|
||||
key = "F10";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[21;5~";
|
||||
}
|
||||
{
|
||||
key = "F11";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[23;5~";
|
||||
}
|
||||
{
|
||||
key = "F12";
|
||||
mods = "Control";
|
||||
chars = "\\x1b[24;5~";
|
||||
}
|
||||
{
|
||||
key = "F1";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[1;6P";
|
||||
}
|
||||
{
|
||||
key = "F2";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[1;6Q";
|
||||
}
|
||||
{
|
||||
key = "F3";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[1;6R";
|
||||
}
|
||||
{
|
||||
key = "F4";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[1;6S";
|
||||
}
|
||||
{
|
||||
key = "F5";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[15;6~";
|
||||
}
|
||||
{
|
||||
key = "F6";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[17;6~";
|
||||
}
|
||||
{
|
||||
key = "F7";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[18;6~";
|
||||
}
|
||||
{
|
||||
key = "F8";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[19;6~";
|
||||
}
|
||||
{
|
||||
key = "F9";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[20;6~";
|
||||
}
|
||||
{
|
||||
key = "F10";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[21;6~";
|
||||
}
|
||||
{
|
||||
key = "F11";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[23;6~";
|
||||
}
|
||||
{
|
||||
key = "F12";
|
||||
mods = "Alt";
|
||||
chars = "\\x1b[24;6~";
|
||||
}
|
||||
{
|
||||
key = "F1";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[1;3P";
|
||||
}
|
||||
{
|
||||
key = "F2";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[1;3Q";
|
||||
}
|
||||
{
|
||||
key = "F3";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[1;3R";
|
||||
}
|
||||
{
|
||||
key = "F4";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[1;3S";
|
||||
}
|
||||
{
|
||||
key = "F5";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[15;3~";
|
||||
}
|
||||
{
|
||||
key = "F6";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[17;3~";
|
||||
}
|
||||
{
|
||||
key = "F7";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[18;3~";
|
||||
}
|
||||
{
|
||||
key = "F8";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[19;3~";
|
||||
}
|
||||
{
|
||||
key = "F9";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[20;3~";
|
||||
}
|
||||
{
|
||||
key = "F10";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[21;3~";
|
||||
}
|
||||
{
|
||||
key = "F11";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[23;3~";
|
||||
}
|
||||
{
|
||||
key = "F12";
|
||||
mods = "Super";
|
||||
chars = "\\x1b[24;3~";
|
||||
}
|
||||
{
|
||||
key = "NumpadEnter";
|
||||
chars = "\\n";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/programs/distributed-build/builder.nix
Normal file
17
modules/programs/distributed-build/builder.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.binfmt.emulatedSystems = [ "i686-linux" ]; # For remote building
|
||||
environment.systemPackages = with pkgs; [ openssh ];
|
||||
nix.trustedUsers = ["builder"];
|
||||
|
||||
# TODO: Specify a firewall rule to only allow this from my other NixOS machines
|
||||
users.extraUsers."builder" = {
|
||||
isSystemUser = true;
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDN8tV/VbCwd5QVoJX+0n3hOCCRhIINZEhyMSrhOishQpDR2H/gtnIuTTYKtNbkxfICFXwxDKmAJv8ThijCBmRZMQHl/Zo4D/ArqbZYSSoEmXpEWMCYnyh6QJ/bE8MLSWJXszla2NmC87/YUJzmGbuk+vaVSwtFhNoS0aZv1KVkcspgX6E488tEM/rXItrSkGE2x0lnzJCDYu2s5r5Ij1b/qorSijT0xLDSWMLEGIPyFSx4L7xtzvWsyh0mGuPnwqSWLc8tVOO6nO6slAs/mDYwZ1JXBV+hCvAm8EVwE0M16WR8ZRg+3XRNieJhkLSOjoFmzB/A1S17h3UPC+jPYWtM6UwMO6679HkoZNzGaAFemVHEpLjZpG8wIrZ2GL+s5g3WJVa7wCI77j8zlfGif2RevmZx4r8f+t36j9EsCPY9Z90Fg/l81Dv6xl/+7R/RUzXN0zXTsk11Dvrz1mvwGKHmOfEZAdiSP4pAWuT8ZgxbsYjCAGTo+7t5OSWBxwPeypSSkKLYMaChkudX3xOTVVlJ3zuRmN5FCdcA3B7hpKt+au7U7Ou0xUtWdc4ICnyXowOCGjZmLfdePR1Mx+/r6aQq7lh0BhT1aVlaHStJseMvDOkz3FRSke94BexHXgSRJ0rI0J6A29JiW+3kuAsdPJcgMHLqT9l0/TKk0x0YHyJd+Q== alexander@mikulinux
|
||||
"
|
||||
];
|
||||
};
|
||||
}
|
||||
22
modules/programs/distributed-build/offload.nix
Normal file
22
modules/programs/distributed-build/offload.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
distributedBuilds = true;
|
||||
buildMachines = [{
|
||||
hostName = "mikulinux";
|
||||
systems = [ "x86_64-linux" "i686-linux" ];
|
||||
maxJobs = 4;
|
||||
speedFactor = 2;
|
||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
}];
|
||||
};
|
||||
|
||||
programs.ssh.extraConfig = ''
|
||||
Host mikulinux
|
||||
HostName 192.168.178.38
|
||||
User builder
|
||||
IdentitiesOnly yes
|
||||
IdentityFile /root/.ssh/id_builder
|
||||
'';
|
||||
}
|
||||
9
modules/programs/emacs/default.nix
Normal file
9
modules/programs/emacs/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.alexander.home.file = {
|
||||
".emacs".source = ./dotemacs;
|
||||
".emacs.d/early-init.el".source = ./early-init.el;
|
||||
".emacs.d/mu4e.el".source = ./mu4e.el;
|
||||
};
|
||||
}
|
||||
276
modules/programs/emacs/dotemacs
Normal file
276
modules/programs/emacs/dotemacs
Normal file
@@ -0,0 +1,276 @@
|
||||
(defconst dd/using-native-comp-p (fboundp 'native-comp-available-p))
|
||||
(when dd/using-native-comp-p
|
||||
(setq comp-async-query-on-exit t)
|
||||
(setq comp-async-jobs-number 8)
|
||||
(setq comp-async-report-warnings-errors nil)
|
||||
(setq comp-deferred-compilation t))
|
||||
(setq redisplay-dont-pause t)
|
||||
(setq jit-lock-defer-time 0)
|
||||
(setq fast-but-imprecise-scrolling t)
|
||||
(setq make-backup-files nil)
|
||||
(setq create-lockfiles nil)
|
||||
|
||||
;; A trick for faster startup is to just disable GC for the init phase
|
||||
;;; See: https://github.com/nilcons/emacs-use-package-fast#a-trick-less-gc-during-startup
|
||||
(setq gc-cons-threshold 64000000)
|
||||
(add-hook 'after-init-hook #'(lambda ()
|
||||
;; restore after startup
|
||||
(setq gc-cons-threshold 800000)))
|
||||
|
||||
(defun http-download-verify-and-exec (url sha256-hash name func)
|
||||
(let ((actual-hash ""))
|
||||
(with-temp-buffer
|
||||
;; Somewhat not documented function. Based on https://emacs.stackexchange.com/a/38482
|
||||
;; The problem is that url-retrieve-synchronously prints the HTTP headers at
|
||||
;; the top, which are, since they include time, non-deterministic and thus cannot
|
||||
;; be used for hashing.
|
||||
(url-insert-file-contents url)
|
||||
(setq actual-hash (secure-hash 'sha256 (current-buffer)))
|
||||
(unless (string= sha256-hash actual-hash)
|
||||
(error "Unexpected hash for %s: Got %s, expected %s" name actual-hash sha256-hash))
|
||||
func)))
|
||||
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 5)
|
||||
(install-hash ""))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(http-download-verify-and-exec
|
||||
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
||||
"5bbeee903a90a0fda88a6b8516697c121400facb36a2c349e9447a53baef154e"
|
||||
"straight's install.el"
|
||||
(lambda ()
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp))))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
|
||||
(setq straight-use-package-by-default t)
|
||||
(straight-use-package 'use-package)
|
||||
|
||||
; Visual things
|
||||
(defvar emacs-font "SourceCodePro:style=Light-7")
|
||||
(add-to-list 'default-frame-alist `(font . ,emacs-font))
|
||||
(set-face-attribute 'default t :height 150 :font emacs-font)
|
||||
(tool-bar-mode -1)
|
||||
(menu-bar-mode -1)
|
||||
(toggle-scroll-bar -1)
|
||||
(setq inhibit-startup-screen t)
|
||||
|
||||
;; We cannot exactly use use-package, so we just download it "manually".
|
||||
(let* ((theme-dir (expand-file-name "themes" user-emacs-directory))
|
||||
(theme-file (expand-file-name "weyland-yutani-theme.el" theme-dir)))
|
||||
(unless (file-exists-p theme-file)
|
||||
(unless (file-exists-p theme-dir)
|
||||
(make-directory theme-dir))
|
||||
(http-download-verify-and-exec
|
||||
"https://raw.githubusercontent.com/jstaursky/weyland-yutani-theme/246410e1c03f7d8d8e76102f7c5e3cda83acb36b/weyland-yutani-theme.el"
|
||||
"6593a0a7e46710e25f9b9caf9888106c93230bd20f9af87c5fc883a98b187253"
|
||||
"weyland-yutani-theme.el"
|
||||
(lambda ()
|
||||
(write-file theme-file))))
|
||||
(add-to-list 'custom-theme-load-path theme-dir)
|
||||
(load-theme 'weyland-yutani t))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:straight t
|
||||
:config
|
||||
(add-hook 'prog-mode-hook
|
||||
#'rainbow-delimiters-mode))
|
||||
(use-package hl-todo
|
||||
:straight t
|
||||
:config
|
||||
(add-hook 'prog-mode-hook
|
||||
#'hl-todo-mode))
|
||||
(global-hl-line-mode 1)
|
||||
(use-package nlinum
|
||||
:straight t
|
||||
:config
|
||||
(add-hook 'prog-mode-hook
|
||||
(lambda ()
|
||||
(nlinum-mode 1))))
|
||||
(add-hook 'prog-mode-hook
|
||||
(lambda ()
|
||||
(show-paren-mode 1)
|
||||
(setq show-parens-delay 0)))
|
||||
|
||||
(use-package ivy
|
||||
:straight t
|
||||
:config
|
||||
(defvar ivy-use-virtual-buffers t)
|
||||
(ivy-mode 1))
|
||||
|
||||
(setq enable-recursive-minibuffers t)
|
||||
|
||||
; This function allows us to exit EVIL states with C-c
|
||||
; (https://www.emacswiki.org/emacs/Evil#toc16)
|
||||
(defun escape (prompt)
|
||||
(cond ((or (evil-insert-state-p) (evil-normal-state-p) (evil-replace-state-p) (evil-visual-state-p)) [escape])
|
||||
(t (kbd "C-g"))))
|
||||
(use-package evil
|
||||
:init
|
||||
(setq evil-want-keybinding nil)
|
||||
:config
|
||||
(define-key key-translation-map (kbd "C-c") 'escape)
|
||||
(evil-mode 1))
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
:ensure t
|
||||
:config
|
||||
(evil-collection-init))
|
||||
; Vim-like buffer navigation
|
||||
(global-set-key (kbd "C-h") 'windmove-left)
|
||||
(global-set-key (kbd "C-l") 'windmove-right)
|
||||
(global-set-key (kbd "C-k") 'windmove-up)
|
||||
(global-set-key (kbd "C-j") 'windmove-down)
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:config
|
||||
(add-hook 'prog-mode-hook
|
||||
#'rainbow-delimiters-mode))
|
||||
(use-package highlight-parentheses
|
||||
:straight t
|
||||
:config
|
||||
(highlight-parentheses-mode))
|
||||
(use-package smartparens
|
||||
:straight t
|
||||
:config
|
||||
(smartparens-global-mode t))
|
||||
(use-package undo-tree
|
||||
:straight t
|
||||
:config
|
||||
(global-undo-tree-mode))
|
||||
|
||||
(use-package hl-todo
|
||||
:config
|
||||
(add-hook 'prog-mode-hook
|
||||
#'hl-todo-mode))
|
||||
(global-hl-line-mode 1)
|
||||
|
||||
(setq-default indent-tab-mode t)
|
||||
(setq tab-width 4)
|
||||
|
||||
(use-package perspective
|
||||
:bind
|
||||
("C-x C-b" . (lambda (arg)
|
||||
(interactive "P")
|
||||
(if (fboundp 'persp-bs-show)
|
||||
(persp-bs-show arg)
|
||||
(bs-show "all"))))
|
||||
:config
|
||||
(message "Persp-mode")
|
||||
(persp-mode))
|
||||
|
||||
;; mu4e config
|
||||
(unless (string= (system-name) "miku")
|
||||
; I don't need mu4e on my desktop
|
||||
(load-file (expand-file-name "mu4e.el" user-emacs-directory))
|
||||
(use-package mu4e
|
||||
:straight t
|
||||
:config
|
||||
(ptw/init-mu4e)))
|
||||
|
||||
(use-package calfw
|
||||
:straight (calfw
|
||||
:host github
|
||||
:repo "kiwanami/emacs-calfw"
|
||||
:files ("calfw.el" "calfw-cal.el")))
|
||||
|
||||
;; Org mode stuff
|
||||
;(use-package org-evil
|
||||
; :straight t)
|
||||
(use-package graphviz-dot-mode
|
||||
:straight t)
|
||||
(use-package org
|
||||
:straight t
|
||||
:bind
|
||||
("C-x P" . (lambda ()
|
||||
(interactive)
|
||||
(org-babel-execute-src-block)
|
||||
(org-redisplay-inline-images)))
|
||||
:config
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((dot . t)))
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda ()
|
||||
(local-set-key
|
||||
(kbd "C-x q")
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(org-present-quit)))
|
||||
(local-set-key
|
||||
(kbd "C-x p")
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(org-present))))))
|
||||
(use-package org-present
|
||||
:straight (org-present
|
||||
:host github
|
||||
:repo "rlister/org-present"
|
||||
:files ("org-present.el"))
|
||||
:config
|
||||
(add-hook 'org-present-mode-hook
|
||||
(lambda ()
|
||||
(org-present-big)
|
||||
(org-display-inline-images)
|
||||
(org-present-hide-cursor)
|
||||
(org-present-read-only)
|
||||
(org-hide-block-all)
|
||||
|
||||
; Disable evil, but bind left (prev) and right (next)
|
||||
(turn-off-evil-mode)
|
||||
(local-set-key
|
||||
(kbd "l")
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(org-present-next)
|
||||
;; NOTE: Workaround for images not being shown wen
|
||||
;; the slide has been changed
|
||||
(org-redisplay-inline-images)))
|
||||
(local-set-key
|
||||
(kbd "h")
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(org-present-prev)
|
||||
;; NOTE: Workaround for images not being shown wen
|
||||
;; the slide has been changed
|
||||
(org-redisplay-inline-images)))
|
||||
|
||||
;; Disable the modeline. But save it before so that we
|
||||
;; can restore it
|
||||
(set (make-local-variable 'saved-mode-line-format) mode-line-format)
|
||||
(setq mode-line-format nil)))
|
||||
(add-hook 'org-present-mode-quit-hook
|
||||
(lambda ()
|
||||
(org-present-small)
|
||||
(org-remove-inline-images)
|
||||
(org-present-show-cursor)
|
||||
(org-present-read-write)
|
||||
(org-show-all)
|
||||
(turn-on-evil-mode)
|
||||
|
||||
(local-unset-key (kbd "h"))
|
||||
(local-unset-key (kbd "l"))
|
||||
|
||||
;; Restore the modeline.
|
||||
;; NOTE: We need to call redraw-display or else the modeline
|
||||
;; won't be complete
|
||||
(setq mode-line-format saved-mode-line-format)
|
||||
(redraw-display))))
|
||||
|
||||
(use-package nix-mode
|
||||
:straight t)
|
||||
|
||||
(use-package json-mode
|
||||
:straight t)
|
||||
|
||||
;; Debugging
|
||||
(use-package explain-pause-mode
|
||||
:straight
|
||||
(explain-pause-mode
|
||||
:type git
|
||||
:host github
|
||||
:repo "lastquestion/explain-pause-mode")
|
||||
:config
|
||||
(explain-pause-mode))
|
||||
1
modules/programs/emacs/early-init.el
Normal file
1
modules/programs/emacs/early-init.el
Normal file
@@ -0,0 +1 @@
|
||||
(setq package-enable-at-startup nil)
|
||||
BIN
modules/programs/emacs/mu4e.el
Normal file
BIN
modules/programs/emacs/mu4e.el
Normal file
Binary file not shown.
133
modules/programs/firefox/default.nix
Normal file
133
modules/programs/firefox/default.nix
Normal file
@@ -0,0 +1,133 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment = {
|
||||
systemPackages = [ pkgs.firefox-wayland ];
|
||||
|
||||
# Deploy a Firefox policy to set the search engine and do some other things
|
||||
etc."firefox/policies/policies.json".source = ./policies.json;
|
||||
|
||||
sessionVariables = {
|
||||
# TODO: Use pam_environment once I figure out how to enable it.
|
||||
# Enable multi-touch and stuff
|
||||
"MOZ_USE_XINPUT2" = "1";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.alexander.programs.firefox = {
|
||||
enable = true;
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
https-everywhere
|
||||
ublock-origin
|
||||
umatrix
|
||||
decentraleyes
|
||||
privacy-redirect
|
||||
];
|
||||
profiles.default = {
|
||||
id = 0; # NOTE: This is important
|
||||
isDefault = true;
|
||||
name = "Default Profile";
|
||||
settings = {
|
||||
"browser.search.suggest.enabled" = false;
|
||||
"browser.tabs.drawInTitlebar" = true;
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit" = false;
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
|
||||
"browser.crashReports.unsubmittedCheck.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.topsites" = false;
|
||||
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false;
|
||||
"browser.newtabpage.enabled" = false;
|
||||
"browser.newtabpage.enhanced" = false;
|
||||
"browser.newtabpage.introShown" = true;
|
||||
"browser.send_pings" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false; # NixOS is a bit wonky here
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
"app.normandy.api_url" = "";
|
||||
"app.normandy.enabled" = false;
|
||||
"breakpad.reportURL" = "";
|
||||
"services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = false;
|
||||
"signon.autofillForms" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
"signon.management.page.breach-alerts.enabled" = false;
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.cachedClientID" = "";
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"toolkit.telemetry.hybridContent.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.prompted" = 2;
|
||||
"toolkit.telemetry.rejected" = true;
|
||||
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
||||
"toolkit.telemetry.server" = "";
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"toolkit.telemetry.unifiedIsOptIn" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
"webgl.disabled" = true;
|
||||
"webgl.renderer-string-override" = " ";
|
||||
"webgl.vendor-string-override" = " ";
|
||||
"experiments.activeExperiment" = false;
|
||||
"experiments.enabled" = false;
|
||||
"experiments.manifest.uri" = "";
|
||||
"experiments.supported" = false;
|
||||
"extensions.getAddons.cache.enabled" = false;
|
||||
"extensions.getAddons.showPane" = false;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"extensions.screenshots.upload-disabled" = true;
|
||||
"extensions.shield-recipe-client.api_url" = "";
|
||||
"extensions.shield-recipe-client.enabled" = false;
|
||||
"extensions.webservice.discoverURL" = "";
|
||||
"extensions.htmlaboutaddons.recommendations.enabled" = false;
|
||||
"media.autoplay.default" = 2;
|
||||
"media.eme.enabled" = false;
|
||||
"media.gmp-widevinecdm.enabled" = false;
|
||||
"media.navigator.enabled" = false;
|
||||
"media.peerconnection.enabled" = false;
|
||||
"media.video_stats.enabled" = false;
|
||||
"network.IDN_show_punycode" = true;
|
||||
"network.allow-experiments" = false;
|
||||
"network.captive-portal-service.enabled" = false;
|
||||
"network.cookie.cookieBehavior" = 1;
|
||||
"network.dns.disablePrefetch" = true;
|
||||
"network.dns.disablePrefetchFromHTTPS" = true;
|
||||
"network.http.referer.spoofSource" = true;
|
||||
"network.http.speculative-parallel-limit" = 0;
|
||||
"network.predictor.enable-prefetch" = false;
|
||||
"network.predictor.enabled" = false;
|
||||
"network.prefetch-next" = false;
|
||||
"network.trr.mode" = 5;
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"privacy.donottrackheader.value" = 1;
|
||||
"privacy.trackingprotection.cryptomining.enabled" = true;
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
"privacy.trackingprotection.fingerprinting.enabled" = true;
|
||||
"privacy.trackingprotection.pbmode.enabled" = true;
|
||||
"privacy.usercontext.about_newtab_segregation.enabled" = true;
|
||||
"security.ssl.disable_session_identifiers" = true;
|
||||
# Hardware Video Acceleration
|
||||
"media.ffmpeg.vaapi.enabled" = true;
|
||||
"media.ffvpx.enabled" = false;
|
||||
"media.rdd-vpx.enabled" = false;
|
||||
"media.navigator.mediadataencoder_vpx_enabled" = true;
|
||||
# WebRender
|
||||
"gfx.webrender.all" = true;
|
||||
# Better smooth scrolling
|
||||
"general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS" = 250;
|
||||
"general.smoothScroll.msdPhysics.enabled" = true;
|
||||
"general.smoothScroll.msdPhysics.motionBeginSpringConstant" = 450;
|
||||
"general.smoothScroll.msdPhysics.regularSpringConstant" = 450;
|
||||
"general.smoothScroll.msdPhysics.slowdownMinDeltaMS" = 50;
|
||||
"general.smoothScroll.msdPhysics.slowdownMinDeltaRatio;0" = 4;
|
||||
"general.smoothScroll.msdPhysics.slowdownSpringConstant" = 5000;
|
||||
"mousewheel.min_line_scroll_amount" = 22;
|
||||
"toolkit.scrollbox.horizontalScrollDistance" = 4;
|
||||
"toolkit.scrollbox.verticalScrollDistance" = 5;
|
||||
# Misc
|
||||
"layout.spellcheckDefault" = 0; # I don't use spellcheck
|
||||
"extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; # It's a nice theme
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/programs/firefox/policies.json
Normal file
17
modules/programs/firefox/policies.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"policies": {
|
||||
"SearchEngines": {
|
||||
"Default": "DuckDuckGo",
|
||||
"Remove": ["Google", "Amazon.de", "Bing"]
|
||||
},
|
||||
"UserMessaging": {
|
||||
"WhatsNew": false,
|
||||
"ExtensionRecommendations": false,
|
||||
"FeatureRecommendations": false,
|
||||
"UrlbarInterventions": false
|
||||
},
|
||||
"OverrideFirstRunPage": "",
|
||||
"DisablePocket": true,
|
||||
"DisableTelemetry": true
|
||||
}
|
||||
}
|
||||
21
modules/programs/git/default.nix
Normal file
21
modules/programs/git/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [ pkgs.diff-so-fancy ];
|
||||
home-manager.users.alexander.programs.git = {
|
||||
enable = true;
|
||||
userEmail = "papatutuwawa@polynom.me";
|
||||
userName = "Alexander \"PapaTutuWawa\"";
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
|
||||
core = {
|
||||
editor = "rvim";
|
||||
filemode = "false";
|
||||
pager = "diff-so-fancy | less --tabs=4 -RFX";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/programs/gnome-terminal/default.nix
Normal file
16
modules/programs/gnome-terminal/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [ pkgs.gnome.gnome-terminal ];
|
||||
home-manager.users.alexander.programs.gnome-terminal = {
|
||||
enable = true;
|
||||
profile.default = {
|
||||
visibleName = "default";
|
||||
audibleBell = false;
|
||||
#boldIsBright = true;
|
||||
default = true;
|
||||
# TODO: Make this configurable
|
||||
font = "Source Code Pro 12";
|
||||
};
|
||||
};
|
||||
}
|
||||
65
modules/programs/gnome/default.nix
Normal file
65
modules/programs/gnome/default.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
unstable = (import ../../unstable.nix config);
|
||||
in {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
arc-theme
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.caffeine
|
||||
gnomeExtensions.gnome-40-ui-improvements
|
||||
gnomeExtensionsCustom.notification-timeout # Custom package
|
||||
gnome.eog
|
||||
gnome.nautilus
|
||||
unstable.gnome.gnome-shell
|
||||
gnome.gnome-terminal
|
||||
pinentry-gnome
|
||||
dconf # For home-manager
|
||||
];
|
||||
gnome.excludePackages = pkgs.gnome.optionalPackages;
|
||||
};
|
||||
|
||||
services = {
|
||||
accounts-daemon.enable = true;
|
||||
colord.enable = false;
|
||||
geoclue2.enable = false;
|
||||
dleyna-renderer.enable = false;
|
||||
dleyna-server.enable = false;
|
||||
gvfs.enable = lib.mkForce false;
|
||||
telepathy.enable = false;
|
||||
gnome = {
|
||||
chrome-gnome-shell.enable = false;
|
||||
gnome-initial-setup.enable = false;
|
||||
gnome-remote-desktop.enable = false;
|
||||
rygel.enable = false;
|
||||
gnome-online-accounts.enable = false;
|
||||
evolution-data-server.enable = lib.mkForce false;
|
||||
tracker.enable = false;
|
||||
tracker-miners.enable = false;
|
||||
core-utilities.enable = false;
|
||||
games.enable = false;
|
||||
};
|
||||
|
||||
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "de";
|
||||
|
||||
libinput.enable = true;
|
||||
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager = {
|
||||
gdm.enable = true;
|
||||
gdm.wayland = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
gtkUsePortal = true;
|
||||
};
|
||||
}
|
||||
37
modules/programs/mpv/default.nix
Normal file
37
modules/programs/mpv/default.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
makeMpvProfile = shader: {
|
||||
glsl-shaders = "~/.config/mpv/shaders/${shader}";
|
||||
scale = "ewa_lanczossharp";
|
||||
cscale = "ewa_lanczossharp";
|
||||
gpu-context = "auto";
|
||||
gpu-api = "opengl";
|
||||
hwdec = "vaapi";
|
||||
vo = "gpu";
|
||||
video-sync = "display-resample";
|
||||
interpolation = "";
|
||||
tscale = "oversample";
|
||||
};
|
||||
in {
|
||||
environment.systemPackages = [ pkgs.mpv ];
|
||||
|
||||
home-manager.users.alexander = {
|
||||
xdg.configFile = {
|
||||
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl;
|
||||
"mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl".source = ./shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl;
|
||||
};
|
||||
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
script-opts = "try_ytdl_first=no";
|
||||
};
|
||||
defaultProfiles = [ "anime" ];
|
||||
profiles = {
|
||||
anime = (makeMpvProfile "Anime4K_Upscale_CNN_UL_x2_Deblur.glsl");
|
||||
"anime-denoise" = (makeMpvProfile "Anime4K_Upscale_CNN_UL_x2_Denoise.glsl");
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
4077
modules/programs/mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl
Normal file
4077
modules/programs/mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Deblur.glsl
Normal file
File diff suppressed because it is too large
Load Diff
3995
modules/programs/mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl
Normal file
3995
modules/programs/mpv/shaders/Anime4K_Upscale_CNN_UL_x2_Denoise.glsl
Normal file
File diff suppressed because it is too large
Load Diff
24
modules/programs/music/default.nix
Normal file
24
modules/programs/music/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
mpdevil
|
||||
mopidy mopidy-mpd mopidy-funkwhale
|
||||
];
|
||||
|
||||
# TODO
|
||||
services.mopidy = {
|
||||
enable = true;
|
||||
configuration = ''
|
||||
[funkwhale]
|
||||
enabled = true
|
||||
url = https://audio.polynom.me
|
||||
client_id =
|
||||
client_secret =
|
||||
cache_duration = 600
|
||||
'';
|
||||
extensionPackages = with pkgs; [
|
||||
mopidy-mpd mopidy-funkwhale
|
||||
];
|
||||
};
|
||||
}
|
||||
24
modules/programs/nonvm/default.nix
Normal file
24
modules/programs/nonvm/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
network = import ../../network.nix;
|
||||
in {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [ gopass home-manager ];
|
||||
|
||||
sessionVariables = {
|
||||
# Prevent us from having to always type it out
|
||||
#NIXOS_CONFIG = "\${HOME}/Development/Personal/nixos-config/mikulinux.nix";
|
||||
};
|
||||
|
||||
shells = [ pkgs.zsh ];
|
||||
pathsToLink = [ "/share/zsh" ];
|
||||
};
|
||||
|
||||
networking.hosts = {
|
||||
"${network.miku}" = [ "miku.local" ];
|
||||
"${network.nishimiya}" = [ "nishimiya.local" ];
|
||||
"${network.ayame}" = [ "ayame.local" ];
|
||||
"${network.tamaki}" = [ "tamaki.local" ];
|
||||
};
|
||||
}
|
||||
56
modules/programs/tmux/default.nix
Normal file
56
modules/programs/tmux/default.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [ pkgs.tmux ];
|
||||
home-manager.users.alexander.programs.tmux = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set -g mouse on
|
||||
set -g history-limit 1000
|
||||
setw -g monitor-activity on
|
||||
set -g visual-activity on
|
||||
|
||||
bind r source-file ~/.config/tmux/config
|
||||
|
||||
## Status bar design
|
||||
# status line
|
||||
set -g status-justify left
|
||||
set -g status-interval 2
|
||||
|
||||
# window status
|
||||
setw -g window-status-format " #F#I:#W#F "
|
||||
setw -g window-status-current-format " #F#I:#W#F "
|
||||
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
|
||||
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
|
||||
|
||||
# Info on left (I don't have a session display for now)
|
||||
set -g status-left ""
|
||||
|
||||
# loud or quiet?
|
||||
set-option -g visual-activity off
|
||||
set-option -g visual-bell off
|
||||
set-option -g visual-silence off
|
||||
set-window-option -g monitor-activity off
|
||||
set-option -g bell-action none
|
||||
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# The modes {
|
||||
setw -g clock-mode-colour colour135
|
||||
|
||||
# }
|
||||
|
||||
# The statusbar {
|
||||
set -g status-position bottom
|
||||
set -g status-left ""
|
||||
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
|
||||
set -g status-right-length 50
|
||||
set -g status-left-length 20
|
||||
|
||||
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
|
||||
|
||||
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
|
||||
# }
|
||||
'';
|
||||
};
|
||||
}
|
||||
67
modules/programs/zsh/default.nix
Normal file
67
modules/programs/zsh/default.nix
Normal file
@@ -0,0 +1,67 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment = {
|
||||
systemPackages = [ pkgs.zsh ];
|
||||
|
||||
shells = [ pkgs.zsh ];
|
||||
pathsToLink = [ "/share/zsh" ];
|
||||
};
|
||||
|
||||
# Otherwise the user won't appear on the GDM login screen
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager.users.alexander.programs.zsh = {
|
||||
enable = true;
|
||||
history.ignoreSpace = true;
|
||||
shellAliases = {
|
||||
ls = "ls --color=always";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../../";
|
||||
dev = "cd $HOME/Development";
|
||||
home = "cd $HOME";
|
||||
reload = "$SHELL -l";
|
||||
gs = "git status";
|
||||
gd = "git diff";
|
||||
gds = "git diff --staged";
|
||||
c = "clear";
|
||||
suspend = "systemctl suspend";
|
||||
};
|
||||
initExtra = ''
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "\e[3~" delete-char
|
||||
'';
|
||||
history.share = true;
|
||||
plugins = [
|
||||
{
|
||||
name = "pure.zsh";
|
||||
file = "pure.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "sindresorhus";
|
||||
repo = "pure";
|
||||
rev = "v1.17.0";
|
||||
sha256 = "0qfs7rvpyd8jb7x4ziqrkh0b6g9ldds8sn6qbqgrir80vdk90gpa";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-history-substring-search";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-history-substring-search";
|
||||
rev = "0f80b8eb3368b46e5e573c1d91ae69eb095db3fb";
|
||||
sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-completions";
|
||||
rev = "d4511c23659381b56dec8be8c8553b7ff3dc5fd8";
|
||||
sha256 = "1y8wkmhgkkyfz91y1f8crh6cg912n87gmcchc8xhnwji11n1mqrq";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user