ft (wip): big initial config
This commit is contained in:
47
modules/apps.nix
Normal file
47
modules/apps.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
update.onActivation = false;
|
||||
update.auto = {
|
||||
enable = true;
|
||||
onCalendar = "weekly";
|
||||
};
|
||||
packages = [
|
||||
"io.freetubeapp.FreeTube"
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: switch to home manager
|
||||
# home-manager.users.djai.home.packages = with pkgs; [ ];
|
||||
|
||||
users.users.djai.packages = with pkgs; [
|
||||
# chat
|
||||
element-desktop
|
||||
signal-desktop
|
||||
vesktop
|
||||
|
||||
# productivity
|
||||
libreoffice
|
||||
zathura
|
||||
|
||||
# media
|
||||
feh
|
||||
feishin # TODO: inject my patches / use my version
|
||||
ffmpeg
|
||||
gimp
|
||||
kdePackages.kdenlive
|
||||
krita
|
||||
mpv
|
||||
puddletag
|
||||
|
||||
# tools
|
||||
fastfetch
|
||||
gparted
|
||||
unrar
|
||||
unzip
|
||||
zip
|
||||
];
|
||||
}
|
||||
39
modules/audio.nix
Normal file
39
modules/audio.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
software.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
# disable automatic gain control for specific apps
|
||||
extraConfig.pipewire-pulse."10-block-source-volume.conf"."pulse.rules" = [
|
||||
{
|
||||
matches = [
|
||||
{ "application.name" = "~Chromium.*"; }
|
||||
{ "application.process.binary" = "Discord"; }
|
||||
{ "application.process.binary" = "vesktop"; }
|
||||
# TODO: add element to this list
|
||||
];
|
||||
actions.quirks = [ "block-source-volume" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.nix-ld.libraries = [ pkgs.pipewire ];
|
||||
|
||||
# home-manager.users.djai.home.packages = with pkgs; [
|
||||
# pavucontrol
|
||||
# qpwgraph
|
||||
# ];
|
||||
|
||||
users.users.djai.packages = with pkgs; [
|
||||
pavucontrol
|
||||
qpwgraph
|
||||
];
|
||||
}
|
||||
72
modules/base.nix
Normal file
72
modules/base.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# garbage collection
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
nix.optimise.automatic = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
users.users.djai = {
|
||||
isNormalUser = true;
|
||||
description = "djai";
|
||||
extraGroups = [
|
||||
"docker"
|
||||
"networkmanager"
|
||||
"video"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: figure out what we want to do w firewall
|
||||
# networking.firewall.enable = false;
|
||||
networking.networkmanager.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
services.upower.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
wget
|
||||
vim
|
||||
];
|
||||
|
||||
|
||||
# TODO: use home-manager
|
||||
# home-manager = {
|
||||
# useGlobalPkgs = true;
|
||||
# useUserPackages = true;
|
||||
# extraSpecialArgs = { inherit inputs; };
|
||||
# # Move a file home-manager would overwrite aside instead of failing.
|
||||
# backupFileExtension = "backup";
|
||||
#
|
||||
# users.djai = {
|
||||
# home.stateVersion = "26.05";
|
||||
# programs.home-manager.enable = true;
|
||||
#
|
||||
# # TODO: unified ssh-config secret
|
||||
# home.file.".ssh/config".text = ''
|
||||
# Include ${config.sops.secrets."ssh-config".path}
|
||||
# '';
|
||||
# };
|
||||
# };
|
||||
}
|
||||
15
modules/default.nix
Normal file
15
modules/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
imports = [
|
||||
../secrets
|
||||
./apps.nix
|
||||
./audio.nix
|
||||
./base.nix
|
||||
./desktop
|
||||
./dev.nix
|
||||
./email.nix
|
||||
./web
|
||||
./dunst.nix
|
||||
./terminal.nix
|
||||
./locale.nix
|
||||
];
|
||||
}
|
||||
112
modules/desktop/default.nix
Normal file
112
modules/desktop/default.nix
Normal file
@@ -0,0 +1,112 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = djai;
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
videoDrivers = [
|
||||
nvidia
|
||||
amdgpu
|
||||
intel
|
||||
];
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "euro";
|
||||
options = "caps:escape";
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprlock.enable = true;
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.caskaydia-cove
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.iosevka
|
||||
nerd-fonts.shure-tech-mono
|
||||
nerd-fonts.symbols-only
|
||||
];
|
||||
|
||||
# services.gvfs.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
services.printing.enable = true;
|
||||
|
||||
users.users.djai.packages = with pkgs; [
|
||||
hyprpicker
|
||||
hyprsunset
|
||||
kanshi
|
||||
rofi
|
||||
waybar
|
||||
wl-clipboard
|
||||
wl-clipboard-x11
|
||||
];
|
||||
|
||||
# TODO: qt theming
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome"; # have to use gnome as the "kde" setting crashes kde apps iff plasma isn't running
|
||||
style = "adwaita-dark";
|
||||
};
|
||||
|
||||
# i have no clue what this does.
|
||||
# GLib aborts any program that loads a GSettings schema it can't find, and Qt's GTK file dialog needs gtk3's. Nothing else puts these on the path.
|
||||
environment.sessionVariables.GSETTINGS_SCHEMA_DIR = builtins.concatStringsSep ":" [
|
||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas"
|
||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}/glib-2.0/schemas"
|
||||
];
|
||||
|
||||
# TODO: other mimetypes?
|
||||
xdg.mime.defaultApplications = {
|
||||
"inode/directory" = [ "kitty" ];
|
||||
"text/html" = [ "librewolf.desktop" ];
|
||||
"x-scheme-handler/http" = [ "liberwolf.desktop" ];
|
||||
"x-scheme-handler/https" = [ "librewolf.desktop" ];
|
||||
};
|
||||
|
||||
# TODO: check we like these defaults
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config = {
|
||||
common.default = [ "gtk" ];
|
||||
hyprland = {
|
||||
default = [
|
||||
"gtk"
|
||||
"hyprland"
|
||||
];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
|
||||
};
|
||||
};
|
||||
# programs.hyprland adds the Hyprland portal.
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
# TODO: start using home manager
|
||||
# home-manager.users.djai = {
|
||||
# imports = [ ./hyprland.nix ]; # loogat husseins dots for inspo
|
||||
#
|
||||
# home.packages = with pkgs; [ ];
|
||||
#
|
||||
# # TODO: cursor + icon theming
|
||||
# gtk = {
|
||||
# enable = true;
|
||||
# iconTheme = {
|
||||
# name = "Papirus-Dark";
|
||||
# package = pkgs.papirus-icon-theme;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
}
|
||||
136
modules/dev.nix
Normal file
136
modules/dev.nix
Normal file
@@ -0,0 +1,136 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
in
|
||||
{
|
||||
programs.java.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
zlib
|
||||
ncurses5
|
||||
libGL
|
||||
libGLU
|
||||
vulkan-loader
|
||||
libdrm
|
||||
mesa
|
||||
libx11
|
||||
libxcursor
|
||||
libxrandr
|
||||
libxi
|
||||
libxext
|
||||
libxfixes
|
||||
libxcb
|
||||
wayland
|
||||
libpulseaudio
|
||||
alsa-lib
|
||||
nss
|
||||
nspr
|
||||
expat
|
||||
glib
|
||||
dbus
|
||||
systemd
|
||||
freetype
|
||||
fontconfig
|
||||
];
|
||||
|
||||
users.users.djai.packages = with pkgs; [
|
||||
# dev environment
|
||||
godot
|
||||
inputs.nix4nvchad.packages.${system}.nvchad
|
||||
jq
|
||||
lazygit
|
||||
ripgrep
|
||||
|
||||
# toolchains
|
||||
cargo
|
||||
gcc
|
||||
gnumake
|
||||
openssl
|
||||
python3
|
||||
rustc
|
||||
uv
|
||||
|
||||
# containers / secrets
|
||||
age
|
||||
fluxcd
|
||||
k9s
|
||||
kubectl
|
||||
kubectx
|
||||
sops
|
||||
|
||||
# hosts / networks
|
||||
wireguard-tools
|
||||
lm_sensors
|
||||
|
||||
];
|
||||
|
||||
# TODO: switch to home manager
|
||||
# FIXME: use builtins.readfile to store these config options i think
|
||||
# home-manager.users.djai.home.packages = with pkgs; [];
|
||||
|
||||
nvchad = inputs.nix4nvchad.packages.${system}.default.override {
|
||||
extraConfig = ''
|
||||
local map = vim.keymap.set
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("n", "<leader>sw", "<cmd> set wrap! <CR>", {desc = "Toggle text wrapping"})
|
||||
map("n", "<leader>fm", function() require("conform").format() end, {desc = "Format with conform"})
|
||||
map("n", "<leader>-", "<cmd> Oil <CR>", {desc = "Open directory in oil"})
|
||||
map("n", "<leader>rcu", function() require('crates').upgrade_all_crates() end, {desc = "Upgrade rust crates"})
|
||||
map("n", "<leader>ca", function() vim.lsp.buf.code_action() end, {desc = "Lsp code action"})
|
||||
map("n", "<leader>gr", function() vim.lsp.buf.references() end, {desc = "Lsp references"})
|
||||
map("n", "<leader>gm", "<cmd>Telescope git_commits<CR>", { desc = "telescope git commits" })
|
||||
|
||||
map('n', '<leader>fi', function()
|
||||
builtin.live_grep({
|
||||
prompt_title = "Files matching TODO",
|
||||
default_text = "(TODO|todo|FIXME|THOUGHT|REFACTOR|TEST)",
|
||||
})
|
||||
end, {desc = "find comments using telescope"})
|
||||
|
||||
-- stay in v mode after indenting
|
||||
map("v", "<", "<gv")
|
||||
map("v", ">", ">gv")
|
||||
'';
|
||||
|
||||
extraPlugins = ''
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},{
|
||||
"rcarriga/nvim-notify",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local notify = require "notify"
|
||||
notify.setup {
|
||||
background_colour = "#2D3540",
|
||||
}
|
||||
vim.notify = notify
|
||||
end,
|
||||
},{
|
||||
"stevearc/oil.nvim",
|
||||
opts = {},
|
||||
dependencies = { "nvim-tree/nvim-web-devicons"},
|
||||
lazy = false
|
||||
},{
|
||||
'saecki/crates.nvim',
|
||||
event = { "BufRead Cargo.toml" },
|
||||
config = function()
|
||||
require('crates').setup()
|
||||
end,
|
||||
},{
|
||||
"jglasovic/venv-lsp.nvim",
|
||||
config = function()
|
||||
require("venv-lsp").setup()
|
||||
end,
|
||||
lazy = false,
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
94
modules/dunst.nix
Normal file
94
modules/dunst.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
enableWayland = true;
|
||||
settings = {
|
||||
global = {
|
||||
alignment = "left";
|
||||
always_run_script = true;
|
||||
class = "Dunst";
|
||||
corner_radius = 10;
|
||||
corners = "bottom-left, top-right";
|
||||
ellipsize = "middle";
|
||||
enable_posix_regex = true;
|
||||
follow = mouse;
|
||||
font = "Iosevka Mono Nerd Font Medium 10";
|
||||
force_xinerama = false;
|
||||
force_xwayland = false;
|
||||
format = "<span weight='bold'>%s</span>\n%b";
|
||||
frame_color = "#9399b2";
|
||||
frame_width = 0;
|
||||
hide_duplicate_count = false;
|
||||
history_length = 20;
|
||||
horizontal_padding = 15;
|
||||
icon_position = "left";
|
||||
idle_threshold = 120;
|
||||
ignore_dbusclose = false;
|
||||
ignore_newline = false;
|
||||
indicate_hidden = yes;
|
||||
line_height = 0;
|
||||
markup = "full";
|
||||
max_icon_size = 32;
|
||||
min_icon_size = 0;
|
||||
mouse_left_click = "do_action, close_current";
|
||||
mouse_middle_click = "do_action, close_current";
|
||||
mouse_right_click = "close_all";
|
||||
offset = "3x3";
|
||||
padding = 15;
|
||||
progress_bar_frame_width = 1;
|
||||
progress_bar_height = 10;
|
||||
progress_bar_max_width = 400;
|
||||
progress_bar_min_width = 150;
|
||||
progress_bar = true;
|
||||
separator_color = frame;
|
||||
separator_height = 2;
|
||||
show_age_threshold = 60;
|
||||
show_indicators = true;
|
||||
shrink = no;
|
||||
sort = yes;
|
||||
stack_duplicates = true;
|
||||
sticky_history = true;
|
||||
text_icon_padding = 15;
|
||||
title = "Dunst";
|
||||
vertical_alignment = "center";
|
||||
width = 250;
|
||||
word_wrap =false;
|
||||
};
|
||||
|
||||
experimental.per_monitor_dpi = false;
|
||||
|
||||
urgency_low = {
|
||||
background = "#181825CC";
|
||||
foreground = "#CDD6F4";
|
||||
timeout = 10;
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#181825CC";
|
||||
foreground = "#CDD6F4";
|
||||
frame_color = "#b4befe";
|
||||
timeout = 10;
|
||||
};
|
||||
|
||||
urgency_high = {
|
||||
background = "#181825CC";
|
||||
foreground = "#F38BA8";
|
||||
format = "<b>%s</b>\n%b";
|
||||
frame_color = "#F38BA8";
|
||||
timeout = 60 ;
|
||||
};
|
||||
|
||||
fcitx5-filter = {
|
||||
summary = "Wayland Diagnose";
|
||||
skip_display = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
87
modules/email.nix
Normal file
87
modules/email.nix
Normal file
@@ -0,0 +1,87 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
|
||||
{
|
||||
programs.thunderbird.enable = true;
|
||||
}
|
||||
|
||||
# TODO: use thunderbird seeding config
|
||||
|
||||
# Thunderbird with all mail accounts declared. Thunderbird can't read passwords
|
||||
# from a command, so its credential store (logins.json + key4.db) is kept in
|
||||
# sops and copied into a fresh profile once. The Microsoft 365 account still
|
||||
# needs its OAuth consent once per machine.
|
||||
|
||||
# let
|
||||
# realName = "Djai Hougee";
|
||||
# profile = "/home/djai/.thunderbird/main";
|
||||
#
|
||||
# # without this thunderbird picks OAuth2 for gmail.com accounts, but these need app passwords
|
||||
# passwordAuth = id: {
|
||||
# "mail.server.server_${id}.authMethod" = 3;
|
||||
# "mail.smtpserver.smtp_${id}.authMethod" = 3;
|
||||
# };
|
||||
#
|
||||
# oauthAuth = id: {
|
||||
# "mail.server.server_${id}.authMethod" = 10;
|
||||
# "mail.smtpserver.smtp_${id}.authMethod" = 10;
|
||||
# };
|
||||
#
|
||||
# account = flavor: address: auth: {
|
||||
# inherit flavor address realName;
|
||||
# userName = address;
|
||||
# thunderbird = {
|
||||
# enable = true;
|
||||
# settings = auth;
|
||||
# };
|
||||
# };
|
||||
# in
|
||||
# {
|
||||
# # Only seeds a profile that has no logins.json yet, so the live store (with
|
||||
# # Thunderbird's own token refreshes) is never overwritten.
|
||||
# systemd.services.thunderbird-seed-creds = {
|
||||
# description = "Seed Thunderbird credential store from sops (first run only)";
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# after = [
|
||||
# "sops-install-secrets.service"
|
||||
# "home-manager-djai.service"
|
||||
# ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# User = "djai";
|
||||
# RemainAfterExit = true;
|
||||
# };
|
||||
# script = ''
|
||||
# set -eu
|
||||
# secret="${config.sops.secrets."thunderbird-creds".path}"
|
||||
# if [ ! -d "${profile}" ]; then
|
||||
# echo "profile ${profile} not present yet; skipping seed"
|
||||
# exit 0
|
||||
# fi
|
||||
# if [ -e "${profile}/logins.json" ]; then
|
||||
# echo "logins.json already present; leaving live store untouched"
|
||||
# exit 0
|
||||
# fi
|
||||
# if [ ! -r "$secret" ]; then
|
||||
# echo "secret $secret not readable; skipping"
|
||||
# exit 0
|
||||
# fi
|
||||
# ${pkgs.gnutar}/bin/tar -C "${profile}" -xf "$secret"
|
||||
# echo "seeded Thunderbird credential store into ${profile}"
|
||||
# '';
|
||||
# };
|
||||
#
|
||||
# home-manager.users.djai = {
|
||||
# programs.thunderbird = {
|
||||
# enable = true;
|
||||
# profiles.main.isDefault = true;
|
||||
# };
|
||||
#
|
||||
# accounts.email.accounts = {
|
||||
# djai = account "kolabnow.com" "ljxjah@mykolab.com" passwordAuth // {
|
||||
# primary = true;
|
||||
# };
|
||||
# uni = account "gmail.com" "d.hougee@student.rug.nl" oauthAuth;
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
20
modules/locale.nix
Normal file
20
modules/locale.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# TODO: copy locale settings from tuxcomp
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
}
|
||||
130
modules/terminal.nix
Normal file
130
modules/terminal.nix
Normal file
@@ -0,0 +1,130 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.defaultPackages = with pkgs; [
|
||||
fbterm
|
||||
kitty
|
||||
starship
|
||||
];
|
||||
|
||||
# TODO: switch to home manager
|
||||
# FIXME: do not embed our entire tmux config into this
|
||||
programs.fish.enable = true;
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
# use <C-a> as leader
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
|
||||
bind ? list-keys
|
||||
|
||||
# window/pane management
|
||||
bind s split-window -h -c "#{pane_current_path}"
|
||||
bind C-s select-layout main-horizontal \; swap-pane -t 0 \; select-pane -t 0
|
||||
bind S select-layout even-horizontal
|
||||
bind v split-window -v -c "#{pane_current_path}"
|
||||
bind C-v select-layout main-vertical \; swap-pane -t 0 \; select-pane -t 0
|
||||
bind V select-layout even-vertical
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
# move pane to new tab
|
||||
bind b break-pane
|
||||
# swap active pane and first pane
|
||||
bind a swap-pane -t 0 \; select-pane -t 0
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# vim-style pane switching with <A-j> through <A-l>
|
||||
bind -n M-h select-pane -L
|
||||
bind -n M-j select-pane -D
|
||||
bind -n M-k select-pane -U
|
||||
bind -n M-l select-pane -R
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
# Resize using caps
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
# vim-style copy mode
|
||||
set-window-option -g mode-keys vi
|
||||
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
|
||||
bind-key p paste-buffer
|
||||
|
||||
# window traversal
|
||||
bind -n M-n next-window
|
||||
bind tab next-window
|
||||
|
||||
|
||||
# reload config with r
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
# dont rename windows automatically
|
||||
# set-option -g allow-rename off
|
||||
|
||||
# bind m send-keys -R M-k C-a '[kV' C-m M-j 'Pd/[\.ACFGV]' C-m 'Ax'
|
||||
bind m source-file ~/.config/tmux/copy.tmux
|
||||
|
||||
|
||||
# ----- UI/UX -----
|
||||
|
||||
# don't do anything when a 'bell' rings
|
||||
set -g visual-activity off
|
||||
set -g visual-bell off
|
||||
set -g visual-silence off
|
||||
setw -g monitor-activity off
|
||||
set -g bell-action none
|
||||
|
||||
# copy mode
|
||||
setw -g mode-style 'fg=black bg=red bold'
|
||||
|
||||
# panes
|
||||
set -g pane-border-style 'fg=black'
|
||||
set -g pane-active-border-style 'fg=white'
|
||||
|
||||
# status
|
||||
set -g status-position bottom
|
||||
set -g status-justify left
|
||||
set -g status-style 'bg=black fg=white'
|
||||
|
||||
set -g status-left ""
|
||||
set -g status-right ""
|
||||
|
||||
# window status
|
||||
setw -g window-status-current-style 'bg=blue fg=black'
|
||||
setw -g window-status-current-format '◤ #W ◢'
|
||||
|
||||
setw -g window-status-style 'fg=white bg=black'
|
||||
setw -g window-status-format '#[fg=black]◤ #[fg=white]#W #[fg=black]◢' # todo: styling
|
||||
setw -g window-status-bell-style 'fg=yellow bg=red bold'
|
||||
|
||||
# messages
|
||||
set -g message-style 'fg=black bg=blue'
|
||||
'';
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sensible
|
||||
resurrect
|
||||
];
|
||||
};
|
||||
|
||||
# home-manager.users.djai = {
|
||||
# programs.fish.enable = true;
|
||||
# programs.tmux.enable = true;
|
||||
#
|
||||
# programs.kitty = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# shell = "${pkgs.tmux}/bin/tmux";
|
||||
# font_family = "Iosevka Nerd Font";
|
||||
# };
|
||||
# extraConfig = ""; # TODO theming
|
||||
# };
|
||||
#
|
||||
# };
|
||||
}
|
||||
18
modules/web/default.nix
Normal file
18
modules/web/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# TODO: switch to home manager
|
||||
# then configure plugins n shi here too
|
||||
# make a shared section (about:config sections, plugins, profiles) and then have two separate configs in firefox.nix and librewolf.nix
|
||||
# https://wiki.nixos.org/wiki/Librewolf
|
||||
# https://wiki.nixos.org/wiki/Firefox/en
|
||||
imports = [
|
||||
./firefox.nix
|
||||
];
|
||||
|
||||
users.users.djai.packages = with pkgs; [
|
||||
librewolf
|
||||
firefox
|
||||
];
|
||||
}
|
||||
|
||||
39
modules/web/firefox.nix
Normal file
39
modules/web/firefox.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
preferences = { #TODO: port over all changes in about:config from tuxcomp
|
||||
"browser.resistFingerPrinting" = true;
|
||||
};
|
||||
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
ExtensionSettings = {
|
||||
"uBlock0@raymondhill.net" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
};
|
||||
|
||||
"vimium@vimium.org" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/vimium/latest.xpi";
|
||||
};
|
||||
|
||||
"addon@darkreader.org" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
|
||||
};
|
||||
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user